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

C#, I HAVE A C# ASSIGNMENT , WILL I FIND SOMEONE PROFESSIONAL HELP HERE ?

I HAVE A C# ASSIGNMENT , WILL I FIND SOMEONE PROFESSIONAL HELP HERE ?

Create an application for hospital management, 1.   Make project in Visual ...

1.   Make project in Visual Studio 2008. 2.   Controller Class is used for functioning. 3.   Login Form where three people can login like manager, staff and receptionist we c

To calculate rectangle, two sides are given of a sheet e.g 23*36 i want hal...

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

Properties of object method, Properties: VBScript Err Object ...

Properties: VBScript Err Object   Properties   Description   D escription Property The descriptive string related

Wage calculator and ta calculations, ( Wage Calculator with Tax Calculation...

( Wage Calculator with Tax Calculations) Develop an application that calculates an employee’s earnings, as shown in Fig. 4.23. The user should provide the hourly wage and number of

Programming, steps of connecting database from vb6.0

steps of connecting database from vb6.0

While loop - vbscript, In VBScript, the While...Wend statement is provided ...

In VBScript, the While...Wend statement is provided for those who are familiar along its usage. However, due to the lack of flexibility in While...Wend, it is suggested that you us

Vb code to run various iterations , What I understand from the assignment i...

What I understand from the assignment is I have to make the VB code in file nu1. xlsm generic, and run several iterations for Kc and Ti to find out the optimal combination which wi

External application window position, I have an external application I open...

I have an external application I open from visual studio (excel). I want to reposition where that opens (top, left).. How do I do that?

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