Click here to Skip to main content
15,924,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm launching a new window of Comodo dragon browser and want it unmaximized at startup.

What I have tried:

Process[] Processes = Process.GetProcessesByName("dragon");


I'm running on all processes that have the name "dragon" in the process name, on their handles one by one and running this:
ShowWindow(handle, SW_RESTORE);

SetWindowPos(handle, 0, Cursor.Position.X - 100, Cursor.Position.Y - 100, 600, 600, HWND_TOPMOST);
Posted
Updated 20-Dec-18 22:45pm

1 solution

 
Share this answer
 
v2
Comments
john1990_1 21-Dec-18 9:00am    
These are the exact same things I tried before, but now they magically work, thanks a lot anyway friend!
RickZeeland 21-Dec-18 9:23am    
To quote Pilot:
Oh, ho, ho
It's magic you know
Never believe, it's not so
It's magic, you know
Never believe, it's not so

:)
john1990_1 21-Dec-18 10:58am    
lol :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900