Rob Cameron wrote: > This works fine ... unless the form is positioned so that the cursor > which clicks on the control happens to be in the same part of he screen > which will be occupied by the OpenDialog when it is created. In that > case, the OpenDialog pops up a menu as if I had just right-clicked on > the OpenDialog itself. > > To see the effect, create a new application, put a TEDit and a > TOpenDialog on the form, and the code above in the event handler. Move > the form around until the TEdit is underneath the OpenDialog when it > shows up. > > Any ideas how I can suppress the popping-up of the popup?
Context menus appear on the mouse up event. You are showing the open file dialog on the mouse down event, so when you release the button, the open file dialog is already shown and therefore gets the mouse up event. Change your event to use the OnMouseUp event. -- Sly This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect. _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

