Bruce's Powerbuilder Tricks
APIs
APIs - Bruce's Powerbuilder Tricks
SHAppBarMessage - see here
FUNCTION long ShellExecute (long hwnd, ref string lpOperation, ref string lpFile, ref string lpParameters, &
ref string lpDirectory, integer nShowCmd ) &
LIBRARY "shell32" Alias for "ShellExecuteA;Ansi"
Example: ulong ll_null; string ls_null, ls_op, ls_path, ls_commandline; setnull(ll_null); setnull(ll_null)
ls_op = 'open' + char(0); ls_path = 'C:\Program Files\Prog\Prog.exe' + char(0); ls_commandline = commandline + char(0)
ll_null = ShellExecute (ll_null, ls_op, ls_path, ls_commandline, ls_null, 1)
FUNCTION ulong FindWindowA(ulong classname, string windowname) LIBRARY "User32.dll" Alias For "FindWindowA;Ansi"
Example: ll_handle = FindWindowA (ll_null, is_windowname)
FUNCTION boolean SetWindowPos(ulong hWnd, int hwinpos, int xpos, int ypos, int xsize, int ysize, int flg) &
LIBRARY "user32.dll" Alias for "SetWindowPos;Ansi"
Example: SetWindowPos(ll_handle, ll_null, 380, 0, 900, 994, 16384)
380 is x, 0 is y, 900 is width, 994 is height
16384 (x4000) prevents the calling thread from blocking its execution