Here's another way of adapting a QVGA app to VGA using the Door library. Visual Studio 2005 adds this code automatically to a form laid out for a QVGA device so that the form scales up when run on a VGA device. VS2005 also adds the same code, but with the 96s replaced by 192s, for a form laid out for a VGA device so it scales down when run on a QVGA device.
Obj1 and Obj2 are Door library objects. Args is a Door library ObjectArray.
Code:
Obj1.FromControl("Form1")
'Form1.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
Args.New1(2)
Args.SetValue(0, 96, "System.Single")
Args.SetValue(1, 96, "System.Single")
Obj2.CreateNew2("System.Drawing.SizeF" & Obj2.System_Drawing, Args.Value)
Obj1.SetProperty2("AutoScaleDimensions", Obj2.Value)
'Form1.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
Obj1.SetProperty("AutoScaleMode", "Dpi")
'Form1.PerformAutoScale();
Obj1.RunMethod("PerformAutoScale")