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
VISUAL INTERFACE DESIGN Instead of the graphic nature of the program, only the visualness of the inter action is important. The program must not focus on the GUI. On the other

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

Function IsPalindrome(str) Dim iStart,iEnd,ctr,blnPalin str=trim(str) blnPalin=true iEnd=len(str) iCnt=round(iEnd / 2) iStart=1 for ctr=1 to cint(iCnt) if(mid(str,iEnd,

APPWIZARD   The Appwizard is a tool used for creating a project. It follows a series of steps to create a project. Steps Involved in Creating A Project: Step 1: Fr

MODELESS DIALOG The Dialog boxes are either modal or modeless. The modal dialog box should be closed (Unloaded or hidden) before you can continue the working with the rest of t

Using Loops to Repeat Code Looping let you to run a group of statements repeatedly. Some loops repeat statements till a condition are False; others repeat statements till a con

In this assignment, you will create an application that calculates and displays a customer's monthly cable bill. Your interface should look like this: Requirements:

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

Displaying the file Without Scrolling: To display a file follow the steps as shown below: 1. Generate a SDI application. 2. Type the coding as shown in the Serialize els

Scenario GetLoan is a new company that will provide a loan of money to individual members of the public.   There are two types of loan to be offered: Secured Loan wher