hakari Posted November 30, 2003 Posted November 30, 2003 for .net is do you know the code to make a .txtbox get recorded when u click on a button? for ex. ________________ |_____blah_______| <--type in text box (1st step) ____________ |___Record___| <--click button (2nd step) 3rd step: creates a .txt file of that contains the word "blah" can u help me on this and is there a way to have forms loaded in a certain amount of time? like 1st frm, for 3 seconds, then hide and show 2nd frm.. etc Quote
*Experts* mutant Posted November 30, 2003 *Experts* Posted November 30, 2003 For writing to a file look into the System.IO.StreamWriter class. When you have the StreamWriter object ready, use the Write or WriteLine method and pass in the text of the TextBox to the method. When you are done writing don't forget to use the Flush() and Close() method, tomake sure everything is written to the file. For the form problem, do you want to just keep changing the forms every 3 seconds or do it for some number of forms and stop? Quote
hakari Posted November 30, 2003 Author Posted November 30, 2003 (edited) i wanted it to go to the 2nd form on the click of a button, stop for 3 seconds, then go to the 3rd form automatically, stop for 3 seconds, then msg box and go back to the 1st form and stop. and i put me.hide() form2.show() but form2.show() is underlined. whats wrong? 'Reference to a non-shared member requires an object reference.' Edited November 30, 2003 by hakari Quote
*Experts* mutant Posted November 30, 2003 *Experts* Posted November 30, 2003 For that code to work you would need to create a new instance of the form. Using its class name to identify will not work. Dim f2 As New Form2 f2.Show() Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.