Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Prevent Minimizing

Hi everyone!

I wonder if it is possible to prevent a windows from minimzing (by the user and by the "minimize all" sytem command)?


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Prevent Minimizing?

Is it possible to prevent a program from beeing minimized? In my form I have taken away the minimize button. But, when I use the "Show Desk" icon near the Start Button it minimizes my program. Is it possible to prevent that?

//Andi. Newbie at VB6.

Prevent Minimizing To Desktop
Hi, im currently making a small dot in the middle of the screen for Counter-stike the problem is... when i try to play it will minimize to desktop, is there a way i can make it ignore being clicked and the click just go's to the application below?

How To Prevent Full Screen From Minimizing?

when there is a window in 'full screen' (not my app, another app, like windows
media player...) and I load my form, the app with the 'full screen' minimizes.
how can I make so that the 'full screen' window will remain full screen and
my form will run on top of it at the same time?


How To Prevent Full Screen From Minimizing?

I have a form that loads up on my command,
the problem is that if there is an active full screen window, it will minimize
back to its' regular position when I load my form.

how can I make it so that my form will still be visible, but will not shrink
the active full screen window?


Prevent Resizing And Minimizing An MDIForm
Hi all,

I want my application to use full screen; the user should not be able to resize the window. Unfortunately MDIForm does not support the control box property as a normal (SDI) form does.

Using API methods I managed to deactivate the resize button in the control box. Nevertheless I may activate resize mode by doubleclicking the title bar. Is there a way to prevent resizing (e.g. catching the double click event) ?

Minimizing MDI's
Yes, another thread on minimizing forms...I searched the forum, but couldnt find my answer. I found plenty of code examples such as this:

Private Sub Form_Resize()
If Me.WindowState = 1 Then MsgBox "Minimize"
End Sub

which works for single forms. But how can i get my entire MDI to minimize? the above code doesnt work. If there is a tutorial on the web, just direct me that way...i'll read it. Thanks!

Have a problem with compiled projects:
When i use the minimize button, I want it to show as an item on the taskbar, but it does not. It shows down in the left corner just above the tastbar. What's that about?!
Also, I don't just want it on the taskbar, I want it as a small icon down in the right corner of the taskbar, beside the clock, MSN icon, Outlook icon, etc.
I am certain it can be done, anyone have a clue?
Using VB 6.0

Minimizing Everything
anybody knows how to minimize evreything opened? like if I have C:windows
a hot key will minimize them all the opened folders...



I realise this has been asked about a million and one times but I can't seem to find what I want on the search. If someone could direct me to the appropriate place I'd be grateful.

I've got my application running a systray icon using systray.ocx but what I need is when the user minimizes the mdiform, it drops into the systray and disappears off the taskbar.

Like I said, a pointer in the right direction would be great!



Minimizing It..
I need to design a form that has a minimize button but the user can’t resize it.
When I put some code in resize event to size the form back to original size I get errors when minimizing it..
What shall I do?

Minimizing, Help!
how do you minimize to tray by clicking the actual minimze button on the form/window, not a command button.

i have a tray icon already there, i just sorta need it to be minimized invisble to the tray and be able to be maximized when clicked.

and i find it really hard!


Minimizing App
Hi, I need to open and minimize another program. I'm using:
'Launch File Minimized -> Not Minimizing
lretval = ShellExecute(0, "open", "0327000.exe", "", "D:Program FilesSolomon IVAP", SW_MINIMIZE)

'Get Handle
lhwnd = FindWindow(vbNullString, "Vendor Maintenance (03.270.00)")

'Try Again to Minimize -> Not Minimizing
Call Show Window(lhwnd, SW_MINIMIZE)

If I do this to something like Notepad, it works like a charm, but not on this program. What else can I use if a program doesn't respond to the API's that I tried?

Thanks in advance,

Help With Minimizing

what i have created is a tool application that is used to search on multiple search engines. It opens up search engines & searches for the criteria entered. What i am having trouble with is the minimizing. I want it to compact so just the title bar is visible, like this:


and when the mouse is put over any part of the program(including title bar), i want it to become big, like this:

