centering a form by using API calls?

S

SJ

Hi all,

Access XP WinXP

i've created a custom msgbox form and i use some API calls to set the width
and height of the text box on the msgbox form. Trouble is, after using this
function the form is never centered on the screen. (as i need to use the
MoveSize method to resize the form and i can't work out where i should put
the top/left as i don't know the size of the screen) Even tho i've set the
appropriate properties. like popup etc

can anybody tell me what further API calls i might need to make to centre
the form?

would make the whole job rather tidy then.

thanks
 
G

Geoff

You're doing all the hard work yourself!

As no one else has replied, I thought I'd let you know that the Access
Developers Handbook contains a FormInfo class that you could import into
your project. Then everything you want to do is then a cinch! It's a
wrapper around those thorny API calls. You just instantiate the class, set
its properties (eg point the class to your form), call its methods and it'll
do what you ask (and much more). It'll even hide a form's caption bar.

See:
http://www.developershandbook.com/

Regards
Geoff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top