Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pictures in Usercontrols

0 views
Skip to first unread message

Jason

unread,
May 26, 2003, 9:21:05 AM5/26/03
to
I was wondering if anyone had code for a Usercontrol that would have a
property page where you go into the property page and select a picture
on your harddrive (perferably by common dialog not the picture
property, unless picture property is a better way to do this) and then
once you hit ok or apply the usercontrol resizes to the size of the
photo you have chosen. this would also have to hold the variable and
next time you go into program on UserControl_Initialize would get the
picture you selected.

any help would be greatly appreciated.

thanks,
jason

Mike D Sutton

unread,
May 26, 2003, 9:29:56 AM5/26/03
to

Unless you have any other properties you'd like to put into the picture
selection (Such as re-colouring/scaling/cropping and such), it makes sense
to just use the .Picture property rather than a property page IMO.
Rather than mapping this directly through to the usercontrol's .Picture
property, intercept the StdPicture object and read it's scale properties
from there as described in this post:
http://groups.google.co.uk/groups?selm=eq6zX3fGDHA.2204%40TK2MSFTNGP10.phx.gbl
You can then re-size the control accordingly and set the .Picture property.
Hope this helps,

Mike


- Microsoft Visual Basic MVP -
E-Mail: ED...@mvps.org
WWW: Http://www.mvps.org/EDais/


0 new messages