Does anybody know a function that will cause this to happen. BTW form_mousemove doesnt work. I just want the program to become big again when the mouse passes over any part of the program, and then go small again when the mouse leaves it.(not when the program loses focus.)

Thanx all.

Stop Minimizing
i need to block users of my software from minimizing it (it has no border and it is full-screen), switching to another program via alt-tab or launching the start menu via the windows key. Is it possible?

Minimizing App On Clicking X
I need to know if this is possible. I don't see how I can differentiate between that, and the form being unloaded by a call to Unload. The UnloadMode in QueryUnload is 1 (initiated by code) when clicking on the X in the form.

The problem is, this is the main form for my systray app. So if someone clicks the X, the app stops. Is there any way around this other than making a new form to be the main form that doesn't ever become visible?


Minimizing DirectX
Whenever I Alt + Tab the game i'm creating, it dosn't go down to the task bar, it turns into a little minimized window above the start on the task bar. I'm having a mental block as how to get it to actually be in the taskbar, if someone could help me out I would greatly appreciate it.


Minimizing Outlook
I have a macro that opens outlook to send an e-mail with an excel attachment. I'm trying to make the macro as subtle as possible though, so I was wondering if there is a way to minimize outlook while the macro runs. Here is my code and thanks for any help.

Public objOutlook As Object
Public objNS As Outlook.NameSpace
Public objMsg As Outlook.MailItem
Public objRecipient As Outlook.Recipient

Sub SendEmail()
Dim count1 As Integer
count1 = 2

'Sets the objOutlook & objNS public variables to the user's Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
Set objNS = objOutlook.GetNamespace("MAPI")

'Gets the user's name from Outlook, finds just the first name & places that into
'a public variable (strCurrentUser) & puts the full name (First Last) into
'a public variable (strCurrentUserFull).
'Used in other processes
strCurrentUserFull = objNS.CurrentUser
intChar = InStr(1, strCurrentUserFull, ",")
strCurrentUser = mid(strCurrentUserFull, intChar + 2)
strCurrentUserFull = strCurrentUser & " " & Left(strCurrentUserFull, intChar - 1)

Set objMsg = objNS.Application.CreateItem(olMailItem)
With objMsg
'Adds main recipient
Do While Cells(count1, 1) <> ""
.Recipients.Add Cells(count1, 1).Value
count1 = count1 + 1
'Add CC recipient
'Set objRecipient = .Recipients.Add("Strype, Kathy")
'objRecipient.Type = olCC
If Cells(2, 3) <> "" Then
.Subject = Cells(2, 3).Value
Else: .Subject = "report search file"
End If
If Cells(2, 5) <> "" Then
.Body = Cells(2, 5).Value & Chr(10) & Chr(10) & .Body
intChar = InStr(1, .Body, Chr(10))
Else: .Body = "File is attached to this email." & Chr(10) & Chr(10) & .Body
End If
intChar = InStr(1, .Body, Chr(10))
.Attachments.Add "S:CLARKApplicationsfolder0105
eportsearch.xls", , _
intChar + 1
'.Attachments.Add strReportDrive & strReportDir & "WarehouseOdds.xls", , _
' intChar + 2
MsgBox "Email with reportsearch.xls attached has been sent", _
vbInformation, "Email Sent"
End With
Set objMsg = Nothing


End Sub

Minimizing Access
Is it possible to minimize or hide the MS Access main form when a different form is running so that the only thing that can be seen on the desktop is that specific form? So far I've tried playing around with the Application.Visible property, but I haven't had any success with it.


Maximizing And Minimizing
Can you maximize and minimize word documents using VBA?



Need Help Minimizing/maximizing
Ok I'm a complete noob to VB6 and I'm just making a simple exe file to go on my WoW install DVD, to organize all the other exe's on there.

I have most of it done, but I'm trying to get the file to minimize when another exe is brought up, and return when that exe closes.

This is what I have so far (on my command button):

Private Sub Command1_Click()
Dim RetVal

Form1.WindowState = 1 'Minimize window

If Option1.Value = True Then
RetVal = Shell("Installer.exe", 1)
End If

