Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable certain objects on a form at runtime?

Status
Not open for further replies.

cold25

Programmer
Feb 11, 2002
41
US
Hi. I have a VB6 program that when executed, opens a form with a "Go" command button on it, a "File" menu in the upper left (created with menu editor), and the "X" close button in the upper right of the title bar. The thing is, when I click the "Go" button, I want to disable the File menu and the "X" close button, to keep the user from being able to use them. When the Go button is clicked, the caption changes to "Stop" and this is the only button I still want the user to be able to use. If I set Form1.Enabled = False, that is no good, because this also disables the Stop button, which I do want the user to be able to use.
Any ideas how to make these things un-usable after Go is clicked? Any suggestions would be greatly appreciated. Thanks.
cold25
 
searching for "disable control box" shows the following thread

thread222-903646 which will point you in the right direction

for the menu... alter the enabled property from true to false

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top