Link to home
Start Free TrialLog in
Avatar of tubelight
tubelight

asked on

Ole-Object, Paint, default size.

experts,
 i am trying to use an Ole bound control on my form. I want it to be of class Paint.Pictre when the form opens up.
 I do the following in the Form_load() event.
 
    Me.OleCtl.Class = "Paint.Picture"
    Me.OleCtl.OLETypeAllowed = acOLEEmbedded
    Me.OleCtl.Action = acOLECreateEmbed

 This works good. and i get to see the Paint obj in the control when i open the form.

Problem -
 I would like to know a way to control the default size of the Paint document inside this control. The size of my ole control frame (on the form) is fixed while the default size that the paint document takes inside this frame is much bigger and results in a clipped view of the document.(and results in showing up scroll bars).

  Is there a way to use the SourceItem property ? just a possible clue. Usually i read 'refer the Ole server's documentation' but dont know where to find one for Paint.

 Please help.
regds
Avatar of funke
funke

set the "size mode" property to the setting you want - I think there are three settings - you can test it by setting it in the properties window and then opening your form
Avatar of tubelight

ASKER

funke,
thx, but size mode property changes the size of the 'window' in which the paint document is contained. But has no effect on the 'canvas' of the Paint image (document).
I am not sure if this is possible, easily.
How and where do i get information on the Paint.Picture Object ?

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
ASKER CERTIFIED SOLUTION
Avatar of ComTech
ComTech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial