|
-
August 28th, 2001, 04:26 PM
#1
OLE container control
Trying to resize an excel object in an OLE container control. I can't seem to do it. When I embed a workbook in the control, it only fills up part of the control, not the whole thing. So, I would like to resize it, but none of the SizeMode constants seem to work.
Anyone run into this problem before?
-
August 29th, 2001, 04:55 AM
#2
Re: OLE container control
you can resize the object as per the size of the ole control to do that you have to set the sizemode property .
the code is *** follows
object.sizemode = value
and value can be either 0,1,2,3 and the explaination for all these modes is as follows
VbOLESizeClip 0 (Default) Clip. The object is displayed in actual size. If the object is larger than the OLE container control, its image is clipped by the control's borders.
VbOLESizeStretch 1 Stretch. The object's image is sized to fill the OLE container control. The image may not maintain the original proportions of the object.
VbOLESizeAutoSize 2 Autosize. The OLE container control is resized to display the entire object.
VbOLESizeZoom 3 Zoom. The object is resized to fill the OLE container control as much as possible while still maintaining the original proportions of the object.
-
August 29th, 2001, 05:00 AM
#3
Re: OLE container control
i have tries it out writting a sample code it works kindly put in this code in the form load event and see
ole1.sizemode=1
-
August 29th, 2001, 11:57 AM
#4
Re: OLE container control
Thanks for your advice Bhanuprakash. I tried the sizemode=1 in the form_load, but it doesn't work. The spreadsheet does not fill the OLE container control like that setting says it should.
Have you used OLE container controls a lot?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|