
resizing a form size at runtime
Quote:
> I need to resize a form's internal area in pixels to a bmp's height and
> width at runtime. I have tried modifying scalewidth and scaleheight
> methods but they dont seem to work.
> Any help would be greatly appreciated
> -Adarsh
You have to modify Form1.Width & Form1.Height ( both in twips):
....
Dim iExtraX As Integer, iExtraY as Integer
Form1.ScaleMode = vbTwips
iExtraX = Form1.Width - Form1.ScaleWidth 'Border size
iExtraY = Form1.Height - Form1.ScaleHeight 'Caption & menu size
' PictureWidth & PictureHeight in pixels
Form1.Width = Form1.ScaleX(PictureWidth,vbPixels,vbTwips)+iExtraX
Form1.Height = Form1.ScaleY(PictureHeight,vbPixels,vbTwips)+iExtraY
....
--
---------------------------------------------------------------------
# When I find my code in tons of trouble,# Anton D. Onopko #
# Speaking words of wisdom: # Note: remove nospam if #
# Write in C. # you mail to me #
---------------------------------------------------------------------