Click here to Skip to main content
15,905,963 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
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 
Well after a few more hours of banging my head against the keyboard I've managed to get a solution that works. But to be honest I don't fully understand why it works. Perhaps someone with a bit more knowledge could explain it?

While reading more about the System.Windows.Forms.UserControl class in the MSDN (http://msdn.microsoft.com/en-us/library/system.windows.forms.usercontrol.aspx[^]), I noticed the following lines in some example code:
' Size the user control.
Size = New System.Drawing.Size(375, 150)

So I modified my SliderStripImage property to
<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
        Size = New System.Drawing.Size(SliderStripImage.Width, SliderStripImage.Height)
    End Set
End Property

This raises some questions:
1.Why haven't we had to specify what Size refers to with something like Me.Size?
2.Why are we creating a New object every time the property changes? Doesn't the control already exist?

Of course, nobody likes putting lines of code in their work that they don't understand themselves. Sigh | :sigh:

Can anyone shed some light on this?Confused | :confused:

Regards

Paul
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 
Question[Message Deleted] Pin
spruha36915-Feb-09 17:40
spruha36915-Feb-09 17:40 

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.