Click here to Skip to main content
15,887,867 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: speeding up web application response Pin
uglyeyes1-Nov-07 17:03
uglyeyes1-Nov-07 17:03 
GeneralRe: speeding up web application response Pin
Christian Graus1-Nov-07 17:43
protectorChristian Graus1-Nov-07 17:43 
QuestionAdding and Subtracting Dates Pin
GeorgieMPorgie1-Nov-07 13:35
GeorgieMPorgie1-Nov-07 13:35 
AnswerRe: Adding and Subtracting Dates Pin
Luc Pattyn1-Nov-07 13:40
sitebuilderLuc Pattyn1-Nov-07 13:40 
AnswerRe: Adding and Subtracting Dates Pin
Guffa1-Nov-07 13:57
Guffa1-Nov-07 13:57 
GeneralRe: Adding and Subtracting Dates Pin
GeorgieMPorgie6-Nov-07 12:41
GeorgieMPorgie6-Nov-07 12:41 
Questionextended picturebox Pin
2hdass1-Nov-07 13:11
2hdass1-Nov-07 13:11 
AnswerRe: extended picturebox Pin
Dave Kreskowiak1-Nov-07 14:30
mveDave Kreskowiak1-Nov-07 14:30 
First, you don't need a UserControl. All you have to do is create a class file and inherit from PictureBox. Which is what you actually did in the first place. All you did was change the inheritance from UserControl to PictureBox.

Next, it looks like all you're doing is replacing the PictureBox's painting code. To do that, get rid of the OnPaint function and move that code to the Paint event instead. You also won't need to call MyBase.OnPaint(). The OnPaint method is used to raise the Paint event, where the actualy painting occurs.


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


QuestionReference DLL in VB.NET 2003 Pin
kendo171-Nov-07 13:05
kendo171-Nov-07 13:05 
AnswerRe: Reference DLL in VB.NET 2003 Pin
Dave Kreskowiak1-Nov-07 13:38
mveDave Kreskowiak1-Nov-07 13:38 
GeneralRe: Reference DLL in VB.NET 2003 Pin
kendo171-Nov-07 14:58
kendo171-Nov-07 14:58 
QuestionDatabase connection Pin
s3rro1-Nov-07 10:31
s3rro1-Nov-07 10:31 
AnswerRe: Database connection Pin
Dave Kreskowiak1-Nov-07 10:37
mveDave Kreskowiak1-Nov-07 10:37 
AnswerRe: Database connection Pin
Paul Conrad1-Nov-07 15:53
professionalPaul Conrad1-Nov-07 15:53 
GeneralRe: Database connection Pin
Luc Pattyn1-Nov-07 16:02
sitebuilderLuc Pattyn1-Nov-07 16:02 
Questionuse PAINT method in TEXTBOX Pin
saeed_rezaei1-Nov-07 9:41
saeed_rezaei1-Nov-07 9:41 
AnswerRe: use PAINT method in TEXTBOX Pin
Luc Pattyn1-Nov-07 9:56
sitebuilderLuc Pattyn1-Nov-07 9:56 
AnswerRe: use PAINT method in TEXTBOX Pin
Christian Graus1-Nov-07 10:52
protectorChristian Graus1-Nov-07 10:52 
AnswerRe: use PAINT method in TEXTBOX Pin
Ajay.k_Singh1-Nov-07 11:18
Ajay.k_Singh1-Nov-07 11:18 
QuestionLimits of OpenFileDialog (Compact Framework) Pin
Hurricane30001-Nov-07 7:31
Hurricane30001-Nov-07 7:31 
QuestionAdding and nameing Columns To Datagrid Pin
FreakNikon1-Nov-07 4:06
FreakNikon1-Nov-07 4:06 
AnswerRe: Adding and nameing Columns To Datagrid Pin
AliAmjad1-Nov-07 4:37
AliAmjad1-Nov-07 4:37 
Questioninput validation Pin
Abbhie1-Nov-07 2:32
Abbhie1-Nov-07 2:32 
AnswerRe: input validation Pin
AliAmjad1-Nov-07 2:45
AliAmjad1-Nov-07 2:45 
GeneralRe: input validation Pin
Abbhie1-Nov-07 3:37
Abbhie1-Nov-07 3:37 

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.