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
Default Values for GDI Objects: The default color for the brush is white, pen is black, and default bitmap is null and the default font is system.

Write an event procedure to automate the billing system of a supermarket. Give the details of database tables, forms, controls and menu design (if any). Make assumptions, wherever

Visual Processing: Our mind groups the things into patterns and this allows us to process the visual information. Understanding and applying how the human mind processes the v

two sides are given of a sheet e.g 23*36 i want half or 1/2 of this sheet next i want 1/4(one fourth) of this sheet if sheet size is 23*36 next i want 1/8 similary as above

John''s gas supply is read from a 4-digit meter each month that shows the current total gas used in cubic meters. The amount of gas used that month is determined by subtracting t

Do While Loop Statement : The statements contained by the do...while loop block executes till the condition given in the while is true. The working of do...loop is elaborate

What are the differences between Property Get, Set and Let? Set - Value assigned to ActiveX Object from the form. Let - Value retried to ActiveX Object from the form. Get- Assigns

We will discuss scripting language; called VB Script. VBScript is Microsoft's scripting language. It enables us to write programs which enhance the power of Web pages by letting us

Tab Order: The tab order stands for the order in which the controls receive focus when the user clicks the tab key. The CTRL + D can be used to set the tab order of controls.

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.