473,805 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Minimizing windows

Del
Does anyone know how to minimize all the windows on a
desktop, programatically ?
Jul 19 '05 #1
3 2346
MyForm.WindowSt ate=FormWindowS tate.Minimized

"Del" <de******@earth link.net> wrote in message
news:07******** *************** *****@phx.gbl.. .
Does anyone know how to minimize all the windows on a
desktop, programatically ?

Jul 19 '05 #2
You would need to emunerate all windows on the desktop, and send them all
the necessary minimize message.
Or I wonder if you can cheat and send the same keypress as the Windows Key
& M does?

Jul 19 '05 #3


Haha, yes, I found the solution is to send that Windows shortcut - here is
the answer in VB format:

http://support.microsoft.com/default...microsoft.com:
80/support/kb/articles/Q194/9/14.asp&NoWebCon tent=1

Private Declare Sub keybd_event Lib "user32" ( _
ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)

Const KEYEVENTF_KEYUP = &H2
Const VK_LWIN = &H5B

Private Sub Command1_Click( )
' 77 is the character code for the letter 'M'
Call keybd_event(VK_ LWIN, 0, 0, 0)
Call keybd_event(77, 0, 0, 0)
Call keybd_event(VK_ LWIN, 0, KEYEVENTF_KEYUP , 0)
End Sub
--------------------
| X-Tomcat-ID: 454005605
| References: <07************ *************** *@phx.gbl>
<je************ ***********@new s1.calgary.shaw .ca>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: jo******@online .microsoft.com (John Kennedy[MSFT])
| Organization: Microsoft
| Date: Wed, 06 Aug 2003 16:07:33 GMT
| Subject: Re: Minimizing windows
| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
| Message-ID: <jX************ **@cpmsftngxa06 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.genera l
| Lines: 6
| Path: cpmsftngxa06.ph x.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:103719
| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
|
| You would need to emunerate all windows on the desktop, and send them all
| the necessary minimize message.
| Or I wonder if you can cheat and send the same keypress as the Windows
Key
| & M does?
|
|

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
965
by: Del | last post by:
I wish to programatically minimize all windows on the desktop. Can anyone help me in this?
13
1986
by: nospam | last post by:
NEWS.COM Amazon wins patent for ordering forms # 6,615,226 http://tinyurl.com/m7v8 http://news.com.com/2100-1017-5070569.html In its latest patent, the online retailing giant outlined a method for expanding portions of the ordering form, then collapsing that portion of the form and removing the data fields. The content for that particular section of the form would then be displayed again.
1
2789
by: Smile | last post by:
hi I want a program which when run, hides all the rest of the running applications on the taskbar. or i might want to check something like - If some application is mazimized, then minimize it or hide it or .. something like that. in google i found, For example, there is a program - " Hide-It " which has a similar functionality, but the code seems to be in MFC.
3
3097
by: NL | last post by:
Hi, Does anybody know how to turn off the animation Windows does with a window as it's minimized/maximized to the taskbar? I have an app which, when minimized, syncs to any other open instances of the app and tells them to minimize. If I have more than a couple instances open, the user ends up waiting quite a while for all of windows to minimize, since each minimizing animation is done consecutively and not in parallel.
3
296
by: Del | last post by:
Does anyone know how to minimize all the windows on a desktop, programatically?
7
9337
by: Lee | last post by:
Hi, How do I detect when a form is minimizing? specifically when a user clicks the show desktop button on the taskbar, rather than the minimize button on a form. thanks in advance
5
3493
by: Scott | last post by:
Hi everyone, I have a c# console app that when run through an autorun.inf file, launches a web page from the CD. It works just fine but I would like the console window minimized on startup. Currently, the console window displays briefly, the web page loads, and the console window disappears. The only line of code currently in the console app is... System.Diagnostics.Process.Start("blahblahblah.htm")
7
12401
by: Abelard | last post by:
How do I programmatically minimize the console window in a VB .NET console application?
3
1917
by: qazplm114477 | last post by:
Hi, I'm having a tiny problem. I have just started playing around with visual basic a week ago so im fairly new at this. I created a method that saves changes when you click a button, once the button is clicked a message box pops up with a yes/no option. whenever i click any of those buttons the entire window minimizes. Theres no problem with the code it self yet, i just want my window to stop minimizing here is the code: Dim...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10614
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3847
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.