Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 149,467 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,044 people online right now. Registration is fast and FREE... Join Now!




how to controling menustripitem by checkbox?

 
Reply to this topicStart new topic

how to controling menustripitem by checkbox?, vb.net 2005 & sqlserver2000

flodi
22 Jan, 2008 - 01:17 AM
Post #1

New D.I.C Head
*

Joined: 20 Jan, 2008
Posts: 10

hi
i have username and password form and i add in it 5 checkboxs each one for an item in a menustripitem in another form
question is: how can i change the enablity of the items in the menustripitems by checking the checkbox?
i try many code but the result was wrong
i write this code in the form that contain the menustrip whish let say form1:
CODE

if form2.checkbox1.checked=true then
MAINtoolstripmenuitem.enabled=true
else
msgbox("sorry u don't have permission to enter to the MAIN")
end if

CODE

if form2.checkbox2.checked=true then
USERSANDPERMISSIONStoolstripmenuitem.enabled=true
else
msgbox("sorry u don't have permission to enter to the USERSANDPERMISSIONS")
end if

i feel the code should be do it correct but it not coz when i click the MAINtoolstripmenuitem or USERSANDPERMISSIONStoolstripmenuitem it just give me the massage
please where is the wrong
thanks
User is offlineProfile CardPM
+Quote Post

flodi
RE: How To Controling Menustripitem By Checkbox?
24 Jan, 2008 - 05:46 AM
Post #2

New D.I.C Head
*

Joined: 20 Jan, 2008
Posts: 10

QUOTE(flodi @ 22 Jan, 2008 - 02:17 AM) *

hi
i have username and password form and i add in it 5 checkboxs each one for an item in a menustripitem in another form
question is: how can i change the enablity of the items in the menustripitems by checking the checkbox?
i try many code but the result was wrong
i write this code in the form that contain the menustrip whish let say form1:
CODE

if form2.checkbox1.checked=true then
MAINtoolstripmenuitem.enabled=true
else
msgbox("sorry u don't have permission to enter to the MAIN")
end if

CODE

if form2.checkbox2.checked=true then
USERSANDPERMISSIONStoolstripmenuitem.enabled=true
else
msgbox("sorry u don't have permission to enter to the USERSANDPERMISSIONS")
end if

i feel the code should be do it correct but it not coz when i click the MAINtoolstripmenuitem or USERSANDPERMISSIONStoolstripmenuitem it just give me the massage
please where is the wrong
thanks



any one to help?
i need that please
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 02:16PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month