You can also try:
int Desktop_Width;
int Desktop_Height;
int Dekstop_Depth;
Desktop_Width = GetSystemMetrics(0);
Desktop_Height = GetSystemMetrics(1);
HDC hdc;
hdc=GetDC(0);
Dekstop_Depth=GetDeviceCaps(hdc,12);
ReleaseDC(0,hdc);
dbSetWindowPosition(0,0);
dbSetDisplayMode(Desktop_Width,Desktop_Height,Dekstop_Depth);
I've found that when I use the dbSetWindowOff() command, debugging becomes a pain. Visual C++ goes into breakpoints, but since Windows are off you can't go back into your code. The end result is you have to close MS Visual Studios from the task manager. Lame-O....