*--- Close Active Window
#Define SC_CLOSE 0xF060
#Define WM_SYSCOMMAND 0x112
Declare SHORT PostMessage In user32;
INTEGER HWnd,;
Integer Msg,;
Long wParam,;
Long Lparam
Declare Integer GetFocus In user32
PostMessage(GetFocus(), WM_SYSCOMMAND...
A solution of this kind gives me a lot more power... I can handle that part of the form is enabled to control the window and I have no problems with the textbox using the valid (like in my sample, valid check doesn't fire when I click on caption)
I can insert vfp controls in my caption, like DWM...
I need create custom caption forms, Win8 style may be an idea... :)
My problem with the resize and mousepointer I solved in this way:
BorderStyle=0 &&Mousepointer is corrent now (I remove the WS_THICKFRAME code)
...
#Define WM_NCLBUTTONDOWN 0x00A1
Bindevent(This.HWnd, WM_NCLBUTTONDOWN...
I solved my problem [thumbsup2]
WM_NCLBUTTONDOWN is catched by vfp, I solved the problem by using DefWindowProc. I now have to handle WM_SETCURSOR message... :)
Public myForm
myForm = Createobject("myForm")
myForm.Show
Define Class myForm As Form
TitleBar=0
BorderStyle=3
x1=0...
Thank you for your replay
Try this...
Public myForm
myForm = Createobject("myForm")
myForm.Show
Define Class myForm As Form
TitleBar=0
BorderStyle=3
x1=0
y1=0
hOrigProc = 0
Add Object btnClose As CommandButton With Caption="Close"
Procedure btnClose.Click()...
Hi,
I need to resize a borderless form , I used the bindevent command on WM_NCHITTEST . But the resize does not work properly, it always run the resize bottomright even if I drag one of the edges ...
I return the correct value of WM_NCHITTEST but always starts the same resize ...
BorderStyle...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.