Switch 2 images, Visual Basic Programming

I have a problem with Visual Basic:
exchangeable 2 images of place I have 2 picturebox''s placed a button
when I click on the button, the 2 pictures of this place change with every click.
My code is: Public Class Form1
Dim photo1, photo2 As Boolean
Private Sub Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Foto1 Dim As New Bitmap ("C: \ Users \ Anthony \ Dropbox \ VB \ 08 - shift algorithm \ wisselalgoritme/foto1.jpg")
PictureBox1.Image = photo1
PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
Foto2 Dim As New Bitmap ("C: \ Users \ Anthony \ Dropbox \ VB \ 08 - shift algorithm \ wisselalgoritme/foto3.jpg")
PictureBox2.Image = foto2
PictureBox2.SizeMode = PictureBoxSizeMode.StretchImage
end Sub

Private Sub BtnSwitch_Click (sender As System.Object, e As System.EventArgs) Handles BtnSwitch.Click
If PictureBox1.Left = Me.Width Then
PictureBox1.Left PictureBox1.Left = + 300
PictureBox2.Controls.Clear ()
Else
PictureBox1.Left PictureBox1.Left = - 300
end If
If PictureBox2.Left = Me.Width Then
PictureBox2.Left PictureBox2.Left = - 300
Else
PictureBox2.Left PictureBox2.Left = + 300
end If
end Sub
end Class

can you help me please?
Posted Date: 10/14/2012 12:02:59 PM | Location : United States







Related Discussions:- Switch 2 images, Assignment Help, Ask Question on Switch 2 images, Get Answer, Expert's Help, Switch 2 images Discussions

Write discussion on Switch 2 images
Your posts are moderated
Related Questions
While a run-time error takes place, the properties of the Err object are filled with information which uniquely identifies the error & information which can be used to handle it. I

ARCHITECTURE OF WIN 32 PROGRAM   Figure: working of Win 3 program The hardware events in the figure are the mouse associated events like the mouse move, left

write a v.net function called is vowel that returns true for vowel letters

How to pull ordered menu from a cash till to database or display on a computer screen

simple interest using flowchart and psuedocode using the formular s= x + nrx

Event-Driven Programming: The Event-driven programming allows the program to react to various inputs or events.   The action on a graphical component is an event. For il

Accelerators: The Accelerators are short cut keys. The Accelerators are formed by placing an ampersand before any of the characters of the Caption. As a product the letter fol

SDK PROGRAMMING The SDK programming is a developing Win 32 based programs using the Win 32 API that directly interact with the hardware. Therefore the execution of the SDK prog


I have an assignment In HCI , can anyone help me ?