If Option2.Value = True Then
RetVal = Shell("WoW-2.0.3-enUS-patch.exe", 1)
End If

If Option3.Value = True Then
RetVal = Shell("wow-", 1)
End If

If Option4.Value = True Then
RetVal = Shell("WoW-FE 0.63.exe", 1)
End If

End Sub
What do I need to put in so the window comes back up after the selected exe, is finished with?

Not Minimizing Form
Im sure someone is just going to paste some code from allapi, but does anyone know how to make it so that your form wont get minimized when someone uses the show desktop, windows button + m, etc... thanks in advance.

Minimizing All Forms
How can i minimize all forms when i do something.
Specificly i am opening a new form up, and i would like to minimize all the other forms that are open.

i think i have seen it somewhere, but i cant find out how to do it anymore.

Minimizing Windows

How can I detect another visible window's minimizing?


Minimizing Form
I have a program that I would like to minimize without using the max min and exit buttons that come with the form, I was hoping that there was a command that could minimize your project without using the min button at the top. Thank You

Minimizing Progs
Hi all!

can some one tell me what is the code or the option to minimize the prog to the small window in the right side?
you know... where the volume is and other stuff!

Minimizing To The Tray
Does anyone know the code out there on how to minimize a program to the tray. If you know it please post it!

Minimizing Problems
I have created a helper program for my AOL account. The problem is when AOL is minimized my program doesn't work, or sometimes it does but doesn't work properly. Is there special code to write into my program that will allow it to work with another program even when the other program is minimized. I'm also wondering is the problem happening because my program is unable to find the windows it is looking for?


Minimizing Issue
I want my game to always be in a maximized or minimized form, so i disabled the maximize button and set the WindowState property to maximized, so WindowState should never be 0. Problem is, when i doubleclick the whatsitcalled... form caption, the window goes back to normal size. I can trap it by putting
If Me.WindowState = 0 Then Me.WindowState = 2
in the resize event, but that looks really ugly, as the window first becomes normal-size then maximized. How do i disable the double-clicking on the form caption, or trap the event before it sets WindowState to 0?

Minimizing Forms
i want to minimize forms, and that is not so hard (just set the appropiate properties of the form), but i'm using a mdi parent/child consteuction, so my minimized forms have a tendecy to disappear behing others, which is not so bad (actually, i found it's not really avoidable without a _lot_ of trouble) but i want the user to be able to use the alt+tab functionality of windos, which i'm not allowed

i've looked it up in the help, but it only says i should set ShowInTaskbar Property to true, which does NOT work.

does anybody know a way to make this work?


Minimizing Problem
i have a buton and i wana make it to minimize my app . How can i do this ??

Help Minimizing/maximising
Ok I'm a complete noob to VB6 and I'm just making a simple exe file to go on my WoW install DVD, to organize all the other exe's on there.

I have most of it done, but I'm trying to get the file to minimize when another exe is brought up, and return when that exe closes.

This is what I have so far (on my command button):

Private Sub Command1_Click()
Dim RetVal

Form1.WindowState = 1 'Minimize window

If Option1.Value = True Then
RetVal = Shell("Installer.exe", 1)
End If

If Option2.Value = True Then
RetVal = Shell("WoW-2.0.3-enUS-patch.exe", 1)
End If

If Option3.Value = True Then
RetVal = Shell("wow-", 1)
End If

If Option4.Value = True Then
RetVal = Shell("WoW-FE 0.63.exe", 1)
End If

End Sub

What do I need to put in so the window comes back up after the selected exe, is finished with?

Minimizing To Taskbar
How would I make it so when I click a picture, the app minimizes to the taskbar? Does ShowInTaskBar have to do with this?

Minimizing A Screen

I hope someone will understand what I am asking, LOL.

Well I have written a fairly large application using VB6 and Access. At start my screen has few buttons to push. Push a button another full screen comes up. Now if I minimize this screen it shrinks to the bottom left hand corner but the previous screen does not become active.

Is there a way to make the FIRST screen where I have bunch of buttons to become ACTIVE after minimizing the screen I was on. Basically I want to push a button on the very first screen, go to the next screen, minimize it and be able to go to another screen by pushing other buttons on the main screen. It is some times becoming neccessary to minimize the current screen while you are in the middle of data entry and go to another when but right now I have to close my current screen loosing all my entered data and then go to another screen and then come back and type all over again.

