Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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

Software bugs are impossible to detect by anybody except the end user.
Posted

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

Posted

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

Software bugs are impossible to detect by anybody except the end user.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...