Post Reply

Forums -> UltraMon™ SDK -> Starting a process maximixed over all desktops
matcy   2006-09-19 20:53
I need to start a process maximized over all desktops.
I wrote this piece of code for a c# application:

UMUtilityClass.Run(path, ULTRAMONLib.SHOWSTATE.SHOWSTATE_MAXIMIZED_DESKTOP, false, "");

but the process starts maximized in a single desktop
matcy   2006-09-19 21:54
I try to explain my problem better:
I have 2 monitors in extended desktop configuration and I want to maximize the process over the 2 monitors (Ultramon's function "maximize window to destop") but it starts maximized in only one monitor as Windows' desktop manager usually can do without Ultramon
Christian Studer   2006-09-20 08:09
You could do something like this:ULTRAMONLib.UltraMonUtilityClass util = new ULTRAMONLib.UltraMonUtilityClass(); string cmd = @"%WINDIR%\Notepad.exe"; if (util.Run(cmd, ULTRAMONLib.SHOWSTATE.SHOWSTATE_NORMAL, false, "")) { ULTRAMONLib.UltraMonWindowClass wnd = new ULTRAMONLib.UltraMonWindowClass(); if (wnd.GetAppMainWindow(util.ProcessId, 2000)) { wnd.SHOWSTATE = (int) ULTRAMONLib.SHOWSTATE.SHOWSTATE_MAXIMIZED_DESKTOP; wnd.ApplyChanges((int) ULTRAMONLib.WNDCHANGE.WNDCHANGE_CLIP_TO_WORKSPACE); } }The showstate value passed to Run gets passed to the application, which may ignore it. SHOWSTATE_MAXIMIZED_DESKTOP isn't supported at all, and will be changed to SHOWSTATE_MAXIMIZED.

Christian Studer - www.realtimesoft.com
Forums -> UltraMon™ SDK -> Starting a process maximixed over all desktops

Post Reply