changing image inside a button

hi there,
i would like to change my display image inside a button when the button is clicked..how can i do it programatically?
for example:
a button with text "Log In" and image LogIn.ico, when clicked, it will change to text "Log Off" and LogOff.ico
can anyone please help me this beginner
thank you
[325 byte] By [tao84] at [2007-12-17]
# 1


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
With Button1
If .Text = "Start" Then
.Text = "Stop"
.BackgroundImage = Image.FromFile("c:\Started.jpg")
Else
.Text = "Start"
.BackgroundImage = Image.FromFile("c:\Stopped.jpg")
End If
End With
End Sub


Dustin.
Dustin_H at 2007-9-8 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
thx Dustin..it does help...however, how if i want to use a image from Resource folder of my project, what is my path...?
tao84 at 2007-9-8 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
You would use My.Resources....
Dustin_H at 2007-9-8 > top of Msdn Tech,Visual Basic,Visual Basic General...