Any and all help will be greatly appreciated.

Minimizing Form
hi !
i have got a problem here....

i just made a exe of my prog in vb...when i click on Minimize button on the form , the app minimizes and sits near the start menu. where as all my other apps , behave well like any other normal program.

i am able to figure out..wat would have gone wrong..

Minimizing [SOLVED]
I dnt want a button on the top, e.g Close, Maximize, Minimize....but i do want it to be in the file to i get these commands to be added to buttons?

Cheers :mike:

Minimizing Web Browser
how can i minimize a webbrowser using VB code. i am using follwoing code currently to navigate to the page

Set IExp = New SHDocVw.InternetExplorer
IExp.navigate "http:\

thanks and regards

No Sizing, But Minimizing!
I want to give the user the option to minimize,restore,and close but not to size or maximize.

I have tried putting in height & width commands in the '..._resize" event, but this cause minimize to produce an error.

I did a search for minimize in this site but got back a lot of irrellavent threads, and I can't think of anything else to search on.

Minimizing A Form
On a form at the top corner there is a minimize button what code can you use to minimize a form when a image is clicked?

Minimizing To The Systay
i want my program to be running all the time, but be minimized to the SysTray, does anyone know how do do that, and open it when it is double clicked? thanks in advance

Minimizing To Systray...
I need the code for a program that would add a selection to the menu that pops-up when you right click on any programs tab in the taskbar that lets you minimize the program to the system tray. I would like it so that I could put this code in a vb program, that you could run and have it add this option to any program with a taskbar tab. Thanks.

MDI Child Minimizing
I have a MDI for with an MDI Child Form inside it.. I added a toolbar with a button on it, and what im trying to do is when i click the minimize button on the MDI Child, I want the window to hide itself instead of turning into some little bar at the bottom of my screen like a window would do in Windows 3.1... When I click the button on the toolbar, it will show the MDI Child again.

Ive already succeded in hiding the window like i want it, but the problem is you see it minimize into the little bar, and then it dissapears.. I just want it to dissapear.. No little bar!

Minimizing To Toolbar
How can I minimize my program into the taskbar when a command button is clicked, and whent they click the icon in the taskbar, have it appear again?

Minimizing To Tray!
How do I assign a "minimizing to tray" function to the originally "minimize" button. And how do I actually write the minimizing to tray function?

Hope one of you can help

Minimizing An Application
Is there a way to have the program appear in the tray of icons in the bottom right of your screen when the user clicks the minimize button on the form?


"Pin me.  Perl me."



Minimizing To Taskbar
I want to minimize my form to the task bar by clicking a button, what would the command be? Exsample: when you want to close a form by clicking a button you put the command end. what would the command for minimizing be?

Minimizing Resources Used By BMP
Hi all,
I am trying to minimize the amount of resources used by BMPs created with the CreateCompatibleBitmap api. I make multiple bitmaps, and delete the dc's when not being used, but hold on to the BMP's themselves to be retrieved later. Even when the images are small, the resources are being used up too fast. This does not appear to be a memory leak issue, as all the resources are released properly when the program terminates. The images need to be available quickly, so something must stay in memory somehow. Since we can open many large images in any standard image editor without this happening, what are they doing differently? Is this a limitation of VB? What other methods are available to use (I imagine the picture object is not a good choice)?

Minimizing Problem
when i minimize my app, then restore it all my other running programs are minimized. other vb program samples i've tried do the same thing. is there some code you hafta put in to fix this or are my runtime files or something just screwed up?

No Event When Minimizing

I don't get into the resize event when i minimize my form.
What can i do?

Please Help .. Minimizing Outlook
Hi All,

I have written some code, with the help of people from CodeGuru, to minimize a form and calling a icon in the System tray. However, I can't seem to use the code for MS Outlook. This is because there is no 'Form_resize' property under 'This Outlook Session'.

Can someone please help me out?

Thanks in advance.


Copyright © 2005-08, All rights reserved