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 ()
PictureBox1.Left PictureBox1.Left = - 300
end If
If PictureBox2.Left = Me.Width Then
PictureBox2.Left PictureBox2.Left = - 300
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
Enabling ODBC: 1. Select the control panel, programs, setting and then ODBC32 2. Double click on the ODBC32 3. The Settings for an operating system will take place. 4

outline and explain in detail any 10 applications of vb.net

WINDOWS PROGRAMMING The Windows programming is a developing application using the C and the native Win32 application interface (API) or C++ and the class libraries like Microso

STEPS TO CREATE A RECTANGLE IN THE CLIENT REGION 1. Generate a SDI application and name it as a brush. 2. Handle the WM_LBUTTONDOWN message for the CBrushView object id.

Check Box: The check box control takes the value as on or off or grayed. The grayed one is neither on nor off. The user can transform the setting of the grayed check box.

I need to design a logic for a program that allows a user to enter 15 numbers, then displays each number and its difference from the numeric average of the numbers entered

CONTROL STATEMENTS   The conditional expression uses a comparison operator that results in true or false value. If the comparison is valid the outcome is true, or else the out

Hungarian Notation: The Hungarian Notation was invented by Charles Simonyi from Microsoft. It is a naming convention. It is a reminder of the type of a variable. The Handles h

Software That Is Obscure: The Software hides the intensions, meaning and actions from the user. For illustration, if a user is asked whether a full installation, the custom in