is there a way of getting rid of the windows X

BlitzMax Forums/BlitzMax Programming/is there a way of getting rid of the windows X

I need to prevent users from clicking X to close a windowed prog.

don't read out EVENT_WINDOWCLOSE

or: create a window with flags set to 0.. then you have nothing but a giant rect.. without any buttons :P

im using basic graphics commands after a graphics statement. I cant find out how to do graphics in a window (im new to this and the help is really rubbish) i have however got the tools in a window. Problem is, if a user closes the default graphics window, the tools window locks up.

MaxGUI Tutorials

cool, missed them

Here you go:
Extern "win32"
	Function FindWindow(lpClassName$z, lpWindowName$z) = "FindWindowA@8"
	Function GetSystemMenu(hwnd, bRevert)
	Function RemoveMenu(hMenu, nPosition, wFlags)
End Extern

AppTitle = "No Close"
SetGraphicsDriver D3D7Max2DDriver()
Graphics 640, 480, 0, 60
WindowMode

Repeat
Flip; Cls
Until KeyDown(KEY_ESCAPE)

Function WindowMode()

	Local hWnd% = FindWindow("BBDX7Device Window Class", "No Close")
	hMenu = GetSystemMenu(hWnd, 0)
	RemoveMenu hMenu, $F060, 0
	DrawMenuBar hWnd
	
End Function