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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Images Resize

Status
Not open for further replies.

lux

Programmer
Apr 6, 2001
11
0
0
IT
Can anyone suggest me how to have an authomatic mechanism of resizing forms containing graphics to reflect various display resolutions and colors ?
 
This wil make the form called form1 as big as the image1 in form1, I put this code in the load and resize so the form is allways as big as the image.

Private Sub Form_Load()
Form1.Height = Form1.Image1.Height
Form1.Width = Form1.Image1.Width
End Sub

Private Sub Form_Resize()
Form1.Height = Form1.Image1.Height
Form1.Width = Form1.Image1.Width
End Sub

If the stretch property of the image1 is false the form will be the same size as the image.

If you need to zoom in you need to change the stretch property to true and with the image.heigth and width you can make it bigger or smaller.
 
To get the resolution of the screen you can use the
screen.Height
screen.width
I must say I just checked this short and never used it. You can find some things in the object browser allthough I could not find the command to get the color mode.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top