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
The Refresh Method: The refresh method transfer to the first record in the record set. To invoke the refresh method follow the syntax which is as shown below: Form1.Data1.R

IMAGELIST The CImageList object is a collection of the same sized images, all of which can be referred to by its index. The ImageList are used to proficiently manage the large

The scope of a variable is finding out by where you declare it. While you declare a variable in a procedure, only code in that procedure can access or alter the value of that varia

Question 1 Create a VB application to make the text bold, italic, underlined and also color the text (using checkbox, option button, textbox controls) Question 2 Create a

i need to do my final project for my last year bsc honours degree in Business Information systems. I need to develop a system which is operational for hotel management system. th

i want to print number following pattern 1 12 123 1234

Restricting The Vocabulary: The properly formed vocabulary is like an inverted pyramid. All easy to learn communication system follow this pattern. The canonical vocabulary in

This is a member of Microsoft's Visual Basic family of development products. Other members comprise Visual Basic (Professional and Standard Editions) & Visual Basic for Application

I have a project due tomorrow that I am really struggling in. Please help.

A vehicle dealership has a number of different items for sale: motorbikes, cars, vans and boats. Each class of items for sale has different characteristics that need to be recor