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




Minimize A Form To The Windows Taskbar


I followed the advise posted by Ivan F Moala in this forum:
http://www.xtremevbtalk.com/showthread.php?t=139435
This code worked for me but I have a question for any api buffs out there. Can I modify this code to minimze my custom userform to the windows taskbar, instead of the bottom of the excel window? I'm on XP, Any help is appreciated

-ON




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Minimize MDI Form To Taskbar
I have a MDI parent and child. I need to remove the minimize, restore and close buttons from the form, enable the operator to close and minimize the app using F keys via SENDKEYS. I have successfully removed the menu.

Option Explicit

Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_MAXIMIZEBOX = &H10000
Private Const WS_CLOSEBOX = &H80000
Private Const GWL_STYLE = (-16)

Private Declare Function SetWindowLong Lib "user32" Alias _
         "SetWindowLongA" (ByVal hwnd As Long, _
         ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias _
         "GetWindowLongA" (ByVal hwnd As Long, _
         ByVal nIndex As Long) As Long


Private Sub MDIForm_Load()
Dim L As Long

  L = GetWindowLong(Me.hwnd, GWL_STYLE)
  L = L And Not (WS_MINIMIZEBOX)
  L = L And Not (WS_MAXIMIZEBOX)
  L = L And Not (WS_CLOSEBOX)
  L = SetWindowLong(Me.hwnd, GWL_STYLE, L)

End Sub

''''''''I can also close it , and will eventually take it to vbKey

Private Sub CloseApp_Click()
SendKeys "%" + "{F4}"
End Sub

''''''I cant seem to minimize it though, isn't this the correct sequence to minimize ?

Private Sub MinApp_Click()
SendKeys "%" + "Space" + "N"
End Sub

Thankx in advance....



Edited by - rgb30b on 9/7/2003 8:47:09 AM

How To Minimize A Form To The Taskbar Rather Than The Desktop
How can I minimize the form to the taskbar rather than the desktop ?

Making A Form Like The Windows Taskbar
I want to make a form that looks and behaves like the Windows Task bar or the MS Office Toolbar. I don't know how to make it so other applications will not use that screen space like the Taskbar does.

Suggestions?

Modal Form Not Diplaying In Windows Taskbar??
I have been going through forms in an application that dont display in the taskbar, thus not allowing a user to alt+tab back to the application if they try. One property that I changed that solved the problem in some forms is changing the borderstyle for the form from fixed toolwindow(The form does not appear in the Windows taskbar- by msdn definition) to say fixed dialog. Now that only worked for some of the forms others still wont show in the taskbar. Does anyone know of other properties that may affect this problem.

Minimize To Taskbar
ok I've searched the forum about this and found some threads that talk about it but can't find anywhere in my code that made it a modal form. When I press my label it minimizes but it goes to the bottom left and not to the taskbar how can i fix this.

Here is my code:


Code:
Option Explicit
Dim XD As Single
Dim YD As Single

Private Sub cSysTray1_MouseDown(Button As Integer, Id As Long)
Form1.WindowState = vbNormal
End Sub

Private Sub lblExit_Click()
Unload Me
End Sub

Private Sub lblMinimize_Click()
Form1.WindowState = vbMinimized
End Sub

Private Sub TabStrip1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
XD = x
YD = y
End Sub

Private Sub TabStrip1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Static flgMove As Integer
If Button = 1 And flgMove = 0 Then
flgMove = 3
If x < &HFFFF& And y < &HFFFF& Then Move Left + x - XD, Top + y - YD
End If
If flgMove Then flgMove = flgMove - 1
End Sub

An explanation on why it is happening would be nice to so I can learn from it.

Thank you

Minimize To Taskbar???????
I am starting a program minimized.

After the form is maximized, I want to be able to collapse it back into the task bar. ( The app runs all the time.)

Please help.
Grandpa

Minimize To Taskbar Toolbar
Does anyone have any idea how to get my apps to minimize to a taskbar toolbar?

I am not referring to the systray. What I would like to do it what iTunes, WMP, and the Google search bar do, which is embed themselves into the taskbar when they are minimized.

Here's an example:

Sample image

How Can I Minimize Run My Program To The Taskbar
I want my program to run at right of the taskbar when I set minimize (as onlinestatus or somethink like that).

How Can I Minimize My Program To The Taskbar
I want my program to run at right of the taskbar when I set minimize (as onlinestatus or somethink like that).

Custom GUI - Minimize To Taskbar, Drag Window
Hi everyone,

How can I make my custom border/GUI have a minimize that goes down to the taskbar? Right now I've got it going to the system tray, but I do not want that, and once it is put in there, you can't get it back out unless you end the process.

Also, how can I make the border/custom GUI window draggable like a normal window, i.e., have a 'handle' across the top bar for them to it with.

Thanks again!

How Do I Minimize A Form Without Clicking The Minimize Button???
Hi,

I would like to mimimize a form with a button called cmdMinimize???

Thanks

"Windows In Taskbar" Unloads Hidden Word Form
My organisation is upgrading Office 97 to XP.

We have a word template which is loaded at start up and creates a ToolBar. If the users selecting an icon on this ToolBar, it runs a procedure from the template the loads a form (frmMenu.Show) which is a menu system for correspondence letters with the top letter highlighted. If a user selects a correspondence letter to open, the form is hidden (me.hide) and the correspondence letter is created. If the user selects the toolbar icon again, the hidden menu form is made visible with the last selected correspondence letter highlighted. Essentially the form should never be unloaded until you close Word.

A problem occurs due the WD2002 having a new Option "Windows in Taskbar" which if enabled displays each document in it's own Window in the taskbar. If a user selects two or three correspondence letters and then closes all of them (but does not close Word) then the form is unloaded. Therefore if the user selects the toolbar icon, the form will reload because it is not loaded

If I turn off the Option "Windows in Taskbar" the form is only unloaded when you close Word.

It seems is if the user's are closing the owner of the form.

Any help will be appreciated.

"Windows In Taskbar" Unloads Hidden Form
My organisation is upgrading Office 97 to XP.

We have a word template which is loaded at start up and creates a ToolBar. If the users selecting an icon on this ToolBar, it runs a procedure from the template the loads a form (frmMenu.Show) which is a menu system for correspondence letters with the top letter highlighted. If a user selects a correspondence letter to open, the form is hidden (me.hide) and the correspondence letter is created. If the user selects the toolbar icon again, the hidden menu form is made visible with the last selected correspondence letter highlighted. Essentially the form should never be unloaded until you close Word.

A problem occurs due the WD2002 having a new Option "Windows in Taskbar" which if enabled displays each document in it's own Window in the taskbar. If a user selects two or three correspondence letters and then closes all of them (but does not close Word) then the form is unloaded. Therefore if the user selects the toolbar icon, the form will reload because it is not loaded

If I turn off the Option "Windows in Taskbar" the form is only unloaded when you close Word.

It seems is if the user's are closing the owner of the form.

Any help will be appreciated.

Minimize Windows
please, could someone tell me how i should do to minimize all the open windows (programs, directories etc)? sorry for my english and thanks for the answer,

Minimize Windows
hi people!

how can my app minimize all open app windows to the task bar so that the desktop is shown?

thanx in advance!

Minimize All Windows?
How could I minimize all of the windows that a user has open and just leave my program visible?

Minimize All Windows
How do you minimize all open windows?


Thanks,
Sir Loin

Minimize All The Windows
Is there a way to minimize all the programs currently running

Minimize All Windows ..
hy, how can i minimize all windows ?? like the "Show Desktop" icon in the task tray??

is there any api-command?

greez

Minimize ALL Windows?
How do i make my app minimize all the windows open, like the Windows key and M does?

I do not want to simulate the user pressing Windows M though? Is there an API to do this?

Minimize All Windows?
I want to minimize all active windows, either my Vb app..
is there anybody outa there who can give an example?

How To Minimize All Windows ?
can any tell how to minimize all opened windows....? when press a button in my coding?

How To Minimize All Open Windows?
How do I minimize all open windows? like the Show Desktop Icon on the Taskbar in Win98 with on click it minimize all windows and show desktop ... thanks

Minimize All Open Windows?
Hi

Does anyone know how to minimize all open windows other than my one ??

Many thanks

Neil!

Edit: the windows arnt my program but all the others, like winamp and IE etc...

How To Minimize All The Current Open Windows
I am writing a program to pop up a warning message. How can I minimize all the other curent open windows when message pops up so that the message can be seen. Please help

Thanks

How To Put Minimize An Icon To Windows System Tast Bar
How can i dispaly a background application in the windows system tray as an icon only.
Amendra

Old Problem, Still No Solution? (modal Form Losing Focus When Parent Form Is Minimize
Hi everyone,


I have a problem with modal forms that's very easy to reproduce, and
practically locks up the application:


When closing Form1 I display a modal from (Form2), more or less to
request
the user if he's sure, etc. That works fine if Form1 is in normal
window
state and visible.
If I minimize Form1 in the windows Taskbar before closing it using the
system menu, Form2 appears, but is grayed and cannot receive mouse or
keyboard input. Because Form2 is displayed and modal, I cannot do
anything
else with the application. As far as the user is concerned, it's dead
and
frozen.


Form2 does not receive a Deactivate or LostFocus event, where I could
possible "repair" things.

Cheers, Marek

How To Minimize All Externial Open Windows To System Tray
Hi all . I want to create a button that on click it minimize webbrowser and all open externial application windows to system tray except the form window that holds the button. i be happy if some one show me how that can be done.Thanks

Windows Taskbar
can someone tell me where in the registry windows keeps info about the taskbar such as if the clock is present or the quicklaunch area.

Help Windows Taskbar
I'm am relatively new to useing Windows API. I have learned how to do some easy things which to me wasn't easy. like tray icons, docking and right click menus. But for my docking thing to work without any errors I need to find out where the Windows Taskbar is docked First (TOP, BOTTOM, LEFT, RIGHT). I have been looking for almost a week now and getting really frustrated. If you could either point me in the right direction or show me how that is done I would greatly appreciate it.

New Windows Taskbar.
I am working on rewriting the Windows Taskbar in XP. Could someone please tell me how to put the System Tray area in my application?

As well I am looking to make a menu out of it. Sort of like what Mac OS X does, but not the same. How could I get my program to have the menu of the windows application that is in focus?

Paul

Windows Taskbar
Hi !
I have a problem when I MDI form and the child forms are set in the client area with me.screenwidth and me.screenheight properties. Here the problem is when the taskbar is in autohide mode my form is clerly loaded and visible too . but when autohide is not checked then the problem arises.

Is there any chance I can set the property of the taskbar to autohide. I have seen MSDN where they are increasing the size of current window but I don't think this is a right solution ..Can body help me in this regard..


urs
sar

Windows Taskbar
Guys,
i need to play with the xp taskbar, u know, hide and show it, change the start button size, ....
i found 2 functions: FindWindow and SetWindowPos but i dont get them, they are declared with Lib, alias, i dont get how can we deal with them, anyone can help please

Form Minimize When Mouse Leaves Form (very Tricky One!)
I was given this code by plenderj. It hasn't worked for me.
All i want my program to do is:

A) Load the form, and put it in the top-right of the screen, and always be on top.

B) When the mouse moves off of the form, shrinks to Height = 10, width = 200

