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
A variation on the If...Then...Else statement lets you to choose from various alternatives. By adding up Else If clauses expands the functionality of the If...Then...Else statement

what are the functions and the importance of hierarchy operators

GDI OBJECTS   The CDC provides 5 versions for the GDI objects. They are fonts, brushes, pens, bitmaps and regions. The Select Object function substitutes the current GDI objec

The View: The view is used for visualising. For illustration, while performing word processing, the user works on a sequence of words which compose the text. If a user is perf

ToolTip: The ToolTip property is used to flash a message regarding a control object when the mouse pointer moves over that object for a couple of seconds. Pick a control and c

GENETICS 1.         The branch genetics started in 1900 after rediscovery of Mendel's work. 2.         Gregor Johann Mendel is called Father of genetics. 3.         The t

Shopping Cart Purpose – Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for al

Explain difference, Generic Variable: Create Object Ex:-Ole-Automation . No need refer the object library. What is Specific Variable: Binding Procedure Early & Late Binding ( Can

Dialog Based Application: (A) Dialog Based Application to demonstrate Animate Control: 1. Build a dialog based application. 2. Design the dialog as shown. 3. Place

Cdatabase Class: The CDataBase class helps to connect to the data source. The Open member function opens a connection to the data source. CRecordset class is used for performi