Foro de Visual Basic GeneralQuestions and discussions not covered in the other VB forums such as Data and Setup. (Not for VB6 questions.)© 2009 Microsoft Corporation. Todos los derechos reservados.Mon, 30 Nov 2009 04:30:32 Z0f60fa48-1ceb-41ee-a10a-0dfcee7e19bdhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/e8be8262-a485-497e-a591-92b036fa4f8fhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/e8be8262-a485-497e-a591-92b036fa4f8froma_victahttp://social.msdn.microsoft.com/Profile/es-ES/?user=roma_victaAccessing Event viewer informationhi all, <div><br/></div> <div>Is there any way to access the event viewer information </div> <div><br/></div> <div>for example when you right click My Computer-&gt;Manage-&gt;Event Viewer</div> <div><br/></div> <div>we can see logs of recent activity. </div> <div><br/></div> <div>if i print any thing it will come on the log and it shows as user ,system, date and time etc </div> <div><br/></div> <div>and when you double click on it, it gives you the number of pages etc </div> <div><br/></div> <div>is there any way to get this application</div> <div><br/></div> <div>Thanks in advance</div> <div><br/></div> <div>Roma</div>Wed, 25 Nov 2009 13:45:24 Z2009-11-30T04:30:32Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/6a9e3416-dbf3-4526-af36-67cf600b5ddahttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/6a9e3416-dbf3-4526-af36-67cf600b5ddapersonajehttp://social.msdn.microsoft.com/Profile/es-ES/?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-30T04:20:22Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/e70aceee-ba83-4a4e-9459-a85fd7acd0d4http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/e70aceee-ba83-4a4e-9459-a85fd7acd0d4cLijohttp://social.msdn.microsoft.com/Profile/es-ES/?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-30T04:00:44Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/fc8450c5-31cf-4135-baf4-cfa842382e55http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/fc8450c5-31cf-4135-baf4-cfa842382e55cotoyhttp://social.msdn.microsoft.com/Profile/es-ES/?user=cotoyhow to open an image in my application to be a source?<p>Hello geniuses!<br/><br/>Im a new aspiring programmer.<br/><br/>my resources :<br/>VB Express 2008<br/>and its free packages :<br/>SQL Server Express Edition <br/>SQL Server Compact 3.5<br/><br/>OS: Vista Home Prem 64-bit<br/>Unit: Qosmio X305-Q705 (Laptop)<br/><br/>First of all is it possible to achieve my project with these limited resources i have?<br/><br/>I'm planning to create  a program like a database for reporting system (using database)<br/>where i can open an image and save that image as a source and bind to a certain record in my table then be displayed later on to my report.<br/><br/>Ill be stay in touch in this forum. <br/><br/>Thank u very  much in advance!<br/>cotz (i preferred this name but some took it, ^^,)<br/><br/><br/><br/><br/><br/></p>Thu, 26 Nov 2009 13:01:09 Z2009-11-30T02:50:50Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/5911bdf9-eacb-43b6-8f94-490e60f2f668http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/5911bdf9-eacb-43b6-8f94-490e60f2f668Toinkhttp://social.msdn.microsoft.com/Profile/es-ES/?user=ToinkMeasuring DataHi!<br/> <br/> Just want to ask if its possible for me to measure how many bytes of data does a device sent to my computer using vb.net? <br/> <br/> ThanksWed, 25 Nov 2009 07:50:03 Z2009-11-30T02:16:12Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/d353c513-b1f5-4c12-a41b-7c69508463c0http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/d353c513-b1f5-4c12-a41b-7c69508463c0Donslshttp://social.msdn.microsoft.com/Profile/es-ES/?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-30T02:10:01Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/35d637cc-4257-4ad9-99da-a34f307ada22http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/35d637cc-4257-4ad9-99da-a34f307ada22Anjo Georgehttp://social.msdn.microsoft.com/Profile/es-ES/?user=Anjo%20Georgemy personal desktopi want to make a a form when i send items in form as like as my desktopTue, 24 Nov 2009 10:55:36 Z2009-11-30T01:49:44Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/803c6b20-d557-400b-b8b0-fb3320a6ac14http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/803c6b20-d557-400b-b8b0-fb3320a6ac14777newby777http://social.msdn.microsoft.com/Profile/es-ES/?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-30T01:10:52Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/08d49c77-be9d-4b6c-a8dc-a643cac3613dhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/08d49c77-be9d-4b6c-a8dc-a643cac3613dStefano Gatto, Switzerlandhttp://social.msdn.microsoft.com/Profile/es-ES/?user=Stefano%20Gatto%2c%20SwitzerlandTo create a widget i need to show a form, but hide its icon on the taskbar. How do I do this?<p>I want to create a widget that stays on the screen. I noticed that existing widgets do not have any icon in the task bar, so I wonder how I can hide that icon. Can anyone help?</p>Sun, 29 Nov 2009 23:16:11 Z2009-11-30T00:46:49Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/17f236f0-474e-4bdc-867c-b31a7e7d33cahttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/17f236f0-474e-4bdc-867c-b31a7e7d33ca777newby777http://social.msdn.microsoft.com/Profile/es-ES/?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-30T00:54:50Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/f0bd0abc-6f5f-4ad4-94b0-0b2922267249http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/f0bd0abc-6f5f-4ad4-94b0-0b2922267249Ed_Whitehttp://social.msdn.microsoft.com/Profile/es-ES/?user=Ed_WhiteWindows 7 Task Scheduler problem<p>I'm upgrading from Windows XP 32-bit to Windows 7 64-bit, and I'm using VB in VS 2008.  Under XP, I used the Task Scheduler to run a program at 3pm every weekday, and it ran fine.  Now in W7, when the Task Scheduler runs the programs, it encounters an exception when it gets to the code MyForm.ShowDialog().  The error is:</p> <p>System.InvalidOperationException was unhandled<br/>  Message=&quot;Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.&quot;<br/>  Source=&quot;System.Windows.Forms&quot;<br/>  StackTrace:<br/>       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)<br/>       at System.Windows.Forms.Form.ShowDialog()<br/>       at CompaniesDB.MenuRun_Mod.ShowOutForm_Thread() in C:\Users\Ed\Documents\Visual Studio 2008\Projects\CompaniesDB\CompaniesDB\MenuRun_Mod.vb:line 504<br/>       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br/>       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br/>       at System.Threading.ThreadHelper.ThreadStart()<br/>  InnerException:</p> <p>When I run the program from a shortcut with the same parameters as in the Task Scheduler (i.e. the shortcut runs the .exe file with some paramters after it), it runs fine, so I'm guessing there is some setting in the Windows 7 Task Scheduler I need to set, but I can't find it.  I've tried checking &quot;Run with highest privledges&quot; (and unchecking it), but that didn't help.  I have tried it with the &quot;Hidden&quot; box unchecked and checked and that didn't help.  I've also tried it with &quot;Configure for&quot; set either way (Windows 7 or Vista).  So how do I get rid of this error?</p>Thu, 19 Nov 2009 22:48:20 Z2009-11-30T00:16:13Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/bab153ea-74a2-42e0-962e-89ec68b59475http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/bab153ea-74a2-42e0-962e-89ec68b59475Gavrohttp://social.msdn.microsoft.com/Profile/es-ES/?user=GavroI need a way to control what happens!Here is my problem:<br/> I use the webbrowser control to navigate to certain websites and login and retrieve some data. For that I created a sub for each website. On the form i have a button that calls every sub when clicked. The problem is that I don't know how to pause or stop the process once started. If I quit the program it will still run in the background until all calls complete. I tried to use a thread, but that doesn't go well with the webbrowser control.<br/> Any thoughts please? Keep in mind that I'm just starting with Visual Basic.net and if you want to help, go easy on me :)<hr class="sig">Proud tutorial creator for hackyourwindows.com :)Sun, 29 Nov 2009 18:00:54 Z2009-11-30T00:11:12Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/5839702a-b4c0-4984-9fe1-cafa62e3b95ahttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/5839702a-b4c0-4984-9fe1-cafa62e3b95aEd_Whitehttp://social.msdn.microsoft.com/Profile/es-ES/?user=Ed_White"The publisher could not be verified" for shortcutI installed Windows 7 64 bit with VS 2008 on my old PC (clean install, transferring my files from Windows XP), and also purchased a new PC and put the same on it.  On the old PC, I have programs in VB I've written, and I've created shortcuts to them.  When I click on the shortcuts on the old PC, they run fine.  I copied the VS Projects folder from my old PC to the new PC, similarly created shortcuts for the same programs on the new PC.  On the new PC, when I click on the shortcuts, it says &quot;The publisher could not be verified&quot;, and if I click &quot;Run&quot;, it runs but a window pops up saying there was a problem executing the program.  If I go directly to the bin folder for the program and click on the .exe file, it runs fine, but if I click on the shortcut, I get those problems.  Also, if I open the program in VS and run it, it runs fine.  <br/><br/>After researching this, I'm guessing that it may have something to do with the fact that the programs were copied over from another PC (i.e. from my old PC to the new one).  In the new PC, I've tried right-clicking on the shortcut and the .exe files to look at properties, and unchecked the &quot;Read-only&quot; box, and there's no other box for Security (see <a href="http://blogs.pcmag.com/securitywatch/2009/05/how_to_get_rid_of_vistas_this.php">http://blogs.pcmag.com/securitywatch/2009/05/how_to_get_rid_of_vistas_this.php</a> ), and I still have the problem.  Any suggestions?Mon, 16 Nov 2009 22:27:42 Z2009-11-29T23:56:43Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/2eacea91-072e-4634-b63e-50fcf99d2306http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/2eacea91-072e-4634-b63e-50fcf99d2306Rickz2Khttp://social.msdn.microsoft.com/Profile/es-ES/?user=Rickz2Kapp wont open my password protected access database :(hey guys/girls<br/><br/>I have an app with a password protected MS access database connected to it. lets say the password is &quot;123&quot;.<br/>when I run my app i get an error saying that the password is incorrect even thought its not.<br/>i have been readig around but am strugling to find a solution. <br/><br/>does anyone have some help for me please?<br/><br/>this is the line that causes the error:<br/><br/><span style="font-size:x-small"> <pre lang=x-vbnet>Me.Table1TableAdapter.Fill(Me.PassSafeMianDataSet.Table1)</pre> <br/>regards,<br/><br/>rich.</span>Sun, 29 Nov 2009 23:01:58 Z2009-11-29T23:01:58Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/3364ce78-b0ae-43de-885c-de7a386149a8http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/3364ce78-b0ae-43de-885c-de7a386149a8TheEndOfTimehttp://social.msdn.microsoft.com/Profile/es-ES/?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-29T22:11:10Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/d9b28fdc-4a86-4bad-b947-e69708aae426http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/d9b28fdc-4a86-4bad-b947-e69708aae426Resentfulhttp://social.msdn.microsoft.com/Profile/es-ES/?user=ResentfulUsing Regex(Regular Expressions)I'm needing to use Regex to find a dynamic text. It will always be found between the same things. <br/> <br/> Now, I'm sure that made little sense, so let me clarify. I have a rich text box full of text. I am needing to use a Regex method to find a certain string of that text that is always different. This string will be located between the same two pieces of text every time.<br/> <br/> For Example:<br/> <br/> If this is my string: <span class=attribute-name>id</span> =<span class=attribute-value>&quot;user_name&quot;</span> &gt;&lt;<span class=start-tag>img</span> <span class=attribute-name> style</span> =<span class=attribute-value>&quot;display: block;&quot; </span> <span class=attribute-name>usr</span> =<span class=attribute-value>&quot;resentful&quot;<br/> <br/> I need to find the text in between </span> <span class=attribute-name>id</span> =<span class=attribute-value>&quot;user_name&quot;</span> &gt;&lt;<span class=start-tag>img</span> <span class=attribute-name> style</span> =<span class=attribute-value>&quot;display: block;&quot; </span> <span class=attribute-name>usr</span> =<span class=attribute-value>&quot; and &quot;.<br/> <br/> Thank you for and help,<br/> <br/> Resentful<br/> </span> <span class=attribute-value><br/> <br/> </span>Sun, 29 Nov 2009 20:51:07 Z2009-11-29T21:34:23Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/6b807e48-6990-42b7-bbf7-a0c5e5b1e323http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/6b807e48-6990-42b7-bbf7-a0c5e5b1e323Lasha34http://social.msdn.microsoft.com/Profile/es-ES/?user=Lasha34how to change datetime variable in sql?how to change datetime variable in sql? I need  only time without date in textbox? <br/><br/>There's code:<br/><br/><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>Dim</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span> <p><span style="font-size:x-small"> connetionString </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">String</span></span></p> <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">Dim</span></span><span style="font-size:x-small"> cnn </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"> SqlConnection<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">Dim</span></span><span style="font-size:x-small"> cmd </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"> SqlCommand<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">Dim</span></span><span style="font-size:x-small"> sql </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">String</span></span></p> <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">Dim</span></span><span style="font-size:x-small"> reader </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"> SqlDataReader<font size=2> <p>connetionString =</p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;Data Source=.\sqlexpress;Initial Catalog=sk_db;Integrated Security=True&quot;</span></span></p> <span style="font-size:x-small"><font size=2> <p>sql =</p> </font></span> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;SELECT * FROM tb1&quot;</span></span></p> <span style="font-size:x-small"><font size=2> <p>cnn =</p> </font></span> <p><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"> SqlConnection(connetionString)<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">Try</span></span></p> <span style="font-size:x-small"> <p>cnn.Open()</p> <font size=2> <p>cmd =</p> </font></span> <p><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"> SqlCommand(sql, cnn) <p>reader = cmd.ExecuteReader()</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">While</span></span><span style="font-size:x-small"> reader.Read() <p>TextBox1.Text = reader(2)</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">While</span></span></p> <span style="font-size:x-small"> <p>reader.Close()</p> <p>cmd.Dispose()</p> <p>cnn.Close()</p> <font size=2> <p> </p> </font></span> <p><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">Catch</span></span><span style="font-size:x-small"> ex </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"> Exception<font size=2> <p>MsgBox(</p> </font></span></p> <p><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;Can not open connection ! &quot;</span></span><span style="font-size:x-small">)<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">Try<br/><br/>is any solution? <br/></span></span></p>Sun, 01 Nov 2009 11:19:29 Z2009-11-29T20:48:13Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/d05a40a8-5932-47d7-85ef-86abb6fac453http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/d05a40a8-5932-47d7-85ef-86abb6fac453PAUL stanleyhttp://social.msdn.microsoft.com/Profile/es-ES/?user=PAUL%20stanleyhow to remove numbers from a string<p>Hi there<br/>Could anyone tell the answer to this question:<br/>How can you remove number from a sting. The numbers could be anywhere in the sting and they could be any combination of numbers but would be together in the string. Ie abcdefg321hijk....<br/><br/>Any ideas ?<br/>Cheers.<br/>Paul</p>Sun, 29 Nov 2009 19:08:42 Z2009-11-29T21:14:15Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/f1db2abd-dbbe-4325-9285-08232487dcc1http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/f1db2abd-dbbe-4325-9285-08232487dcc1Rickz2Khttp://social.msdn.microsoft.com/Profile/es-ES/?user=Rickz2Kdatagridview seems to cause startup form to appear even after been hiden!Hi all!<br/><br/>I have a problem and its driving me nuts.<br/><br/>I have so far, 2 forms. 1 called regi.vb and the other called logon.vb.<br/><br/>I have created a DB with access and imported it into my application. What I am trying to do is startup with regi.vb and test to see if there are any entries into the DB and if so, hide the startup form(regi.vb) and show the login.vb form.<br/><br/>I have done a test and it loads regi.vb then I enter some details into the textboxes and then after clicking a button, it inserts the info from the textboxes into the DB. It then loads login.vb, which is fine, but then if i exit the app and reload it, it tests to see if there is anything in the DB and when it finds that there is, it reloads the bloody regi.vb(startup form)!!<br/><br/>So why, when it discovers that the DB is not empty, it re-opens the startup form??<br/><br/>I have used login.show()<br/>                  me.hide()<br/><br/><strong><span style="text-decoration:underline">Here is the code for the startup form (regi.vb)</span></strong><br/> <div style="background-color:white;color:black"> <pre><span style="color:blue">Public</span> <span style="color:blue">Class</span> regi <span style="color:blue">Private</span> <span style="color:blue">Sub</span> regi_Load(<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> <span style="color:blue">MyBase</span>.Load <span style="color:green">'TODO: This line of code loads data into the 'PassSafeMianDataSet1.Table1' table. You can move, or remove it, as needed.</span> <span style="color:blue">Me</span>.Table1TableAdapter.Fill(<span style="color:blue">Me</span>.PassSafeMianDataSet.Table1) <span style="color:blue">If</span> DataGridView1.Rows.<span style="color:blue">Count</span> - 1 &gt; 0 <span style="color:blue">Then</span> login.Show() <span style="color:blue">Me</span>.Hide() <span style="color:blue">ElseIf</span> DataGridView1.Rows.<span style="color:blue">Count</span> - 1 &lt;= 0 <span style="color:blue">Then</span> <span style="color:blue">End</span> <span style="color:blue">If</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> Button2_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> Button2.Click <span style="color:blue">End</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> Button1_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> Button1.Click <span style="color:blue">Me</span>.Table1TableAdapter.Insert(user.Text, pass.Text, email.Text) login.Show() <span style="color:blue">Me</span>.Hide() <span style="color:blue">End</span> <span style="color:blue">Sub</span> <span style="color:blue">End</span> <span style="color:blue">Class</span> </pre> </div> <br/><strong><span style="text-decoration:underline">And here is the code for the login.vb form</span></strong><br/><br/> <div style="background-color:white;color:black"> <pre><span style="color:blue">Public</span> <span style="color:blue">Class</span> login <span style="color:blue">Private</span> <span style="color:blue">Sub</span> Button1_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> Button1.Click <span style="color:blue">End</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> Form1_Load(<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> <span style="color:blue">MyBase</span>.Load <span style="color:blue">End</span> <span style="color:blue">Sub</span> <span style="color:blue">Private</span> <span style="color:blue">Sub</span> Button2_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> Button2.Click <span style="color:blue">End</span> <span style="color:blue">Sub</span> <span style="color:blue">Private</span> <span style="color:blue">Sub</span> Button4_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> Button4.Click <span style="color:blue">Me</span>.Hide() regi.Show() <span style="color:blue">End</span> <span style="color:blue">Sub</span> <span style="color:blue">End</span> <span style="color:blue">Class</span> </pre> </div> <br/>This only happens when i use the datagridview1<br/><br/>It seems to be overiding my me.hide() command !!!<br/><br/>Any help would be greatly appreciated.<br/><br/>Regards,<br/><br/>RichSun, 29 Nov 2009 18:49:14 Z2009-11-29T19:27:52Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/bf1d9b82-05d9-409c-bff6-4a95748a8520http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/bf1d9b82-05d9-409c-bff6-4a95748a8520Hilariushttp://social.msdn.microsoft.com/Profile/es-ES/?user=HilariusAccessing sql databaseHello, I've been building a program that accesses the data stored in currently an .mdf sql file. The program works perfectly on my computer where I connect to an sqlexpress 2005 server I've got, but when I try to run the program on a friend's computer it cannot open the database file. I've tried several routes to get the connection but it hasn't worked, this is my current code snippet:<br/> <div style="color:Black;background-color:White"> <pre><span style="color:Blue">Using</span> fileInput <span style="color:Blue">As</span> <span style="color:Blue">New</span> OpenFileDialog() <span style="color:Blue">Try</span> fileInput.ShowDialog() <span style="color:Blue">Dim</span> t <span style="color:Blue">As</span> <span style="color:Blue">String</span> = fileInput.FileName server = <span style="color:#a31515">&quot;Data Source=&lt;NAME&gt;\SQLEXPRESS;AttachDbFilename=&quot;&quot;&quot;</span> &amp; _&lt;br/&gt; t &amp; <span style="color:#a31515">&quot;&quot;&quot;;Database=dbname;Integrated Security=True&quot;</span> <span style="color:Blue">Catch</span> ex <span style="color:Blue">As</span> Exception MessageBox.Show(<span style="color:#a31515">&quot;Error reading file name&quot;</span> ) <span style="color:Blue">End</span> <span style="color:Blue">Try</span> <span style="color:Blue">End</span> <span style="color:Blue">Using</span> conn = <span style="color:Blue">New</span> SqlConnection(server) conn.Open() </pre> </div> <br/> The &lt;NAME&gt; replaces the server name it was given. I've used both AttachDBFilename and Initial Catalog, but neither seem to let my friend's computer access the server and database. I would be grateful for any help on this problem, would I have to download the express server onto my friend's computer to get it to work or is there something else I am unaware of?<br/> <br/> My original intention was to simply access the sql database, but I was unable to find a method for opening it without going through an sql server. Do I have to use a server or can the file simply be opened, or do I have to use a different database type to do such?<br/> <br/> Thanks for any help you can give me.Fri, 27 Nov 2009 21:59:15 Z2009-11-29T18:59:53Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/145f75e2-1d06-4574-afe1-fd2505dc4dd1http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/145f75e2-1d06-4574-afe1-fd2505dc4dd1dsprow58http://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/054bef3c-b602-409c-9985-86026ef4082fhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/054bef3c-b602-409c-9985-86026ef4082fShariqDONhttp://social.msdn.microsoft.com/Profile/es-ES/?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-30T01:41:11Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/b540120b-1904-44ad-9448-9695482aebdfhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/b540120b-1904-44ad-9448-9695482aebdfDJ PIPhttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/7ee25980-3630-4d8e-b341-08d686adae64http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/7ee25980-3630-4d8e-b341-08d686adae64Malangehttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/1cf3672a-9066-4a3e-9d22-d262f1d26e3dhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/1cf3672a-9066-4a3e-9d22-d262f1d26e3dWirehttp://social.msdn.microsoft.com/Profile/es-ES/?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/> </span></p> <p class=MsoNormal>Vscrolbars enabled:</p> <img src="http://img687.imageshack.us/img687/6707/exvscrollenabled.jpg" alt=""> <br/> <p class=MsoNormal>Vscrolbars disabled:<span lang=EN-US> </span></p> <img src="http://img504.imageshack.us/img504/5204/exvscrolldisabled.jpg" alt=""> <p class=MsoNormal><span lang=EN-US><br/> </span></p> <p class=MsoNormal><span lang=EN-US>Thanks</span></p>Sun, 29 Nov 2009 12:05:52 Z2009-11-29T13:09:16Zhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/65c5ed08-e522-4cd3-88ca-3627a5387d9fhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/65c5ed08-e522-4cd3-88ca-3627a5387d9ftmiller_15http://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/26cf1372-9236-4359-8c1a-6cb51198e65fhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/26cf1372-9236-4359-8c1a-6cb51198e65fGuyJoshttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/04977a34-7b9f-4869-805a-d80b2b43e3b3http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/04977a34-7b9f-4869-805a-d80b2b43e3b3SheenLimhttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/2da30313-639d-4dcd-abbe-2db988edf512http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/2da30313-639d-4dcd-abbe-2db988edf512trashr0xhttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/146349d9-761d-4cac-b269-854ac5f1ae96http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/146349d9-761d-4cac-b269-854ac5f1ae96CooperHawkhttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/83d1aebf-1193-4778-8e81-d5e84618a7fehttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/83d1aebf-1193-4778-8e81-d5e84618a7fenemesiscsharphttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/c2708541-d273-4916-977b-dbd4f6866802http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/c2708541-d273-4916-977b-dbd4f6866802nemesiscsharphttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/bade7195-1e70-44bf-ba81-3e525c94a025http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/bade7195-1e70-44bf-ba81-3e525c94a025JerryCichttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/bd2e85e9-aa65-469a-89df-8bbed525c0f1http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/bd2e85e9-aa65-469a-89df-8bbed525c0f1Mark103http://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/d29abec7-7a5e-450b-815b-da1343eab19bhttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/d29abec7-7a5e-450b-815b-da1343eab19bMark103http://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/7f788871-7823-4571-9165-299e6cc3180ahttp://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/7f788871-7823-4571-9165-299e6cc3180a•.trujade.•http://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/974887ee-b417-48b4-8323-43fa099411b5http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/974887ee-b417-48b4-8323-43fa099411b5Alvin Kuiperhttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/117f32da-a106-4167-b900-04285520a777http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/117f32da-a106-4167-b900-04285520a777DBISHhttp://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/dba1a464-7daf-468d-8c36-19f8fa84a421http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/dba1a464-7daf-468d-8c36-19f8fa84a421Desktop46http://social.msdn.microsoft.com/Profile/es-ES/?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/es-ES/vbgeneral/thread/a6edd9b4-61ac-4543-8691-1c997f0d5565http://social.msdn.microsoft.com/Forums/es-ES/vbgeneral/thread/a6edd9b4-61ac-4543-8691-1c997f0d5565demushttp://social.msdn.microsoft.com/Profile/es-ES/?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:44Z