C) When the mouse is returned over the form, goes back to the H=3855, W=6335

Thanks for any help.

P.S: Matt, your code just froze my computer.... what did i do wrong!!

Hide Windows TaskBar
Is there a way to hide the Taskbar when the program runs?

Programming Windows Taskbar
Hi

I have looked to see if I can find a way to program the text in the Windows taskbar for a workbook that I have that runs a very long and complex macro. The problem is, that once it is running, no one can tell how far it has got, but if the text in the taskbar icon could be manipulated, I could show it there.

Is this possible?

Thanks

Set Size Of Windows Taskbar
does anyone know how to set the taskbar height and set autohide on and off for Window's main taskbar?

Thanks

Windows Taskbar Height
How can you get the windows taskbar height? (don't know if "taskbar" is the correct translation... the bar in the bottom of the screen)

Get List Of Windows In Taskbar?
I actually need to od this in Borland Delphi 7 but its hard to find help with it so im trying to see if anyone knows how it could be done in vb and ill go from there.

In application atm it takes shots of Individial Windows or the Desktop by WindowName or a list i present using EnumWindows.

I need to filter out the list of windows to only ones that are in the TaskBar..... in other words only ones that the user can actually see.

Thnx in advance

Listing Windows That Appear In Taskbar
I'm trying to get a list of all windows that appear in the taskbar. I'm filtering for windows that:
* are visible
* have no parent (GetParent() returns 0)
* do not have extended window style set to WS_EX_TOOLWINDOW
However, this is also returning some windows that aren't in the taskbar, and I'm not sure how to reliably identify these.

First example: it returns 2 windows for the VB IDE. I've found an explanation here for why this happens, but the only solution proposed there is based on hard-coding the class names, and that isn't going to work for me.

Second example: Excel, if it's set to show all document windows in the taskbar (Tools... Options... View... "Windows in taskbar"). If I have two Excel files open, my code lists both of these, but also the main application window, which isn't showing up in the taskbar. (Somewhat interestingly, the main application window does show up in the Task Manager.) The problem is that the main application window looks exactly the same to me, whether or not the "show document windows in taskbar" option is checked - it has exactly the same window style in both cases. But in one case it's showing up in the taskbar, in the other it isn't.

What's the setting that is keeping these two windows from showing up in the taskbar?
Is there a better way of identifying the windows I want?

I'm attaching a project that shows my current attempts. It lists the windows in a txt file; the path is specified by Const OutputPath.

Show In Windows Taskbar?
Is there anyway to make sure the window is visiable and accessible in the windows taskbar? I know all windows in VB are enabled and visible in the taskbar by default, but I'm actually using the Visual Basic editor in MS Excel, and the windows/forms do not show in taskbar by default. thanks!

Minmize All Taskbar Windows
One thing that bothers me is when I need to get to the desktop, and there are 20+ windows that I have to minimize.
How would I make a program to minimize them all at once?

Show App In Windows Taskbar
hi, i have an application that starts "Before" windows explorer. my problem is that when i run/shell "Explorer.exe" from my app, the window of my application does not show in the Taskbar.

Does anyone know how to make my application window show in the taskbar? if i press Alt-Tab, i can still see my application in the list of tasks running, only problem is that it does not show in the taskbar.

-Guy

Windows Taskbar Problem
I hope someone recognises this situation!

When I run the compiled version of my application and then change focus to another running program (by clicking on the taskbar) the second program comes to the front OK but the taskbar entry for *my* application starts flashing and the taskbar stays revealed (it's set to autohide) until I click back on my program.

This is very annoying behaviour (I use Mozilla Firefox and this does something similar when you have a download window open).

How do I stop this happening?

Paul.

Disabelling Windows Taskbar
Hello,
I have got the code to Hide / Show Windows Taskbar,
but i need to Disable / Enable Windows Taskbar.
Please help me

Regards
Farooq

Windows Taskbar Clock
How do I make the taskbar clock disappear when a program of mine loads and appear when it closes? I know have have to put code in a form_load and form_unload sub, but what code?


Thanks,
Sir Loin

Get Titles Of All Windows In Taskbar
How can I get the titles of all windows in the taskbar?

Integrate GUI Into Windows Taskbar??
Hi All.

I have been asked by a friend to replicate the virtual desktop switching of Linux Redhat 7.1, into Windows. I have sort of figured out how to switch, but I need to know how to draw some buttons onto the taskbar.

Any help on this issue will be appreciated.

Thanks in advance,

Copyright © 2005-08 www.BigResource.com, All rights reserved