X-Git-Url: https://git.8kb.co.uk/?p=dataflex%2Fdf32func;a=blobdiff_plain;f=src%2Fdf32%2Fwin32.inc;h=d792ecc1fde85e94513e99ecd0db69b3ed9769ba;hp=cd6dc5a493893546c885fa80abeb0b0bb126f8cf;hb=1f327f53d245cfe1cc60c3991580d402248e7111;hpb=3f621f80c366c2fa85774bd85dd6e6321331614c diff --git a/src/df32/win32.inc b/src/df32/win32.inc index cd6dc5a..d792ecc 100644 --- a/src/df32/win32.inc +++ b/src/df32/win32.inc @@ -452,6 +452,18 @@ function disable_close global integer argv returns integer function_return 0 end_function + +// Manipulate cmd window to minimise maximise etc. E.g show_window("pap", SW_MINIMIZE) +function show_window global string argv integer argv2 returns integer + local number Ret + local handle hWnd + + move (SetConsoleTitle(argv)) to strmark + move (FindWindow(0, argv)) to hWnd + move (ShowWindow(hWnd, argv2)) to ret + + function_return ret +end_function // This function will run any external application directly from dataflex // argv = application to run (command name/path) argv2 = any parameters to pass to the program argv3 = directory to run from