|
|||
|
I'm have a little problem. I'm creating an instant messenger like MSN, AIM or Google Talk. There should be 2 windows, one with all your contacts plus your converstations in tabs but there should also be a transparent window which pops up little windows in the lowerright corner of the screen when a new message arrives or one of your friends comes online. Like this:
![]() I've tried form, but... 1. I can't get the new form in the lowerright corner just above the taskbar. 2. I can't seem to get it transparent, when I use modifyStyleEx and WS_EX_TRANSPARENT it doesn't become transparent but rather has a bugged background. 3. I can't get the window to always be on top. 4. I seems to behave like the main window, so when the main window minimizes so does the form and also when I hide the window (so it goes to the system tray) the form also hides. Ofcourse it should behave like a new window which always stays visible and on top. Can you help me? Thanks!PS. The pop-up window should be transparent, this is what mine looks like: ![]() Last edited by Kenney; 08-25-2009 at 12:13 PM. |
|
|||
|
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); Code:
getMainWnd().onSize = function (type, width, height) {
if (type == 1) {
form.window.windowState = "normal";
}
}
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|