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!

About Minimise button

Status
Not open for further replies.

sidanshu

Programmer
Aug 21, 2001
29
CA
hi Experts there,
I am just trying to disable/enable the minimise button through code and use the property - Me.Minbutton = true
and get the error msg
Either Function is restricted or it uses an automation type not supported by VB.
Well if it works through properties box then what is the problem with code???
Please help
Thanks
 
To sdianshu

paulbent is correct (usually is I've noticed) but here's a hokey little workaround.

Private Sub Form_Resize()
If Me.WindowState = vbMinimized Then Me.WindowState = vbNormal
End Sub

You will see the window shrink down to minimized and then pop back up to normal size. Not the best of solutions but it does keep the window from minimizing.
 
Another way is to remove or disable the Minimize command in the form's system menu at run-time.

There's a code example at:


The example is for the close option but it gives the menu constant at the end for minimize and can be easily adapted.

Paul Bent
Northwind IT Systems
 
Thanks Paul and Golom - for ur help .I will try both solutions and hopefully get my work done.

sidanshu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top