Click here to Skip to main content
15,919,893 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Full Text Query Pin
Steven J Jowett16-Feb-09 4:18
Steven J Jowett16-Feb-09 4:18 
Questionhow save image to bitmap file? Pin
hamziak16-Feb-09 1:03
hamziak16-Feb-09 1:03 
GeneralRe: how save image to bitmap file? Pin
Luc Pattyn16-Feb-09 1:07
sitebuilderLuc Pattyn16-Feb-09 1:07 
JokeRe: how save image to bitmap file? Pin
DaveAuld16-Feb-09 1:31
professionalDaveAuld16-Feb-09 1:31 
GeneralRe: how save image to bitmap file? Pin
Steven J Jowett16-Feb-09 3:32
Steven J Jowett16-Feb-09 3:32 
QuestionHow can give a full (AllAccess) permission to a drive? Pin
JUNEYT16-Feb-09 0:39
JUNEYT16-Feb-09 0:39 
AnswerRe: How can give a full (AllAccess) permission to a drive? Pin
Dave Kreskowiak16-Feb-09 2:19
mveDave Kreskowiak16-Feb-09 2:19 
QuestionHow can you resize a User Control at design time using code? [modified] Pin
Paul Hasler15-Feb-09 21:31
Paul Hasler15-Feb-09 21:31 
The Situation
I have created a user control which is similar to a standard slider control but which has quite at few different features such as multiple slider pointers.
The control uses an image to visualise the slider strip background.

Private mySliderStripImage As Image = My.Resources.Horizontal_Slider___Basic_V1___Strip


To make the user control more flexible at design time, I've included a SliderStripImage property.

<Description("(As Image) The image to use for the Slider Strip.")> _
Property SliderStripImage() As Image
    Get
        SliderStripImage = mySliderStripImage
    End Get
    Set(ByVal value As Image)
        mySliderStripImage = value
    End Set
End Property


The control functions correctly, and when I'm working with the control at design time I can change the SliderStripImage property.

The Problem
If I change the SliderStripImage property to an image of a different size at design time, I have to manually resize the control to suit. That is, if I change to a larger image, I have to manually increase the size of the control in order to be able to see all of the new larger image.
I can get the dimensions of the new image with SliderStripImage.Width and SliderStripImage.Height, but how can I get the size of the control to update itself with these values at design time?Confused | :confused:

I thought I'd be able to do it with something along the lines of
Me.Size.Width = SliderStripImage.Width
Me.Size.Height = SliderStripImage.Height

But this doesn't work. I get the message "Expression is a value and therefore cannot be the target of an assignment."

Any advice greatly appreciated.

Paul

modified on Monday, February 16, 2009 4:38 AM

AnswerRe: How can you resize a User Control at design time using code? Further Update - Still Confused Pin
Paul Hasler16-Feb-09 2:00
Paul Hasler16-Feb-09 2:00 
GeneralRe: How can you resize a User Control at design time using code? Further Update - Still Confused Pin
riced16-Feb-09 3:04
riced16-Feb-09 3:04 
GeneralRe: How can you resize a User Control at design time using code? Further Update - Still Confused Pin
Paul Hasler16-Feb-09 13:37
Paul Hasler16-Feb-09 13:37 
GeneralRe: How can you resize a User Control at design time using code? Further Update - Still Confused Pin
riced17-Feb-09 0:58
riced17-Feb-09 0:58 
Questionusing datagrid in visual basic 6 [modified] Pin
spruha36915-Feb-09 18:49
spruha36915-Feb-09 18:49 
AnswerRe: using datagrid in visual basic 6 Pin
Christian Graus15-Feb-09 20:00
protectorChristian Graus15-Feb-09 20:00 
GeneralRe: using datagrid in visual basic 6 Pin
DaveAuld15-Feb-09 22:28
professionalDaveAuld15-Feb-09 22:28 
GeneralRe: using datagrid in visual basic 6 Pin
Dave Kreskowiak16-Feb-09 5:26
mveDave Kreskowiak16-Feb-09 5:26 
GeneralRe: using datagrid in visual basic 6 Pin
Samir Ibrahim16-Feb-09 8:05
Samir Ibrahim16-Feb-09 8:05 
GeneralRe: using datagrid in visual basic 6 Pin
Dave Kreskowiak16-Feb-09 10:08
mveDave Kreskowiak16-Feb-09 10:08 
AnswerRe: using datagrid in visual basic 6 Pin
Nanda_MR15-Feb-09 20:14
Nanda_MR15-Feb-09 20:14 
AnswerRe: using datagrid in visual basic 6 Pin
Samir Ibrahim16-Feb-09 4:56
Samir Ibrahim16-Feb-09 4:56 
Questioncreating and using a sound file in vb.net Pin
akpakwu15-Feb-09 18:40
akpakwu15-Feb-09 18:40 
AnswerRe: creating and using a sound file in vb.net Pin
Christian Graus15-Feb-09 20:02
protectorChristian Graus15-Feb-09 20:02 
AnswerRe: creating and using a sound file in vb.net Pin
Paul Hasler16-Feb-09 0:01
Paul Hasler16-Feb-09 0:01 
Questionvb.net datagrid Pin
hrishiS15-Feb-09 18:26
hrishiS15-Feb-09 18:26 
AnswerRe: vb.net datagrid Pin
Andy_L_J15-Feb-09 19:00
Andy_L_J15-Feb-09 19:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.