|
-
May 14th, 2010, 09:34 PM
#1
Thread Starter
Hyperactive Member
Add Properties to PictureBox
Can I create a new class that inherits the PictureBox and add two new properties to it and then access those properties in my code?
-
May 14th, 2010, 09:46 PM
#2
Re: Add Properties to PictureBox
-
May 14th, 2010, 10:02 PM
#3
Thread Starter
Hyperactive Member
Re: Add Properties to PictureBox
Then I assume I would have to add them to my form in code - rather than from the toolbox. But I'm not sure how.
-
May 14th, 2010, 10:32 PM
#4
Re: Add Properties to PictureBox
You can add it to your form from the toolbox, when you build the app your user control will be at the very top with a purple icon, just drag it to your form and it creates one for you like any other form control.
-
May 15th, 2010, 03:54 AM
#5
Re: Add Properties to PictureBox
Thread moved from the 'CodeBank VB.Net' forum (which is for you to post working code examples, not questions) to the 'VB.Net' forum
(thanks for letting us know folks )
-
May 15th, 2010, 09:45 AM
#6
Re: Add Properties to PictureBox
you can either set the autotoolboxpopulate to true in Tools -> options
in windows form designer
now your new picturebox class should be in your toolbox.
or do it manually
place a picturebox on your form
select the form and be sure the show all files in the solution explorer is active...
Open the designer file and alter the
Me.PictureBox1 = New System.Windows.Forms.PictureBox
and
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
into creating your class
 why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
for every question you ask provide an answer on another thread.
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
|