after change the display resolution with VB6
-
Hi! I have a problem with the center of the form in relating to the changing of the screen resolution and I would like to have aide. Please help! In my application, I change the screen resolution to 800x600 when the app is started and will restore to the original state when quit. About the code of changing the screen resolution, it like the code in the sample of the www.AllAPI.net: http://www.mentalis.org/apilist/ChangeDisplaySettings.shtml My problem is that if I change the screen resolution and then in my app, I use a procedure to center the form like this: Sub centerForm(ByRef theForm As Form) theForm.Left = (Screen.Width - theForm.ScaleWidth) / 2 theForm.Top = (Screen.Height - theForm.ScaleHeight) / 2 End Sub but I always have a problem that the form nerver be centered correctly I case I don't change the screen resolution, I don't have this problem This is the thing that I would like to need you help Thanks in advanced! Chua