May 16, 2001 #1 Giddygoat Programmer May 16, 2001 36 GB If I load a picture in to a picture box which is in turn on a form, how can I resize the form to the size of the picture once the picture has loaded? Cheers John
If I load a picture in to a picture box which is in turn on a form, how can I resize the form to the size of the picture once the picture has loaded? Cheers John
May 16, 2001 #2 drs9222 Programmer May 15, 2001 41 US Try this... [tt] Dim ScalemodeBak As Integer ScalemodeBak = ScaleMode ScaleMode = vbTwips Picture1.left = 0 Picture1.top = 0 Width = Picture1.Width Height = Picture1.Height ScaleMode = ScalemodeBak [/tt] Upvote 0 Downvote
Try this... [tt] Dim ScalemodeBak As Integer ScalemodeBak = ScaleMode ScaleMode = vbTwips Picture1.left = 0 Picture1.top = 0 Width = Picture1.Width Height = Picture1.Height ScaleMode = ScalemodeBak [/tt]