Thread: Form bugs
View Single Post
  #2 (permalink)  
Old 08-26-2009, 07:39 PM
SWFKit SWFKit is offline
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

1. you can use the Form.window property to control its size and position.
2. you cannot create a transparent form. However, you can use clip regions to create customize-shaped forms. This can be done by setting the clipRegion property.
3. to set it always on top, you'll have to call the windows api SetWindowPos

Code:
form.show(false);
dllimport "user32.dll" stdcall Boolean SetWindowPos(int, int, int, int, int, int, unsigned int);
HWND_TOPMOST = -1;
SWP_NOMOVE = 2;
SWP_NOSIZE = 1;
SWP_SHOWWINDOW = 0x40;
SetWindowPos(form.window.handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
4. to prevent the form being minimized
Code:
getMainWnd().onSize = function (type, width, height) {
	if (type == 1) {
		form.window.windowState = "normal";
	}
}
Reply With Quote