Forum Visual Basic GeneralQuestions and discussions not covered in the other VB forums such as Data and Setup. (Not for VB6 questions.)© 2009 Microsoft Corporation. Tous droits réservés.Sun, 29 Nov 2009 16:04:50 Z0f60fa48-1ceb-41ee-a10a-0dfcee7e19bdhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/145f75e2-1d06-4574-afe1-fd2505dc4dd1http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/145f75e2-1d06-4574-afe1-fd2505dc4dd1dsprow58http://social.msdn.microsoft.com/Profile/fr-FR/?user=dsprow58How do you stop an array value from changing when a random output is generated using VB 2008?I am generating an array of random numbers for for a class project (simple yahtzee game).  I am comparing the output of the array and displaying a picture of each matching dice in a picture box.  I would like to use check boxes to select a position of the array so it cannot be changed until the check boxes are cleared.  When the check box is checked, the value of the position in the array should not change.  How do I accomplish this?   Sat, 28 Nov 2009 15:57:49 Z2009-11-29T16:04:23Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/17f236f0-474e-4bdc-867c-b31a7e7d33cahttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/17f236f0-474e-4bdc-867c-b31a7e7d33ca777newby777http://social.msdn.microsoft.com/Profile/fr-FR/?user=777newby777Linking formsHi,<br/><br/>I have 1 project with about 7 forms.  On each form I have 6  x 4 responses radio buttons (i.e. a multiple choice quiz).  If the correct response is selected, the examinee gets 1 point, else 0.  At the end of the quiz, the examinee can click a button that will add up all the correct responses &amp; display the % correct.  <br/><br/>How do I program the button to do this given that data are on 7 different forms?<br/><br/>Thank you.<br/><br/><br/> <div>I have 1 project with about 7 forms.  On each form I have 6  x 4 responses radio buttons (i.e. a multiple choice quiz).  If the correct response is selected, the examinee gets 1 point, else 0.  At the end of the quiz, the examinee can click a button that will add up all the correct responses &amp; display the % correct.  <br/><br/>How do I program the button to do this given that data are on 7 different forms?<br/><br/>Thank you.<br/><br/><a rel=nofollow href="http://mcatprep.yolasite.com/">http://mcatprep.yolasite.com/</a><br/>&lt;a href=http://mcatprep.yolasite.com/&gt;M Prep&lt;/a&gt;<br/></div> <div> </div>Sun, 29 Nov 2009 10:18:35 Z2009-11-29T15:42:23Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/e70aceee-ba83-4a4e-9459-a85fd7acd0d4http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/e70aceee-ba83-4a4e-9459-a85fd7acd0d4cLijohttp://social.msdn.microsoft.com/Profile/fr-FR/?user=cLijofile copying from different locations to different locations.Hello <div><br/></div> <div>I am new to this forum.</div> <div><br/></div> <div>I am trying to copy files from different folder locations to different folder locations.  For that I have written codes as follows:</div> <div>But it do not work.......shows error in 4th For loop statement.  Please help!</div> <div><br/></div> <div>Many thanks</div> <div>Lijo</div> <div><br/></div> <div>===============</div> <div> <div>Public Sub copyFiles()</div> <div>'    On Error Resume Next</div> <div>    Dim FSO As Scripting.FileSystemObject</div> <div>    Set FSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)</div> <div>    </div> <div>    Dim mainDestFldr As folder</div> <div>    Dim subDestFldr As folder</div> <div>    Dim sub2DestFldr As folder</div> <div>    Dim sFldr As folder</div> <div>    Dim FirstSubFldr As folder</div> <div>    Dim SecondSubFldr As folder</div> <div>    Dim ThirdSubFldr As folder</div> <div>    Dim fil As folder</div> <div>    Dim sPath As String</div> <div>    </div> <div>    sPath = &quot;G:\01 - CERTIFICATE&quot;</div> <div>    Set mainDestFldr = FSO.GetFolder(&quot;G:\TO HANDOVER TO COMPANY\Train 5 MAP\&quot;)</div> <div>    </div> <div>    For Each FirstSubFldr In mainDestFldr.SubFolders</div> <div>        Set subDestFldr = FSO.GetFolder(FirstSubFldr)</div> <div>        For Each SecondSubFldr In subDestFldr.SubFolders</div> <div>            Set sub2DestFldr = FSO.GetFolder(SecondSubFldr)</div> <div>            For Each ThirdSubFldr In sub2DestFldr.SubFolders</div> <div>                sPath = sPath &amp; Trim(Mid(SecondSubFldr, InStr(32, SecondSubFldr, &quot;\&quot;), 20))</div> <div>                Set sFldr = FSO.GetFolder(sPath)</div> <div>                For Each fil In sFldr</div> <div>                    If fil Like SecondSubFldr &amp; &quot;*.*&quot; And ThirdSubFldr.Path = &quot;DISCIPLINE COMPLETIONS CERTIFICATE&quot; Then</div> <div>                        MsgBox fil</div> <div>                        FSO.copyFile fil, ThirdSubFldr.Path</div> <div>                        Name fil As fil &amp; &quot;_done&quot;</div> <div>                    ElseIf fil Like &quot;RFC*.*&quot; And ThirdSubFldr.Path = &quot;RFC&quot; Then</div> <div>                        MsgBox fil</div> <div>                        FSO.copyFile fil, ThirdSubFldr.Path</div> <div>                    ElseIf fil Like &quot;SMCC*.*&quot; And ThirdSubFldr.Path = &quot;SMCC&quot; Then</div> <div>                        MsgBox fil</div> <div>                        FSO.copyFile fil, ThirdSubFldr.Path</div> <div>                    End If</div> <div>                Next fil</div> <div>            Next ThirdSubFldr</div> <div>        Next SecondSubFldr</div> <div>    Next FirstSubFldr</div> <div>    </div> <div>    MsgBox &quot;Completed Successfully!!!&quot;</div> <div>    </div> <div>    Set sFldr = Nothing</div> <div>    Set mainDestFldr = Nothing</div> <div>    Set subDestFldr = Nothing</div> <div>    Set FirstSubFldr = Nothing</div> <div>    Set SecondSubFldr = Nothing</div> <div>    Set ThirdSubFldr = Nothing</div> <div>End Sub</div> <div>=======================</div> </div>Sun, 29 Nov 2009 12:26:35 Z2009-11-29T15:06:49Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/054bef3c-b602-409c-9985-86026ef4082fhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/054bef3c-b602-409c-9985-86026ef4082fShariqDONhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=ShariqDONNewbie VB.NET Student<p>I want make Discusion Form for New Programer of  Visual Basic<br/>Please all Experiance Person give help Us....<br/><br/>what is condision to use &lt;<strong> Dim</strong> &gt; command . how to use it and what is meaning of &lt; <strong>Dim</strong> &gt;like this &quot;Dim Name As String&quot; &quot;Dim ButtonText As String&quot; &quot;Dim Tooltip As String&quot; <br/>Thanx<br/>what did mean by  &lt; Public Class &gt;  ,  &lt;  Private Sub  &gt;<br/>where we use it . in Condition?</p>Thu, 16 Jul 2009 09:21:20 Z2009-11-29T16:04:49Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/b540120b-1904-44ad-9448-9695482aebdfhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/b540120b-1904-44ad-9448-9695482aebdfDJ PIPhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=DJ%20PIPTagLib# - MP3 files, tagging and Images. - Can you help?Hi everyone,<br/> <br/> I've got myself into a mess and hope some-one here can help out.<br/> I'm using this MP3 tagging library called TagLib# or TagLibSharp.<br/> <br/> Unfortunately the documentation is a bit patchy to say the least and their (Official) website, which contains all the documentation seems to have closed down, leaving me to download this MP3 tagging library from the link below.<br/> <a href="http://developer.novell.com/wiki/index.php/TagLib_Sharp">http://developer.novell.com/wiki/index.php/TagLib_Sharp</a> <br/> <br/> Everything so far works, including tagging the 'Artist, Title, Album' etc. but I want to include an image in my MP3 files, like album art.<br/> I have found some sample code to read the image back from the tag using their library, I just can't work out what it would look like the other way around.<br/> <br/> <pre lang=x-vbnet>If filetotag.Tag.Pictures.Length &gt;= 1 Then Dim bin = DirectCast(filetotag.Tag.Pictures(0).Data.Data, Byte()) AlbumArt.Image = Image.FromStream(New MemoryStream(bin)).GetThumbnailImage(115, 115, Nothing, System.IntPtr.Zero) End If</pre> This code above will read an existing tag and load the image into a picture box called 'Album Art'.<br/> Does any-one know how to 'flip' it so that it would look something like ...<br/> <br/> <pre lang=x-vbnet>filetotag.Tag.Pictures = AlbumArt.Image</pre> Obviously using the memory stream functions etc.<br/> <br/> Many thanks,<br/> DJ PIP<br/>Sat, 28 Nov 2009 21:15:47 Z2009-11-29T14:33:08Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7ee25980-3630-4d8e-b341-08d686adae64http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7ee25980-3630-4d8e-b341-08d686adae64Malangehttp://social.msdn.microsoft.com/Profile/fr-FR/?user=MalangeTo Whom It May Concern! Hi Martin.Hi Martin, <br/><br/>We, so to speak, want to know how do you Format your Code? Your code seems to be different from all user or MVP, ect. So, the question is, how do you do that? I cannot post the e.g here but....am sure you will understand my question....<br/><br/>Cor knows what am talking about..... <hr class="sig">Don't judge me, just Upgrade me. Thanks!Fri, 27 Nov 2009 21:20:35 Z2009-11-29T12:20:43Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/1cf3672a-9066-4a3e-9d22-d262f1d26e3dhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/1cf3672a-9066-4a3e-9d22-d262f1d26e3dWirehttp://social.msdn.microsoft.com/Profile/fr-FR/?user=WireDisabling a vscrollbar but keeping the bar totally visibleHi,<br/> <p class=MsoNormal><span lang=EN-US> <br/> I'm currently working on an application that detects a color on a defined area on the screen and together with a panel that displays the color I show the values in a label and represent them with a vscrollbar. (The goal of the project is to output the color of the computer screen via an usb to dmx interface to create an ambilight effect) Now I don’t want the user to be able to move the scrollbars up and down so I figured disabling them would do the trick but then the little square you click on to scroll it up and down isn't visible anymore. Is there a workaround for this? Probably something simple I'm missing here, it's been a while since I programmed :)<br/> <br/> Thanks</span></p>Sun, 29 Nov 2009 12:05:52 Z2009-11-29T13:09:16Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/65c5ed08-e522-4cd3-88ca-3627a5387d9fhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/65c5ed08-e522-4cd3-88ca-3627a5387d9ftmiller_15http://social.msdn.microsoft.com/Profile/fr-FR/?user=tmiller_15Custom ControlsCan anyone recommend any good website for learning to build customs controls?Sun, 29 Nov 2009 08:37:23 Z2009-11-29T12:01:19Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/26cf1372-9236-4359-8c1a-6cb51198e65fhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/26cf1372-9236-4359-8c1a-6cb51198e65fGuyJoshttp://social.msdn.microsoft.com/Profile/fr-FR/?user=GuyJosChecking a file is in a given pathHi<br/><br/>I am writing a program to play sound effects in a theatre.<br/><br/>The file system should be like this:<br/><br/>Any path on the computer\Filename\filename.xml<br/>Any path on the computer\Filename\Sounds\<br/><br/>filename.xml is the file that contains all the data for the show, and inside the directory &quot;Sounds&quot; all of the sound effects for the current show are kept.<br/><br/>What I want to do is when the user opens a file from an open file dialog, if the path is inside the sounds directory, just return the path from the directory sounds onwards.  If it is not, I want to copy the file into the sounds direcrtory, then return the path as before.<br/><br/>For example:<br/>I have the show file C:\myShow\myShow.xml<br/><br/>I open the file C:\myShow\Sounds\SoundEffect1.wav<br/>Just return &quot;\Sounds\SoundEffect1.wav&quot;<br/><br/>I open the file C:\My Music\Sound Effect 2.wav<br/>Copy the file to C:\myShow\Sounds\<br/>Then return \Sounds\SoundEffect2.wav<br/><br/>Thanks<br/><hr class="sig">Guy Joseph - Intel Quad Q9450, 4Gb Ram, 3x500GB Hard Drives, NVidia 8800GT, Marian Marc 8, VB Express 2008Fri, 27 Nov 2009 23:08:13 Z2009-11-29T11:30:38Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/04977a34-7b9f-4869-805a-d80b2b43e3b3http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/04977a34-7b9f-4869-805a-d80b2b43e3b3SheenLimhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=SheenLimHow to set values for combobox itemIm trying to set values for every combox item <div>for example if I have an item name of &quot;currentyear&quot; it should return the year.</div> <div><br/></div> <div>I've tried the combox_year.items.add(new listItem(&quot;Current Year&quot;, now.year.tostring()))</div> <div>but it wont work.. but when I tried it to a asp.net webpage it does?</div> <div><br/></div> <div>So how do I do this in a application?</div> <hr class=sig> To aim is not enough. You must hit.Sat, 28 Nov 2009 08:33:07 Z2009-11-29T07:46:09Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/3364ce78-b0ae-43de-885c-de7a386149a8http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/3364ce78-b0ae-43de-885c-de7a386149a8TheEndOfTimehttp://social.msdn.microsoft.com/Profile/fr-FR/?user=TheEndOfTimeSorting filenames using the Windows Explorer algorithmHi,<br/><br/>I want to sort string-arrays containing filenames in VB .NET 2002 using the same intelligent algorithm that windows explorer uses. I mean the algorithm that is able to recognize numbers within the filename and sorts the parts the look like a number as numbers and the rest of a filename as text. The result would be something like this:<br/>A1 A2 ... A9 A10 A11 ... A20<br/>instead of<br/>A1 A10 A11 ... A19 A2 A20 A3 ... A9<br/><br/>This should work for all filenames on a random PC and not only for a specific type of filenames. Is this possible?<br/>Thank you for your help.Sat, 28 Nov 2009 17:05:43 Z2009-11-29T05:44:29Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/2da30313-639d-4dcd-abbe-2db988edf512http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/2da30313-639d-4dcd-abbe-2db988edf512trashr0xhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=trashr0xAccept only one char per line in a RichTextBoxHey guys,<br/> <br/> I only want one char per line to be accepted in my multilined richtextbox. This means that when one char is typed, then the richtextbox should automatically change line.<br/> So typing 'hi!' should show as:<br/> h<br/> i<br/> !<br/> <br/> I tried this but i seem to get out of bounds.<br/> <br/> <pre lang=x-vbnet>Private Sub txtrtb_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtrtb.KeyPress txtLength(txtrtb) End Sub Private Sub txtLength(ByVal txtrich As RichTextBox) For Me.i = 0 To txtrich.Lines(i).Count - 1 If txtrich.Lines(i).Length = 1 Then txtrich.Text &amp;= vbCrLf Else Return End If Next End Sub </pre>Sun, 29 Nov 2009 03:40:44 Z2009-11-29T05:15:38Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/146349d9-761d-4cac-b269-854ac5f1ae96http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/146349d9-761d-4cac-b269-854ac5f1ae96CooperHawkhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=CooperHawkPrivately check for updatesHi. I have a program with commercial uses. Currently I have email out updates. I would prefer that when the program loads, it searches for updates either from the web or I was toying with the idea of creating a file host server. I want the program to search for updates without opening a web browser, however (giving anyone power to email out a free download link).<br/> I think of the way Digsby opens, checking for updates, or gimp. This is what I want.<br/> Anyone have ideas on how to accomplish this?<hr class="sig">I seek not answers, but understanding, that I may not solve, but learn. What good is a fish without the skill to catch it?Thu, 26 Nov 2009 05:13:31 Z2009-11-29T04:45:15Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/83d1aebf-1193-4778-8e81-d5e84618a7fehttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/83d1aebf-1193-4778-8e81-d5e84618a7fenemesiscsharphttp://social.msdn.microsoft.com/Profile/fr-FR/?user=nemesiscsharpHow set up a new value to my variableThe problem is i cant get the incremented number..<br/> <br/> <pre>ErrorNum = 1 If TextBox1.Text = &quot;Hello&quot; And TextBox2.Text = &quot;Haha&quot; Then MsgBox(&quot;Correct Password!&quot;) Else MsgBox(&quot; You have &quot; + CStr(ErrorNum) + &quot; Attempts already. System Exit!&quot;, MsgBoxStyle.Critical, &quot;&quot;) TextBox1.Text = &quot;&quot; TextBox2.Text = &quot;&quot; ErrorNum = ErrorNum + 1 If ErrorNum = 3 Then Close() End If</pre>Sun, 29 Nov 2009 04:15:15 Z2009-11-29T04:38:16Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/c2708541-d273-4916-977b-dbd4f6866802http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/c2708541-d273-4916-977b-dbd4f6866802nemesiscsharphttp://social.msdn.microsoft.com/Profile/fr-FR/?user=nemesiscsharpHow to close an application in visual basicIt seems like whenever i click my close button the application will close but the debugger is still in active.<br/> <br/> How to exit this debugger? :)Sun, 29 Nov 2009 04:05:05 Z2009-11-29T04:16:51Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/bade7195-1e70-44bf-ba81-3e525c94a025http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/bade7195-1e70-44bf-ba81-3e525c94a025JerryCichttp://social.msdn.microsoft.com/Profile/fr-FR/?user=JerryCichow to re-load the my.settings values from the config file?HI!<br/><br/>I hope this is simple.<br/>I would like to tweak some of the numbers in the app.exe.config file while the program is running. I would like my program to re-load those valued from the edited txt file.<br/><br/>I have tried my.settings.reset, reload, and upgrade. None of these seem to reload the values from the config file into the program<br/><br/>vs 2005<br/>vb.net<br/><br/>How can i get my program to re-read the config file into its memory once it is up and running. say when a button is clicked?<br/><br/>Thank you<br/>Jerry C<br/>Sun, 29 Nov 2009 01:14:13 Z2009-11-29T03:54:34Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/bd2e85e9-aa65-469a-89df-8bbed525c0f1http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/bd2e85e9-aa65-469a-89df-8bbed525c0f1Mark103http://social.msdn.microsoft.com/Profile/fr-FR/?user=Mark103menuitems not working when clicking on shockwaveWhat a ____ a$$hole this forum is...<br/>Tue, 10 Nov 2009 00:14:28 Z2009-11-29T03:33:53Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/d29abec7-7a5e-450b-815b-da1343eab19bhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/d29abec7-7a5e-450b-815b-da1343eab19bMark103http://social.msdn.microsoft.com/Profile/fr-FR/?user=Mark103contextmenu item not working PLEASE HELP! <span class=body>Hi guys, <br/> <br/> I have a form with contextmenu where you can get the menu items on shockwave. I uses the menu items event to get the method of working when clicking them on shockwave by using right-mouse button. When I debug the project and when I clicked on testmenu item, nothing have happens. <br/> <br/> <br/> <br/> Form Code: <br/> <br/> <br/> <small><strong>Code:</strong> </small> <div><br/> <pre><span>Public Class Form1<br/> <br/> Private Sub testmenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles testmenu.Click<br/> MessageBox.Show(&quot;this is the test!&quot;)<br/> End Sub<br/> End Class </span> <br/> </pre> <br/></div> <br/> <br/> <br/> <br/> Class Library: <br/> <br/> <br/> <small><strong>Code:</strong> </small> <div><br/> <pre><span>Public Class ShockwaveMenu<br/> Inherits AxShockwaveFlashObjects.AxShockwaveFlash<br/> Private Const WM_RBUTTONDOWN As Integer = &amp;H204<br/> <br/> Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)<br/> Select Case m.Msg<br/> Case WM_RBUTTONDOWN<br/> Form1.ContextMenu1.Show(Me, PointToClient(Cursor.Position))<br/> m.Result = New IntPtr(1)<br/> Return<br/> End Select<br/> MyBase.WndProc(m)<br/> End Sub<br/> End Class </span> <br/> </pre> <br/></div> <br/> Please can you tell me why it doesn't do anything when I click on testmenu item?? And please can you help me to get this fix by when I click the point on shockwave to get the contextmenu items then click them to get the menuitems fully in working order?? <br/> <br/> <br/> <br/> <br/> Thanks, <br/> Mark</span>Tue, 10 Nov 2009 22:02:33 Z2009-11-29T03:22:13Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7f788871-7823-4571-9165-299e6cc3180ahttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7f788871-7823-4571-9165-299e6cc3180a•.trujade.•http://social.msdn.microsoft.com/Profile/fr-FR/?user=%u2022.trujade.%u2022earning my medals<strong>i can not wait till the day i receive my second medal. (sighs) and i intend to receive it for the points by means of my answers.</strong> <br/> <br/> recently, i did some searching on the forum members, to view their points and medals and such, and i stumbled upon some disturbing stuff.<br/> what i found out, is that you can post 1,000 or so posts, no answers, and get points and medals.  msdn, i'm not agreeing with such. (so don't spam my email, i was just kidding).  ;o)<br/> no, really.. and out of those 1,000 posts, maybe one or two were answered.  and probably by a moderator, not the op.<br/> should this be normal, or did i just give some of you guys ideas on how to cheat your way to getting a full medal jacket?<br/> <br/> trujade...<br/> <hr class=sig> help out microsoft for helping you.. test run <a href="http://www.microsoft.com/windows/windows-7/download.aspx"><img src="http://www.microsoft.com/windows/Framework/images/logo_windows.gif" alt="" width=75 height=19> <span style="font-size:small"> 7</span> </a> <br/> <br/> ----------------------------------------------------------------------<br/> <strong>posted this edit on: 8/12/o9<br/> --------------------------------------------<br/> EDIT::<br/> THIS POST WAS MARKED AS ABUSE BY THE MEMBER JUNNER2OO3, EARL TUT, now, nowhere to be seen..<br/> this i know of, because of a thread (posts were sent back and forth, that were eventually deleted) where i had a conflict with the above M.I.A. member, and he proudly brought the mention of marking this thread as abuse..  i cannot see the reason, other than making it more visible.. lol..<br/> if you want a good example, view the end of &quot;<em>Proposing an answer</em> &quot; and how his replies are the only ones not marked, i am for certain, most were his, no answer was received....<br/> </strong> link for&quot; Proposing an answer &quot;:<strong><br/> </strong> <a href="http://social.technet.microsoft.com/Forums/en-US/Offtopic/thread/10114a0c-2f73-4c22-a011-59f0413d3903#eb978ab4-9107-4a36-ab20-77b9edc1fb54">http://social.technet.microsoft.com/Forums/en-US/Offtopic/thread/10114a0c-2f73-4c22-a011-59f0413d3903#eb978ab4-9107-4a36-ab20-77b9edc1fb54</a> <br/> <strong><br/> </strong> <br/> <br/> <a href="http://www.microsoft.com/windows/windows-7/download.aspx"> </a>Fri, 12 Jun 2009 12:48:18 Z2009-11-29T03:13:35Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/803c6b20-d557-400b-b8b0-fb3320a6ac14http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/803c6b20-d557-400b-b8b0-fb3320a6ac14777newby777http://social.msdn.microsoft.com/Profile/fr-FR/?user=777newby777code for single-answer multiple choice tests <div>I am struggling to write code for single-answer multiple choice tests (i.e. Choices A, B, C, D).  Does anyone know of any sample code?</div> <div> </div> <div>&lt;a href=http://mcatprep.yolasite.com/&gt;M Prep&lt;/a&gt; <div><a rel=nofollow href="http://mcatprep.yolasite.com/">http://mcatprep.yolasite.com/</a>&gt;</div> </div>Sat, 28 Nov 2009 22:28:30 Z2009-11-28T23:52:34Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/6a9e3416-dbf3-4526-af36-67cf600b5ddahttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/6a9e3416-dbf3-4526-af36-67cf600b5ddapersonajehttp://social.msdn.microsoft.com/Profile/fr-FR/?user=personajeI need help with the select statement using the where clause on oldbI'm using a select statement to select data from an Access DB but I'm using. I can select the data perfectly but when I use the Where clause it doesn't select any data and the data I'm looking is in the DB. I hope someone can help me, here is my code. <div><br/></div> <div> <div style="color:Black;background-color:White"> <pre> <span style="color:Blue">Dim</span> myconecction <span style="color:Blue">As</span> <span style="color:Blue">String</span> myconecction = <span style="color:Blue">My</span>.Settings.DataSource <span style="color:Blue">Dim</span> ConnectionString <span style="color:Blue">As</span> <span style="color:Blue">String</span> = <span style="color:#A31515">&quot;Provider=Microsoft.Jet.OLEDB.4.0;&quot;</span> &amp; _ <span style="color:#A31515">&quot;Data Source=&quot;</span> + myconecction + <span style="color:#A31515">&quot;;&quot;</span> <span style="color:Blue">Dim</span> AccessConnection <span style="color:Blue">As</span> <span style="color:Blue">New</span> System.Data.OleDb.OleDbConnection(ConnectionString) AccessConnection.Open() <span style="color:Blue">Dim</span> query <span style="color:Blue">As</span> <span style="color:Blue">String</span> = <span style="color:#A31515">&quot;SELECT Num, Name, Oponente, Color FROM Pareo WHERE Rnd = @Rnd AND Color = @Color&quot;</span> <span style="color:Blue">Dim</span> cmd <span style="color:Blue">As</span> <span style="color:Blue">New</span> OleDbCommand(query, AccessConnection) cmd.Parameters.AddWithValue(<span style="color:#A31515">&quot;@Rnd&quot;</span>, ronda) cmd.Parameters.AddWithValue(<span style="color:#A31515">&quot;@Color&quot;</span>, blancas) <span style="color:Green">'</span> <span style="color:Blue">Dim</span> da <span style="color:Blue">As</span> <span style="color:Blue">New</span> OleDb.OleDbDataAdapter(cmd) <span style="color:Blue">Dim</span> dt <span style="color:Blue">As</span> <span style="color:Blue">New</span> DataTable da.Fill(dt) DataGridView1.DataSource = dt </pre> </div> <br/></div>Sat, 28 Nov 2009 15:40:48 Z2009-11-28T23:10:53Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/974887ee-b417-48b4-8323-43fa099411b5http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/974887ee-b417-48b4-8323-43fa099411b5Alvin Kuiperhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=Alvin%20KuiperShout down a process<p align=left><font face=Arial size=2></font> </p> <p>Hi Is there a way to shout down Excel</p> <p align=left>not as appilcation but as a process </p> <p align=left>And from Visul basic</p> <p align=left> </p> <p align=left>It is because after i have shot down Excel 2007</p> <p align=left>it still runing as a process </p> <p align=left> </p> <p align=left> </p> <p align=left>Alvin</p> <p align=left> </p> <p align=left> </p> <p align=left> </p>Fri, 25 Apr 2008 20:43:32 Z2009-11-28T22:40:00Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/117f32da-a106-4167-b900-04285520a777http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/117f32da-a106-4167-b900-04285520a777DBISHhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=DBISHDataGridView comboboxI have a DataGridView that is bound to a table call &quot;GLMasters&quot;. One of the fields in the GLMasters is &quot;Statement&quot; that contains a 1 for Balance Sheet and 2 for Income Statement. There is another table called &quot;GLStatements&quot; that contains a statement number field and a statement name field. When I drop the GLMasters dataset on to the screen  it creates the &quot;Statement&quot; field as a textbox.  I am trying to change that to a combobox.  I edited the field and changed it to a combobox, selected my datasource of GLStatements dataset, set the display member to be the statement name from the GLStatements datasource, and set the value to be the statement number  from the GLStatements datasource.  When I save and run I get the following:<br/><br/>The following exception occured in the DataGridView:<br/>System.FormatException: DataGridViewComboBoxCell value is invalid.<br/><br/>What am I missing??Sat, 28 Nov 2009 14:40:47 Z2009-11-28T20:26:47Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/dba1a464-7daf-468d-8c36-19f8fa84a421http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/dba1a464-7daf-468d-8c36-19f8fa84a421Desktop46http://social.msdn.microsoft.com/Profile/fr-FR/?user=Desktop46Unable to drag from windows explorer to VB,Net in Windows 7I code to drag files from windows explorer to a listbox. The code works in XP and Vista, but not Windows 7. In Win 7 <br/><br/><span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Private</span></span><span style="font-size:x-small"> </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Sub</span></span><span style="font-size:x-small"> ListBox1_DragEnter(</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">ByVal</span></span><span style="font-size:x-small"> sender </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">As</span></span><span style="font-size:x-small"> </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Object</span></span><span style="font-size:x-small">, </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">ByVal</span></span><span style="font-size:x-small"> e </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">As</span></span><span style="font-size:x-small"> System.Windows.Forms.DragEventArgs) </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Handles</span></span><span style="font-size:x-small"> ListBox1.DragEnter <p>e.Effect = DragDropEffects.All</p> <font size=2> <p> </p> </font></span></p> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">End</span></span><span style="font-size:x-small"> </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Sub<br/><br/>does not respond. ??<br/><br/>Thanks for any help.<br/><br/>Frank</span></span></p>Sat, 28 Nov 2009 19:35:57 Z2009-11-28T19:54:35Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/a6edd9b4-61ac-4543-8691-1c997f0d5565http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/a6edd9b4-61ac-4543-8691-1c997f0d5565demushttp://social.msdn.microsoft.com/Profile/fr-FR/?user=demusdata acquisition sample appsi need to build a small data acquisition terminal in VB express 2008. it would be able to accept data packets on any serial port or USB virtual serial port. and to parse and send the data to excel.<br/><br/>anyone know of any source examples here or on the web i can look at to get me started?<br/><br/>thanksFri, 27 Nov 2009 10:56:26 Z2009-11-28T19:13:44Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/ba79b5db-0917-464d-a629-3c42699a48abhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/ba79b5db-0917-464d-a629-3c42699a48abjdrew62http://social.msdn.microsoft.com/Profile/fr-FR/?user=jdrew62trouble assigning parametersGot a problem getting this bit of code to work w/o errors.  The program tells me that the &quot;hourlyEmployee.GetGross&quot; part seen in the code below <em>has no parameters and its return type cannot be indexed</em> , but its not giving me any suggestions as to how to fix it.  But just below in the code snippet you'll see that it is working fine with the &quot;&quot;salariedEmployee.GetGross&quot; that is located below it in the code.<br/> <pre> Private Sub btnCalc_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalc.Click ' calculates and displays the gross pay lblGross.Text = CStr(CDbl(lstHours.Text) * CDbl(lstHours.Text)) Dim salariedEmployee As Salaried Dim dblAnnualSalary As Double Dim dblGross As Double Dim hourlyEmployee As Employee Dim dblHours As Double Dim dblRate As Double ' determine the selected radio button If radHourly.Checked Then ' calculate the gross pay for an hourly employee Double.TryParse(lstHours.SelectedItem.ToString, dblHours) Double.TryParse(lstRate.SelectedItem.ToString, dblRate) dblGross = hourlyEmployee.GetGross(dblHours, dblRate) Else ' calculate the gross pay for a salaried employee Double.TryParse(lstSalary.SelectedItem.ToString, _ dblAnnualSalary) salariedEmployee = New Salaried(txtNum.Text, txtName.Text, _ dblAnnualSalary) dblGross = salariedEmployee.GetGross End If </pre> Here's the exception detail, maybe that will help.<br/> <br/> <br/> System.NullReferenceException was unhandled<br/>   Message=&quot;Object reference not set to an instance of an object.&quot;<br/>   Source=&quot;XYZ Project&quot;<br/>   StackTrace:<br/>        at XYZ_Project.frmMain.btnCalc_Click(Object sender, EventArgs e) in C:\Documents and Settings\Jim\My Documents\Visual Studio 2008\Projects\VB2008\Chap11\XYZ Corporation Solution-Inheritance\XYZ Project\Main Form.vb:line 103    at System.Windows.Forms.Control.OnClick(EventArgs e)    at System.Windows.Forms.Button.OnClick(EventArgs e)    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)    at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)    at System.Windows.Forms.Control.WndProc(Message&amp; m)    at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)    at System.Windows.Forms.Button.WndProc(Message&amp; m)    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)    at System.Windows.Forms.Application.Run(Form mainForm)    at XYZ_Project.frmMain.Main() in C:\Documents and Settings\Jim\My Documents\Visual Studio 2008\Projects\VB2008\Chap11\XYZ Corporation Solution-Inheritance\XYZ Project\Main Form.Designer.vb:line 2    at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)    at System.Threading.ThreadHelper.ThreadStart()<br/>   InnerException: <br/> <br/> <br/> <br/> <br/> Can someone please give me a little help here, thanks in advance!<br/> <br/>Fri, 27 Nov 2009 03:53:44 Z2009-11-28T17:55:58Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7c6c857b-731e-4a48-be78-79fa7d82c92ehttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7c6c857b-731e-4a48-be78-79fa7d82c92eYehuda Tiramhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=Yehuda%20TiramEdit row works onlu on localhostHi,<br/>I am working on a project that has a gridview. When I test and debug the project on local machine everything works fine.<br/>I uploaded the project to the hosting server and tested it. Everything works as expected except in one gridview the Edit row link does not work. <br/>The same gridview works fine in the localhost.<br/>Any idea for a solution?<br/>Thanks<br/>YehudaSat, 28 Nov 2009 16:22:36 Z2009-11-28T16:22:36Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/9d80fa18-7c75-41b2-8e4f-f03f3c018e4chttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/9d80fa18-7c75-41b2-8e4f-f03f3c018e4cbert_paulushttp://social.msdn.microsoft.com/Profile/fr-FR/?user=bert_pauluscannot read special characters with streamreader/streamwriterto automate mailmerge function in word, i need to join different elements to complete the mailmergedatasource.<br/> In one of these file are words with special characters like é, ç, è, .... When openng these files for reading, streamreader transfoms the characters to unreadable signs.<br/> When i give a type to use to open like ASCII, Unicode, ... it works for one or tho characters but not for all. I have the same problem when the character is read correctly, with streamwriter output to a textfile. Word cannot read the textfile and ask to define which type of coding should be used. In most of the cases not all the characters can be converted to readable characters.<br/> <br/> Office 2007 is installed. How to resolve this problem?<br/> <br/> BertMon, 23 Nov 2009 10:29:51 Z2009-11-28T14:05:55Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/00856a28-de2c-4edc-af3f-aed523dfc6efhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/00856a28-de2c-4edc-af3f-aed523dfc6efsazd1http://social.msdn.microsoft.com/Profile/fr-FR/?user=sazd1how to start MS Sql server 2008 installed with vb express 2008I recently installed vb express 2008 and with that download i also installed Sql server 2008. Earlier i have been working in MS Access so i have no experience in SQL server. My first problem is how to start sql server. <br/>I can see only following <br/>Start&gt;All Programmes&gt;MS SQL server 2008&gt;Configuration Tools, Import and Export Data(32 bit)&gt;SQL server configuration Manager,SQL server Error and Usage Reporting,SQL server Installation Centre.<br/><br/>Moreover in Programme Files i have two folders : <br/>1. MS SQL SERVER and <br/>2. MS SQL SERVER COMPACT EDITION<br/><br/>Please advise me how to start to create a database in SQL server with Vb express 2008.<br/>ThanksSat, 28 Nov 2009 11:41:54 Z2009-11-28T13:35:18Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/d353c513-b1f5-4c12-a41b-7c69508463c0http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/d353c513-b1f5-4c12-a41b-7c69508463c0Donslshttp://social.msdn.microsoft.com/Profile/fr-FR/?user=Donslshow to run a form in a console applicationI need to write a windows application that accepts parameters, so I guess the best way to do this is console applications. But I have one question, in my console application startup module I use the following code to show the form that I designed, but the application does not recognize Application.Run command. Could some one help. I tried adding the required dlls , but no luck. Is there any other way to show my form?<br/>Any help is greatly appreciated.<br/>Following is the code I am using.<br/><br/>Dim frm As New Form1<br/>Application.Run(frm)<br/><hr class="sig">donslsFri, 27 Nov 2009 15:04:04 Z2009-11-28T13:25:06Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/235a6e9c-5d9e-4c07-8273-e51f6093c7d9http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/235a6e9c-5d9e-4c07-8273-e51f6093c7d9Ww2nerdhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=Ww2nerdJump Lists in Visual BasicAre they possible? I'd like to know how to make them in VB apps if possible.<hr class="sig">&quot;Victory is difficult to see beyond the devestation incurred in its pursuit.&quot;Sat, 28 Nov 2009 02:56:15 Z2009-11-28T09:04:57Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7d4a1041-d388-4939-a6fb-36e0c14e58cfhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7d4a1041-d388-4939-a6fb-36e0c14e58cftattoohttp://social.msdn.microsoft.com/Profile/fr-FR/?user=tattooHiw to get a List of PrintersWhen you go to the Start button and then &quot;Printers and Faxes&quot; and you see a list<br/>of the printer objects defined on that PC.  In my App VB.Net app I want to be ale to <br/>use a drop down box to display this list of printers and allow the user to select one of them.<br/><br/>So, Not necessarily a list of printers on the Intranet that the user is connected to, only on their personal PC.<br/><br/>Anyone know how to do this ?<br/><br/>Thanks in advance<br/><br/>TattooSat, 28 Nov 2009 07:22:14 Z2009-11-28T07:33:39Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/bafc884e-d3b2-4cf5-8efb-845117514450http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/bafc884e-d3b2-4cf5-8efb-845117514450ismavhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=ismavSystem.Diagnostics.Process.Start("explorer.exe", serverpath) - fails after 2 attempts<span style="font-size:x-small"> <p>I am trying to use Process.Start to open a folder using explorer on the click of a window.<br/><br/>It works fine on the first two clicks of the button i.e. the folder is opened and on closing the windows and click on the button a third time gives the error message <br/><br/>&quot;the path &quot;C:\test&quot; is not found or is not a directory&quot;<br/><br/>If anyone has any info on how to solve it, please share..</p> <span style="font-size:x-small"> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Dim</span></span><span style="font-size:x-small"> myProcess </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">As</span></span><span style="font-size:x-small"> Process = </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">New</span></span><span style="font-size:x-small"> Process()<br/></span>ServerPath=&quot;C:\test&quot;<br/><br/>ServerPath =</p> </span></span><span style="color:#800000;font-size:x-small"><span style="color:#800000;font-size:x-small">&quot;&quot;&quot;&quot;</span></span><span style="font-size:x-small"> + ServerPath + </span><span style="color:#800000;font-size:x-small"><span style="color:#800000;font-size:x-small">&quot;&quot;&quot;&quot;<br/></span></span><span style="font-size:x-small">myProcess.StartInfo.UseShellExecute = </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">False  <br/></span></span><span style="font-size:x-small">myProcess.Start(</span><span style="color:#800000;font-size:x-small"><span style="color:#800000;font-size:x-small">&quot;explorer.exe&quot;</span></span><span style="font-size:x-small">, ServerPath)<br/><br/>I have tried both setting UseShellExecute to False and True<br/><br/>thanks</span>Sat, 28 Nov 2009 01:34:10 Z2009-11-28T07:19:16Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/c86ac08f-d963-4bca-925d-98175ab45810http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/c86ac08f-d963-4bca-925d-98175ab45810prasad_pbrhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=prasad_pbrthe connection cannt be used to perform this operation. It may closed or not valid in this context error in vb6Hi, <div><br/></div> <div>I have created a recordset  that reads data from text file. I want to store that data rows into sql server 2005 db. I am new to vb6. I dont know where I am doing mistakes. Its not working properly. I am working with this issue for four days. Please help me . Below is my code.</div> <div><br/></div> <div> <div><br/></div> <div><br/></div> <div>' Write records to Database</div> <div>    </div> <div>    frmDNELoad.lblStatus.Caption = &quot;Loading data into database......&quot;</div> <div>    Call FindServerConnection_NoMsg</div> <div>    </div> <div>    Dim lngRecCount As Long</div> <div>    lngRecCount = 0</div> <div>    rcdDNE.MoveFirst</div> <div>    </div> <div>     With cmdCommand</div> <div>        .ActiveConnection = objConn</div> <div>        .CommandText = &quot;insert into t_DATA_DneFrc (RTN, AccountNbr, FirstName, MiddleName, LastName, Amount) values ('&quot; &amp; rcdDNE(&quot;RTN&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;AccountNbr&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;FirstName&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;MiddleName&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;LastName&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;Amount&quot;) &amp; &quot;')&quot;</div> <div>        .CommandType = adCmdText</div> <div>    End With</div> <div>    </div> <div>    Set rcdReclamation = New ADODB.Recordset</div> <div>    With rcdReclamation</div> <div>        .ActiveConnection = objConn</div> <div>'       .Source = &quot;insert into t_DATA_DneFrc (RTN, AccountNbr, FirstName, MiddleName, LastName, Amount) values ('&quot; &amp; rcdDNE(&quot;RTN&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;AccountNbr&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;FirstName&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;MiddleName&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;LastName&quot;) &amp; &quot;', '&quot; &amp; rcdDNE(&quot;Amount&quot;) &amp; &quot;')&quot;</div> <div>        .CursorType = adOpenDynamic</div> <div>        .CursorLocation = adUseClient</div> <div>        .LockType = adLockOptimistic</div> <div>        .Open cmdCommand</div> <div>    End With</div> <div><br/></div> <div>    Do Until rcdDNE.EOF</div> <div>        lngRecCount = lngRecCount + 1</div> <div>        frmDNELoad.lblStatus.Caption = &quot;Adding record &quot; &amp; lngRecCount &amp; &quot; of &quot; &amp; rcdDNE.RecordCount &amp; &quot; to database.&quot;</div> <div>        frmDNELoad.Refresh</div> <div>        DoEvents</div> <div>        Call CommitNew</div> <div>        rcdDNE.MoveNext</div> <div>    Loop</div> <div>    </div> <div>    frmDNELoad.lblStatus.Caption = &quot;DNE Processing Complete.&quot;</div> <div>    frmDNELoad.Refresh</div> <div>        </div> <div>End Function</div> <div>Sub CommitNew()</div> <div><br/></div> <div>'     Add records to DneFrc table</div> <div>    With rcdReclamation</div> <div>        .Requery</div> <div>        .AddNew</div> <div>        .Fields![RTN] = rcdDNE.Fields![RTN]</div> <div>        .Fields![AccountNbr] = rcdDNE.Fields![AccountNbr]</div> <div>        .Fields![FirstName] = rcdDNE.Fields![FirstName]</div> <div>        .Fields![MiddleName] = rcdDNE.Fields![MiddleName]</div> <div>        .Fields![LastName] = rcdDNE.Fields![LastName]</div> <div>        .Fields![Amount] = rcdDNE.Fields![Amount]</div> <div>        .Update</div> <div>    End With</div> <div><br/></div> <div>End Sub</div> <div><br/></div> <div>****************************connection string code*******************************************</div> <div><br/></div> <div><br/></div> <div><br/></div> <div> <div>Option Explicit</div> <div><br/></div> <div>Public objConn As ADODB.Connection</div> <div>Public objCommNoParmSP As ADODB.Command</div> <div>Public objCommSQLText As ADODB.Command</div> <div>Public objCommCntlNbr As ADODB.Command</div> <div>Public strDBServer As String</div> <div><br/></div> <div>Sub InstantiateConnection()</div> <div>    Set objConn = New ADODB.Connection</div> <div>    objConn.CommandTimeout = 0</div> <div>    objConn.ConnectionTimeout = 60</div> <div>    </div> <div>    'Server Connection</div> <div>    objConn.ConnectionString = &quot;Provider=SQLOLEDB.1; Server=&quot; &amp; strDBServer &amp; &quot;; User ID=RS_DNE; Password=welcomers_dne; Initial Catalog=NORS&quot;</div> <div><br/></div> <div>    objConn.Open</div> <div>    objConn.DefaultDatabase = &quot;NORS&quot;</div> <div>End Sub</div> <div><br/></div> <div>Sub ValidateConnection()</div> <div>    If objConn.State = 0 Then</div> <div>        objConn.Open</div> <div>    End If</div> <div>End Sub</div> <div><br/></div> <div>Sub InstantiateCommand_SP()</div> <div>    ' Creates a command object to be used when executing read-only stored</div> <div>    ' procedures with NO PARAMETERS.</div> <div>    Set objCommNoParmSP = New ADODB.Command</div> <div>    objCommNoParmSP.ActiveConnection = objConn</div> <div>    objCommNoParmSP.CommandType = adCmdStoredProc</div> <div>End Sub</div> <div><br/></div> <div>Sub InstantiateCommand_SQLText()</div> <div>    ' Creates a command object to be used when executing SQL statements.</div> <div>    Set objCommSQLText = New ADODB.Command</div> <div>    objCommSQLText.ActiveConnection = objConn</div> <div>    objCommSQLText.CommandType = adCmdText</div> <div>End Sub</div> <div><br/></div> <div>Function FindServerConnection_NoMsg() As String</div> <div>'--------------------------------------------------------------------------</div> <div>' Purpose:</div> <div>'               Gets the listing of possible server connection strings.</div> <div>'               Tries each one until it either succeeds or exhausts the</div> <div>'               list. Then prompts user to manually enter the connection</div> <div>'               string.</div> <div>' In:</div> <div>'               none.</div> <div>' Out:</div> <div>'               &quot;&quot; empty string, or valid path.</div> <div>' Created:</div> <div>'</div> <div>' Modified:</div> <div>'</div> <div>'--------------------------------------------------------------------------</div> <div>    Dim rcdClientPaths As ADODB.Recordset</div> <div>    Dim strDBTemp As String</div> <div>    Const CLIENT_UPDATE_DIR = &quot;\\PSGSPHX02\NORS\Rs\ClientUpdate\&quot;</div> <div>    </div> <div>    On Error Resume Next</div> <div>    ' If persisted recordset is not there, try and copy one down from</div> <div>    ' CLIENT_UPDATE_DIR.  If that can't be found, create a blank one</div> <div>    ' and ask the user for the server name.</div> <div>    Set rcdClientPaths = New ADODB.Recordset</div> <div>    ' Does it already exist locally?</div> <div>    If FileExists_FullPath(App.Path &amp; &quot;\&quot; &amp; &quot;t_PCD_ServerConnectionList.xml&quot;) = False Then</div> <div>        ' Can it be retrieved from CLIENT_UPDATE_DIR</div> <div>        If Dir(CLIENT_UPDATE_DIR &amp; &quot;t_PCD_ServerConnectionList.xml&quot;) &lt;&gt; &quot;&quot; Then</div> <div>            FileCopy CLIENT_UPDATE_DIR &amp; &quot;t_PCD_ServerConnectionList.xml&quot;, App.Path &amp; &quot;\&quot; &amp; &quot;t_PCD_ServerConnectionList.xml&quot;</div> <div>        Else</div> <div>            ' Creat a blank one.</div> <div>            With rcdClientPaths</div> <div>                .Fields.Append &quot;ServerConnection&quot;, adVarChar, 250</div> <div>                .Fields.Append &quot;Description&quot;, adVarChar, 50</div> <div>                .CursorType = adOpenDynamic</div> <div>                .LockType = adLockOptimistic</div> <div>                .CursorLocation = adUseClient</div> <div>                .Open</div> <div>                .Save App.Path &amp; &quot;\&quot; &amp; &quot;t_PCD_ServerConnectionList.xml&quot;, adPersistXML</div> <div>                .Close</div> <div>            End With</div> <div>        End If</div> <div>    End If</div> <div>        </div> <div>    ' Open the recordset</div> <div>    With rcdClientPaths</div> <div>        .CursorType = adOpenDynamic</div> <div>        .LockType = adLockOptimistic</div> <div>        .CursorLocation = adUseClient</div> <div>        .Open App.Path &amp; &quot;\&quot; &amp; &quot;t_PCD_ServerConnectionList.xml&quot;, , , , adCmdFile</div> <div>    End With</div> <div><br/></div> <div>    If rcdClientPaths.RecordCount &lt;&gt; 0 Then</div> <div>        ' try each one listed</div> <div>        rcdClientPaths.MoveFirst</div> <div>        Do Until rcdClientPaths.EOF</div> <div>            strDBTemp = TryConnection_NoMsg(rcdClientPaths.Fields![serverconnection])</div> <div>            If strDBTemp &lt;&gt; &quot;&quot; Then</div> <div>                FindServerConnection_NoMsg = strDBTemp</div> <div>                Exit Function</div> <div>            End If</div> <div>            rcdClientPaths.MoveNext</div> <div>        Loop</div> <div>        strDBTemp = &quot;&quot;</div> <div>    End If</div> <div>    </div> <div>    Do While strDBTemp = &quot;&quot;</div> <div>        If strDBTemp &lt;&gt; &quot;&quot; Then</div> <div>            strDBTemp = TryConnection_NoMsg(strDBTemp)</div> <div>            If strDBTemp &lt;&gt; &quot;&quot; Then</div> <div>                With rcdClientPaths</div> <div>                    .AddNew</div> <div>                    .Fields![serverconnection] = strDBTemp</div> <div>                    .Update</div> <div>                    .Save</div> <div>                End With</div> <div>                FindServerConnection_NoMsg = strDBTemp</div> <div>                Exit Function</div> <div>            End If</div> <div>        Else</div> <div>            Exit Function</div> <div>        End If</div> <div>    Loop</div> <div>End Function</div> <div><br/></div> <div>Function TryConnection_NoMsg(ByVal SvName As String) As String</div> <div>    On Error GoTo ErrHandle</div> <div>    ' If a server was provided, try to open a connection to it.</div> <div>    Screen.MousePointer = vbHourglass</div> <div>    Set objConn = New ADODB.Connection</div> <div>    With objConn</div> <div>        .CommandTimeout = 30</div> <div>        .ConnectionTimeout = 30</div> <div>        .ConnectionString = &quot;Provider=SQLOLEDB.1; Server=&quot; &amp; SvName &amp; &quot;; User ID=RS_Auth; Password=weLcomers_auth; Initial Catalog=NORS&quot; ' Test</div> <div>        .Open</div> <div>        .Close</div> <div>    End With</div> <div>    Set objConn = Nothing</div> <div>    TryConnection_NoMsg = SvName</div> <div>    Screen.MousePointer = vbNormal</div> <div>    Exit Function</div> <div>    </div> <div>ErrHandle:</div> <div>    TryConnection_NoMsg = &quot;&quot;</div> <div>    Set objConn = Nothing</div> <div>    Screen.MousePointer = vbNormal</div> <div>    Exit Function</div> <div>    </div> <div>End Function</div> </div> </div>Sat, 28 Nov 2009 02:57:12 Z2009-11-28T06:43:23Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7ffb501e-817d-4865-9145-051ad4485f2chttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/7ffb501e-817d-4865-9145-051ad4485f2cAlla2552http://social.msdn.microsoft.com/Profile/fr-FR/?user=Alla2552Save field without displaying it on the VB formI have a VB 2008 windows application that I'm working on; the data are stored in SQL. I have a lot of fields that user will need to fill out. Some fields that not displayed on the form are actual combination of few filled out fields. For example - user types in first name, middle name and last name in 3 separate boxes on the form and I'd like to combine those and assign it to the &quot;FullName&quot; field. I know it's duplicating the data but this FullName field would need to be merged into report as is in a different program. Another example - user will pick a data in combo box that is binded to a different table, but I need it to auto-populate 3 fields in the main form (those fields are not displayed). I know that I can actually add all those hidden fields on the form and assign calculated values based on user input and then everything is saved with built-in &quot;Update&quot; command. I was wondering if there is a way to specify those few calculated values as parameters and still use &quot;Update&quot; command without actually typing long Update command. I have over 400 fields - very lengthy command.. Hope it makes sense. Thanks!Mon, 23 Nov 2009 21:48:57 Z2009-11-28T06:12:29Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/4b1f945c-9b81-4bc8-a99a-50645aaef1e9http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/4b1f945c-9b81-4bc8-a99a-50645aaef1e9Devin B.http://social.msdn.microsoft.com/Profile/fr-FR/?user=Devin%20B.LINQ: How do I get the value of a known attriubute in LINQ?Hi, I'm writing a WPF app that will display severe weather alerts for an inputted zipcode. I'm using Weather Underground's <a href="http://wiki.wunderground.com/index.php/API_-_XML#AlertsXML">AlertsXML API</a> to get appropriate information. Where I'm getting hung up is getting the value of the count attribute of the alert element (as in the 2 from &lt;alert count=&quot;2&quot;&gt;) so that I can perform some logic with it. I've been looking over some of the documentation on it (such as <a href="http://msdn.microsoft.com/en-us/library/system.xml.linq.xattribute.aspx">this</a> ), as well as a completely unrelated implementation of LINQ in another project of mine. I can't get it to work. :(<br/> <br/> Obviously the XML is in a static layout, so what I'm asking is how I would go about getting <em>the value</em> of a specific attribute within a specific element in an XDocument.<br/> <br/> I've defined my document as follows:<br/> <pre lang=x-vbnet>'Loads the document Dim SevereDoc As XDocument SevereDoc = XDocument.Load(&quot;http://api.wunderground.com/auto/wui/geo/AlertsXML/index.xml?query=&quot; + zip.ToString)</pre> but beyond that, what I've tried isn't working.<br/>Sat, 28 Nov 2009 03:18:28 Z2009-11-28T04:14:59Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/41007525-2386-46c9-b09c-47c03795e6a4http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/41007525-2386-46c9-b09c-47c03795e6a4Hazelrahhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=HazelrahScrolling during drag and drop in a FlowLayoutPanel<p>Hello All!</p> <p>I am currently implementing a drag and drop feature to reorder a set of user controls that I have put in a flow layout panel.  I've turned off wrapping and the flow direction is from top to bottom.  Here's how I've implemented the drag and drop feature itself:</p> <p>UserControl_MouseDown event:<br/>1)  Get the mouse offset from the upper left corner of the UserControl<br/>2)  Remove the control being dragged from the FlowLayoutPanel and put it in the form<br/>3)  Calculate the rectangle relative to the form of the FlowLayoutPanel</p> <p>UserControl_MouseMove event:<br/>1) Using the mouse offset of the UserControl, figure out the UserControl's new location on the form<br/>2) if that location is outside of the FlowLayoutPanel's rectangle, change the calculation to move it to the edge of the FlowLayoutPanel<br/>3) Move the UserControl</p> <p>UserControl_MouseUp event:<br/>1) Find the underDrop control (the UserControl under the UserControl that's being dragged)<br/>2) Figure out if the dragging UserControl should go above or below underDrop<br/>3) Add the dragging UserControl to the FlowLayoutPanel and set it's index.</p> <p>This is working beautifully!  It reorders just fine.</p> <p>My issue is when there are more controls than will fit in the visible area.  I have AutoScroll set to True, so the scroll bar turns on.  When I drag a control to the bottom I turn on a timer that periodically adjusts FlowLayoutPanel.VerticalScroll.Value depending on if the UserControl is at the top of the FlowLayoutPanel or the bottom.</p> <p>When I move my mouse left or right, the UserControl (who's parent is the form) still gets moved left or right.  When this happens, FlowLayoutPanel.VerticalScroll.Value is reset to what it was before I started adjusting the scroll.  On top of that, even if I'm careful to move the mouse only up or down back inside the FlowLayoutPanel's rectangle, when the UserControl gets moved, FlowLayoutPanel.VerticalScroll.Value is reset again, so I can't drop it where I want to.</p> <p>Does anybody have any idea why move a control over the FlowLayoutPanel would reset the VerticalScrol.Value?  Is there a way to stop this? Is there a better way to scroll inside a FlowLayoutPanel?</p> <p>Thanks for any help!</p> <p>-Hazelrah</p>Fri, 27 Nov 2009 00:50:24 Z2009-11-28T01:46:26Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/81418af8-f92d-4b9f-9517-30f0bdc4a973http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/81418af8-f92d-4b9f-9517-30f0bdc4a973TMaxwellhttp://social.msdn.microsoft.com/Profile/fr-FR/?user=TMaxwellHow about a Windows 7 Media Center Add in Template and ExampleWhy do the c# guys get all the fun? I cannot believe after all the hype of .net framework and using any language that MS and the VB.NET team keep ignoring Media Center add ons for us VB guys.<br/><br/>Windows 7 is now out, please put something together for this and let the add ons start flowing from the VB world...<br/><br/>A template and an example app please.<br/><br/>It is high time MS and the VB team aid us in getting into the MCE world.Mon, 23 Nov 2009 05:13:19 Z2009-11-28T01:01:59Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/6d1afa2c-5a64-44cd-87b5-8802986f1cb5http://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/6d1afa2c-5a64-44cd-87b5-8802986f1cb5dnb64http://social.msdn.microsoft.com/Profile/fr-FR/?user=dnb64Log into website with vb.netHi, im useing vs 2008 and am trying to log into a website via vb.net and a windows form, without much luck, wondering if someone could point me i the right direction<br/> <br/> heres the html code of the website<br/> <br/> <div style="color:Black;background-color:White"> <pre><span style="color:Blue">&lt;</span> <span style="color:#a31515">form</span> <span style="color:Red">id</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;mainform&quot;</span> <span style="color:Red">class</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;loginBox&quot;</span> <span style="color:Red">name</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;mainform&quot;</span> <span style="color:Red">action</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;/external/login.action&quot;</span> <span style="color:Red">method</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;post&quot;</span> <span style="color:Blue">&gt;</span> <span style="color:Blue">&lt;</span> <span style="color:#a31515">input</span> <span style="color:Red">id</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;loginName&quot;</span> <span style="color:Red">class</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;textField&quot;</span> <span style="color:Red">name</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;loginName&quot;</span> <span style="color:Blue">/&gt;</span> <span style="color:Blue">&lt;</span> <span style="color:#a31515">input</span> <span style="color:Red">id</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;password&quot;</span> <span style="color:Red">class</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;textField&quot;</span> <span style="color:Red">type</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;password&quot;</span> <span style="color:Red">name</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;password&quot;</span> <span style="color:Blue">/&gt;</span> <span style="color:Blue">&lt;</span> <span style="color:#a31515">a</span> <span style="color:Red">id</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;loginButton&quot;</span> <span style="color:Red">class</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;round_button1&quot;</span> <span style="color:Red">href</span> <span style="color:Blue">=</span> <span style="color:Blue">&quot;javascript:document.getElementById('mainform').submit();&quot;</span> <span style="color:Blue">&gt;</span> Sign In<span style="color:Blue">&lt;/</span> <span style="color:#a31515">a</span> <span style="color:Blue">&gt;</span> </pre> </div> <span class="nodeLabelBox repTarget "><br/> <br/> and heres the vb.net code i have already<br/> <br/> </span> <div style="color:Black;background-color:White"> <pre><span style="color:Blue">Private</span> <span style="color:Blue">Sub</span> btnLogin_Click(<span style="color:Blue">ByVal</span> sender <span style="color:Blue">As</span> System.Object, <span style="color:Blue">ByVal</span> e <span style="color:Blue">As</span> System.EventArgs) <span style="color:Blue">Handles</span> btnLogin.Click WebBrowser1.Navigate(<span style="color:#a31515">&quot;https://secure.blah.blah/&quot;</span> ) lblStatus.Text = <span style="color:#a31515">&quot;Connecting to site....&quot;</span> <span style="color:Blue">End</span> <span style="color:Blue">Sub</span> <span style="color:Blue">Private</span> <span style="color:Blue">Sub</span> WebBrowser1_DocumentComplete(<span style="color:Blue">ByVal</span> pDisp <span style="color:Blue">As</span> <span style="color:Blue">Object</span> , <span style="color:Blue">ByVal</span> URL <span style="color:Blue">As</span> <span style="color:Blue">Object</span> ) WebBrowser1.Document.GetElementById(<span style="color:#a31515">&quot;loginName&quot;</span> ).SetAttribute(<span style="color:#a31515">&quot;Value&quot;</span> , txtUserN.Text) WebBrowser1.Document.GetElementById(<span style="color:#a31515">&quot;password&quot;</span> ).SetAttribute(<span style="color:#a31515">&quot;Value&quot;</span> , txtUserP.Text) WebBrowser1.Document.GetElementById(<span style="color:#a31515">&quot;loginButton&quot;</span> ).InvokeMember(<span style="color:#a31515">&quot;Click&quot;</span> ) <span style="color:Blue">End</span> <span style="color:Blue">Sub</span> </pre> </div> IT doesnt fill in the text boxes on the website or click the button, i think it has something todo with this &quot;&lt;form id = &quot;mainform&quot; and maybe the click isnt working because of the java script? im not sure just guessing, iv googled but am still having difficulty getting it working<br/> <br/> any help would be much appriciatedFri, 27 Nov 2009 16:13:35 Z2009-11-28T00:46:12Zhttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/c4d1482c-20e5-4ff4-a561-579e9651354ehttp://social.msdn.microsoft.com/Forums/fr-FR/vbgeneral/thread/c4d1482c-20e5-4ff4-a561-579e9651354eGuyJoshttp://social.msdn.microsoft.com/Profile/fr-FR/?user=GuyJosRespond to data from a local network portI am writing some software that should respond to commands from a port.<br/><br/>How do I set up a handler to respond when data is recieved at that port.<br/><br/>Do I need to do anything special, like respond or set up the port in the first place.<br/><br/>I don't have any experience doing anything like this!<br/><br/>Cheers<hr class="sig">Guy Joseph - Intel Quad Q9450, 4Gb Ram, 3x500GB Hard Drives, NVidia 8800GT, Marian Marc 8, VB Express 2008Fri, 27 Nov 2009 23:14:39 Z2009-11-27T23:14:40Z