Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

control position of messagebox

Status
Not open for further replies.

113983

Programmer
Jul 28, 2008
26
is there any way to control where on a form a messagebox will appear?
 
]
I think, it is always centered relatively to the screen - not even the top-level form. I guess it is much easier to control where your form would appear to match the messagebox.

Actually, messagebox doesn't appear ON a form, it's independent, and I think, VFP makes an API call to implement it. You can try to find an underlying API function and what parameters are there to control the position - and then use that function directly. (Still, I think, it would be positioned relatively to your screen, so you would have to code calculations on how to position it relatively your form.

Try this site:

or check Microsoft knowledge base for information - or, possibly, ready solutions.
 
I've just found this article - for VB, though: I didn't have time to read it thoroughly, but looks somewhat promising. See if it helps to do similar thing in VFP.

Actually, you, probably, have another alternative - to write your own positionable message box class.
 
If you want that much control, you might want to think about making your own messagebox form sending over various parameters in the DO FORM statement.

--------------
Good Luck
To get the most from your Tek-Tips experience, please read
FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
thanks - I was just designing my own form so that I could control it. If I find anything out there I will post info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top