Change of window position and size

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

From my main form whenever I do a openform "xyz", it opens the xyz but when I
close xyz the position and size of my window is changed. I have set the
autocenter and autosize to false. Is there something I can do so that
whenever I open a form my main form does not loose its position/size.

How can I open a form withing a mainform? I tried a subform which I made
visible/invisible based on the selection in the combo box. for the 1st time
it works fine but later on it does not work?

Thanks,

Ashu
 
Hi,



Getz, Litwin and Baron do it in their book, Access Cookbook, at O'Reilly
(http://www.amazon.com/exec/obidos/t...f=sr_1_2/102-3248720-8801715?v=glance&s=books,
page 100). Basically, they retrieve the position of the form and of its
parent, through the API function GetWindowRect, save (the difference) in the
registry, in the Unload event. Then, in the Load event, they read the
registry and position the window accordingly, through the use of the
MoveWindow API function.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top