tappatappa Posted May 13, 2013 Posted May 13, 2013 Hi, in my application I want the main form to stay in the top-left corner (Top=0 and Left=0). Then, every other form must not overlap it. So, I need some way to detect when any form position change. This seemed to me a very basic task, but is not (or I am missing something, which is entirely possible). These are some of the events and properties I tried to manage: Form->OnClick, Form->MouseDown/Up/Enter... don't help, because they detect only clicks/actions that happen inside the form borders, they do not trigger when the user clicks on the top bar, and therefore he is free to move the form wherever he wants. Form->DragDrop, Form->EndDock.... they seem to work with components that are inside the form, not with the form itself. Actually, I don't know what their purpose is. Form->Align=alTop, only works in VCL mode, and does not solve the problem with the other forms that must not overlap the main form. Form->FormStyle=fsStayOnTop: combined with Align=Top, is a non-optimal solution, but only works in VCL mode. So, any ideas? Quote
joriolm Posted May 19, 2013 Posted May 19, 2013 HI Nefasto. Wow, in browser mode everything is different. Have you tried with OnActivate event of the form? Quote
estrify Posted May 19, 2013 Posted May 19, 2013 Hi, To detect window movement, take a look to OnMove event within client events, launch an ajaxRequest inside the event (JS) and capture it with an OnAjaxEvent (Delphi)... If you want the form always on top, try http://forums.unigui.com/index.php?/topic/3027-simple-tip-alwaysontop-feature-for-windows-and-forms/ Hope this could help.. Regards, Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.