Switch 2 images, Visual Basic Programming

Assignment Help:
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?

Related Discussions:- Switch 2 images

Accelerators - intrinsic control, Accelerators: The Accelerators are s...

Accelerators: The Accelerators are short cut keys. The Accelerators are formed by placing an ampersand before any of the characters of the Caption. As a product the letter fol

Introduction to database applications , INTRODUCTION TO DATABASE APPLICATIO...

INTRODUCTION TO DATABASE APPLICATIONS   In this section, we define a dialog and tab order that is the order in which the controls will be navigated during the execution. The D

Variable scope, Variables must always be described with the smallest scope ...

Variables must always be described with the smallest scope possible. VBScript variables can have the given scope. Scope Where Variable is Declared

C#, i want to print number following pattern 1 12 123 1234

i want to print number following pattern 1 12 123 1234

Match Game, I would like someone to look at my code and tell me why it''s n...

I would like someone to look at my code and tell me why it''s not working

Vbscript error object clear method, Methods: VBScript Err Object ...

Methods: VBScript Err Object Clear Method Clears every property settings. Raise Method Generate a run-time error.

MATHEMATICS PROJECT, HOW TO SOLVE ORDINARY DIFFERENTIAL EQUETION IN VISUAL ...

HOW TO SOLVE ORDINARY DIFFERENTIAL EQUETION IN VISUAL BASIC PROGRAMMING

Illustration of ccolordialog, ILLUSTRATION OF CCOLORDIALOG The construc...

ILLUSTRATION OF CCOLORDIALOG The constructor of the CColorDialog takes the initial parameter as the default color and the next parameter specifies how much the dialog is displa

Visual interface design, VISUAL INTERFACE DESIGN Instead of the graphic...

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

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd