Chopper1980 Posted April 12, 2004 Posted April 12, 2004 I'm new to VB so was hoping for a bit of help... I have a Windows Form connecting to a SQL server database to insert new records etc.. When the new record is uploaded via an upload button i created, i want to have all the entries in the textboxes and pictureboxes on the form reset to their defaults.... Can anyone help with this Thanks Quote
wessamzeidan Posted April 12, 2004 Posted April 12, 2004 I think you have to do them manually, I mean something like textbox1.text="" Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
AlexCode Posted April 13, 2004 Posted April 13, 2004 Correct... There's no buitin method to do that... just code it... To make things faster to code you can use the For Each loops. Alex :p Quote Software bugs are impossible to detect by anybody except the end user.
Chopper1980 Posted April 13, 2004 Author Posted April 13, 2004 can you give me an example on how i can do that with a picture box.... i have a default picture in there when the program loads and i want that one to re-appear when the form is cleared.. no clue how to do that though Cheers Quote
AlexCode Posted April 13, 2004 Posted April 13, 2004 If the image is on disk you can: Dim pb As New PictureBox pb.Image.FromFile("your image file path") If it's on an imagelist: Dim pb As New PictureBox pb.Image = ImageList.Images(index) Alex :p Quote Software bugs are impossible to detect by anybody except the end user.
Chopper1980 Posted April 13, 2004 Author Posted April 13, 2004 cheers mate.. that worked a treat 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.