View Full Version : Minimize to Taskbar using VB
Can anyone get me a script to minimize the form to the taskbar instead of the normal mode and also to disable the maximize and close! thanx
11-05-2004, 04:53 PM
Almost everthing that you have asked can be accomplished using the Form Properties in the object.
Set WindowState to Minimized.
Set MaxButton to False.
Set MinButton to False.
You can also add something like:
frmName.WindowState = 1 ' 0 = Normal; 1 = Minimized; 2 = Maximized
To your code, where frmName is the name of the form or object you wish to minimize.
As for trying to get rid of the close button. You cannot do that, however, what you can do is incorporate logic into your program that can be used to keep the program open or collect pertinant data, restart the program and import the pertinant data back into the program.
11-10-2004, 04:02 AM
Additionally you can use the API functions to send a message to the window causing it to 'iconify' as Microsoft puts it.
11-10-2004, 09:11 PM
If i understand what you are saying with the close/maximize button then you can set ControlBox to false but this will get rid of the minimize button aswell (dont know if you want this)
11-11-2004, 12:12 AM
You don't have to set the minimize button to false. You can leave it active if you choose...
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.