View Single Post
Old Jun 18th, 2005, 9:15 PM   #15
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 882
Rep Power: 4 The Dark is on a distinguished road
Here is a program you can call from your batch file to send the console window to the back of the Z order. I am not sure whether you will be able to compile it under Builder 4 as it uses GetConsoleWindow which is only available in Windows XP and 2000.
// SendToBack
// Send the current console window to the back
#define _WIN32_WINNT 0x0500
#include <windows.h>

int main(int argc, char *argv[])
{
  HWND hWnd = GetConsoleWindow();
  if (hWnd != NULL)
    SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);

  return 0;
}

If you can't get this going, you could try using the SetConsoleWindowInfo function, which is available on Windows95 and above, however this function only allows you to set the size and position of the window, so you could just move them off to the side somewhere.
The Dark is offline   Reply With Quote