Form - cannot select max button without control box 
Author Message
 Form - cannot select max button without control box

Israel:
This is normal behaviour.  To have the min/max buttons you must have a
control box.  If you disable the min/max selections in the control box
(thru WinAPI) the min/max buttons are disabled automatically.
--
Bob Kubelka, MCSD



Quote:
> I would like to have my form displaying the max button but not the
control
> box.

> What is happening is that when I select ControlBox=False, it doesnt
display
> neither the max nor the min buttons, even if I set them to true.

> Is this normal behaviour? I'm using VB5 and I have the impression this
> could be done in VB3.

> Thanks
> israel



Tue, 22 Feb 2000 03:00:00 GMT  
 Form - cannot select max button without control box

I would like to have my form displaying the max button but not the control
box.

What is happening is that when I select ControlBox=False, it doesnt display
neither the max nor the min buttons, even if I set them to true.

Is this normal behaviour? I'm using VB5 and I have the impression this
could be done in VB3.

Thanks
israel



Tue, 22 Feb 2000 03:00:00 GMT  
 Form - cannot select max button without control box

Quote:

> I would like to have my form displaying the max button but not the control
> box.

> What is happening is that when I select ControlBox=False, it doesnt display
> neither the max nor the min buttons, even if I set them to true.

One option is to set the form's MinButton = False which disables it but
still leaves the MaxButton and the Exit button available.

Then, in your Query_Unload event, examine the UnloadMode parameter.
If = vbFormControlMenu  (value = 0 - see Help) set Cancel = True.

This is a little kludgy, but will work until you locate a more elegant
solution.

Cheers,

Dan
--
Dan Carey -  Software Development            http://www.emb.co.uk

English Matthews Brockman - Actuarial Consultants, Epsom, England
-----------------------------------------------------------------



Wed, 23 Feb 2000 03:00:00 GMT  
 Form - cannot select max button without control box

Israel,

What you're wanting to do is a departure from Windows standards - that's
why it's not letting you do it.

If you're wanting to hide the control box just so they can't use the other
commands on the menu (ex. Close) then it's more accepted to subclass the
window and take control of the control box's menu. I think you're going to
have to so this anyway to achieve the hiding of the control box, so you
might as well seize control of the menu structure.

Check on the WM_SYSCOMMAND window message. I think that's one you'll need
to intercept.

--

Regards,

Kerry B. Rogers
End your DLL/OCX/VBX dependency nightmares!
http://www.pentone.com/mp32ad.htm



Fri, 25 Feb 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. MDI form without title bar, control box, max/min buttons

2. Parent MDI form without Min and Max Buttons?

3. Icon on a Form without max/min buttons

4. Disabling control box but not min/max buttons

5. Control Box, Max Button, MinButton

6. VBScript Newbie : Form Entry using a combo box without submit button

7. how to make a form appear without min,max and close option

8. MDI child form, Min and Max buttons

9. MDI Form Min/Max Button

10. Disabling Min and Max buttons on MDI Form

11. Max Button in MDI FORM

12. Disabling Min, Max, and Close buttons on MDI form

 

 
Powered by phpBB® Forum Software