Archived

This topic is now archived and is closed to further replies.

Xorcist

InputBox (X and Y coordinates?)

Recommended Posts

Xorcist    122
Is there a way to indicate to Delphi where to display the input box generated with the InputBox function? I found a way to do it for a simple MessageBox (using the MessageDlgPos function), but not for an InputBox. Any ideas? I know I could just create a custom form and use it as a dialog, but that''s just a waste of code to simply have it center on my application''s main form (which is all I really want). Thanks in advance.

Share this post


Link to post
Share on other sites
Sly    128
There is no readily available function to do it for you. The easiest way would be to copy the source for the InputQuery function from dialogs.pas lines 1759-1828, make your own function InputQueryPos and modify the two lines that set the Left and Top properties of the form that is created.

Steve ''Sly'' Williams  Code Monkey  Krome Studios

Share this post


Link to post
Share on other sites
Xorcist    122
Well that couldn't have worked out any better. A quick cut and paste, a little added code, and whamo everything fell right into place. Thanks again.

Edited by - Xorcist on July 3, 2001 12:50:39 AM

Share this post


Link to post
Share on other sites