dialog box location

dialog box location

wesbird
Collaborator Collaborator
430 Views
4 Replies
Message 1 of 5

dialog box location

wesbird
Collaborator
Collaborator
Hi:
I create a dialog box in a AutoCAF DVB file. I will let user pick something in my dialog box (GetEntity, pick layer ....) . I found my dialog box will always appear in the middle of screen. It is really annoy to drag it away all the times. I check Me.Hide and Me.Show and found nothing about the location.
Does anybody work this before? I really appreciate your help.


Thank you very much
Wes
Windows 10 64 bit, AutoCAD (ACA, Map) 2023
0 Likes
431 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
I have a few Message Boxes that I pop up when I'm debugging my program and it also annoyed me to have to drag them off the middle all the time. After some experimentation I discovered I could use the SendKeys statement *before* issuing the MsgBox statement to send the keystrokes necessary to "drag" the dialog away. This was perfectly adequate for my debugging purposes, but depending how quick your system is you or your users may not like the dragging effect. Eg

SendKeys "% m{DOWN 22}{RIGHT 32}{ENTER}"
MsgBox "Hello"

Regards

Wayne Ivory
IT Analyst Programmer
Wespine Industries Pty Ltd
0 Likes
Message 3 of 5

Anonymous
Not applicable
I may be missing something but I'll give it a shot - If you created the dialog box you can use the StartUpPosition property to control where the dialog box appears on screen.
If that is not what you're talking about then please disregard this massage and call me a dork.

Good luck!
Dave. K
0 Likes
Message 4 of 5

Anonymous
Not applicable
how tightly do you want to control it? how much time do you want to spent typing code? -- Jim Yadon - KorPRit PunK X=(A-(B*(C-1)))/2 *y=d-e* *x,y is the first point* ------------------------------------------------------------------------ Jim Yadon's Profile: http://www.vbdesign.net/expresso/member.php?action=getinfo&userid=1413 View this thread: http://www.vbdesign.net/expresso/showthread.php?threadid=25832
0 Likes
Message 5 of 5

Anonymous
Not applicable
You can use SaveSetting in the dialog's QueryUnload event to store its position in the registry. Then you use GetSetting in the Form_Initialize event to position the form where it was previously. -- Chuck Gabriel Since when is ignorance a point of view? ------------------------------------------------------------------------ Chuck Gabriel's Profile: http://www.vbdesign.net/expresso/member.php?action=getinfo&userid=16 View this thread: http://www.vbdesign.net/expresso/showthread.php?threadid=25832
0 Likes