Author |
Topic: Minimize or Maximize from within the program (Read 284 times) |
|
flotulopex
Junior Member
member is offline


Gender: 
Posts: 94
|
 |
Re: Minimize or Maximize from within the program
« Reply #2 on: Sep 18th, 2017, 6:40pm » |
|
Hi,
Sorry for my late reply - I was on travel.
Okay, my question is some kind of fuzzy.
My program's main window doesn't have the title bar appearing so I cannot click on the "minimize" button to get the Window's desktop. Nevertheless, I'd like to minimize the window like I would use the keys "Windows+Down".
Either I could create a button "Minimize" or, since my program is remotely controlled, I would use a received command to minimize the window. But what would the command look like?
Forget about the "maximize" question - this one is completely s****d
|
|
Logged
|
Roger
|
|
|
RobM
Junior Member
member is offline


Posts: 91
|
 |
Re: Minimize or Maximize from within the program
« Reply #3 on: Sep 19th, 2017, 09:51am » |
|
on Sep 18th, 2017, 6:40pm, flotulopex wrote:| I would use a received command to minimize the window. But what would the command look like? |
|
https://msdn.microsoft.com/en-us/library/windows/desktop/ms633548(v=vs.85).aspx
Code:nCmdShow=_SW_MINIMIZE
calldll #user32, "ShowWindow",_
h as ulong,_
nCmdShow as long,_
result As boolean
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Minimize or Maximize from within the program
« Reply #4 on: Sep 19th, 2017, 11:27am » |
|
on Sep 18th, 2017, 6:40pm, flotulopex wrote:| But what would the command look like? |
|
I linked to suitable code at LBPE in my reply.
Richard.
|
|
Logged
|
|
|
|
flotulopex
Junior Member
member is offline


Gender: 
Posts: 94
|
 |
Re: Minimize or Maximize from within the program
« Reply #5 on: Sep 20th, 2017, 06:40am » |
|
Thanks Richard,
I'll give it a try this evening.
I see, I have to get used to use those APIs....
|
|
Logged
|
Roger
|
|
|
flotulopex
Junior Member
member is offline


Gender: 
Posts: 94
|
 |
Re: Minimize or Maximize from within the program
« Reply #6 on: Sep 21st, 2017, 3:03pm » |
|
Thanks Richard,
As always, you provide the needed help ;)
So this is the code I added to my code.
Code:[MINIMIZE_WINDOW]
hMain = hwnd(#Main)
CallDLL #user32, "ShowWindow",_
hMain as uLong,_ 'handle of window
_SW_MINIMIZE As Long,_ 'message to minimize window
r As Long
WAIT
|
|
Logged
|
Roger
|
|
|
|