I have a few picture in My.Resources in Vb.Net and I need a next and previous button to change the image . someone help me :)

Recommended Answers

Is this WinForms, WPF, WebForms, MVC?

Jump to Post

All 3 Replies

Is this WinForms, WPF, WebForms, MVC?

someone help me :)

you'll get lots of help if you provide detailed information and show us what you have so far and where you are having trouble.

Why don't you add two buttons one name it < Previous and another one name it Next > and start coding, since you know the location it will help to name your pictures something like img0, img1, img2, and so on so that it will be easy to open the previous and the next picture.

To do so you will need to perform the count and preview the image according to the count. Check this example:

 'Declare this as a Global variable
 Dim No As Integer

 ' Put this under the Next Button
 No = No + 1
 PictureBox1.Image='imageName & No

 ' Put this under the Previous button
 No = No - 1
 If No = 0 Then
 btnPrevious.Enabled = False()
 PictureBox1.Image='imageName & No

This is just an example on how to view pictures and switch around them. Before trying with images that's are within the MyResources try with one on your maybe Drive "D:\" or any drive.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.