Can you tell me what's wrong in my code ?
Can you tell me what's wrong in my code ?
https://github.com/tothpaul/Delphi/tree/master/NoFocusForm
Thanks
https://github.com/tothpaul/Delphi/tree/master/NoFocusForm
https://github.com/tothpaul/Delphi/tree/master/NoFocusForm
Thanks
https://github.com/tothpaul/Delphi/tree/master/NoFocusForm
You made it a child window, so it gets clipped
ReplyDeleteDavid Heffernan I know, but the dotNet code do that also !
ReplyDeleteprotected override CreateParams CreateParams
{
get
{
CreateParams ret = base.CreateParams;
ret.Style = (int)Flags.WindowStyles.WS_THICKFRAME | (int)Flags.WindowStyles.WS_CHILD;
ret.ExStyle |= (int)Flags.WindowStyles.WS_EX_NOACTIVATE | (int)Flags.WindowStyles.WS_EX_TOOLWINDOW;
ret.X = this.Location.X;
ret.Y = this.Location.Y;
return ret;
}
}
So what else is different. I've not looked at the .net code. What is the parent window set to?
ReplyDeleteDavid Heffernan none, but I wonder if it's has something to do with PopupMode property that do set a ParentWindow even when the form has no Parent control....i've tried many things and can figure what is different between the 2 projects...that's why I ask and provide a sample code. BTW I'm not a dotNet expert at all.
ReplyDeleteDebug the .net code and see what value WndParent has in that CreateParams
ReplyDeleteDavid Heffernan 0, and that's weird because if I force WndParent to 0 with the WS_CHILD flag, I have an error on CreateWindowEx ERROR_TLW_WITH_WSCHILD
ReplyDeletemore about WS_CHILD...https://www.daniweb.com/programming/software-development/threads/273724/a-form-that-doesn-t-steal-focus
ReplyDeleteI have successfully made a satisfied (meaning the parent form keeps the focus) drop down form with the technique posted here: http://stackoverflow.com/a/29553376/133516}
ReplyDeleteEdwin Yip yes, I've seen that, but when I add that, the buttons do not click anymore :/
ReplyDelete