By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,876 Members | 1,410 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,876 IT Pros & Developers. It's quick & easy.

Need to code a click event to toggle

P: n/a
I am using buttons on a toolbar and I want to use the buttons as toggles. When I click the button the first time I want my picture box to display by setting the picture box to visible. But I need to add a button click event that handles the second click to set the picture box to invisible. How do I do that? This is what I am thinking will help make it toggle. I am new to VB....does this make sense or is there a better way to handle this?
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
To toggle between setting the visable property false and true try in the
click event

if mypicturebox.visable=true then
mypicturebox.visable=false
else
mypicturebox.visable=true
end if

Niclas
"kimmie" <ki********@greenwaymedical.com> wrote in message
news:FA**********************************@microsof t.com...
I am using buttons on a toolbar and I want to use the buttons as toggles.

When I click the button the first time I want my picture box to display by
setting the picture box to visible. But I need to add a button click event
that handles the second click to set the picture box to invisible. How do I
do that? This is what I am thinking will help make it toggle. I am new to
VB....does this make sense or is there a better way to handle this?
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.