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

Visual Basic

 
QuestionHow to get computer id? Pin
viettho9-Jun-04 5:37
viettho9-Jun-04 5:37 
AnswerRe: How to get computer id? Pin
Dave Kreskowiak9-Jun-04 6:45
mveDave Kreskowiak9-Jun-04 6:45 
GeneralProgress bar and dataadapter fill Pin
jshofner9-Jun-04 1:56
jshofner9-Jun-04 1:56 
GeneralRe: Progress bar and dataadapter fill Pin
Dave Kreskowiak9-Jun-04 6:43
mveDave Kreskowiak9-Jun-04 6:43 
GeneralWhy onpaint doesn't work in numericupdown Pin
beifangcc8-Jun-04 23:39
beifangcc8-Jun-04 23:39 
GeneralRe: Why onpaint doesn't work in numericupdown Pin
Aaron Eldreth9-Jun-04 3:02
Aaron Eldreth9-Jun-04 3:02 
GeneralRe: Why onpaint doesn't work in numericupdown Pin
beifangcc9-Jun-04 17:30
beifangcc9-Jun-04 17:30 
GeneralRe: Why onpaint doesn't work in numericupdown Pin
10-Jun-04 4:16
suss
10-Jun-04 4:16 
Like I said before, the Numberic Up/Down control is simply a .Net wrapper of the Windows common control.

Basically what this means, Windows draws the control. Not the .Net FCL (Framework Class Library).
Since Windows draws the control, you can't override the OnPaint method to allow theming.

What you would have to do, is inherit from the Control or UserControl. I'm going to assume that you will inherit from the UserControl. What you would do, is place two buttons onto the designer, one for the Up button, the other for Down (You could then theme the buttons, I think). You would then make a property for "Value". Each time the user clicks on one of the buttons, the property "Value" would change accordingly. Then you would use GDI+ to draw the value.
dim g as graphics = me.creategraphics
g.drawstring(val(value), me.font, new brush(me.forecolor), xpos, ypos)


Aaron Eldreth

TheCollective4.com
My Articles

While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy

GeneralRe: Why onpaint doesn't work in numericupdown Pin
beifangcc10-Jun-04 15:55
beifangcc10-Jun-04 15:55 
GeneralRe: Why onpaint doesn't work in numericupdown Pin
Aaron Eldreth11-Jun-04 3:20
Aaron Eldreth11-Jun-04 3:20 
GeneralDropdownlist Pin
dotnet_cpp8-Jun-04 19:50
dotnet_cpp8-Jun-04 19:50 
GeneralRe: Dropdownlist Pin
Dave Kreskowiak9-Jun-04 0:07
mveDave Kreskowiak9-Jun-04 0:07 
Generalgetting listbox contents.. Pin
JasonRey8-Jun-04 16:54
JasonRey8-Jun-04 16:54 
GeneralRe: getting listbox contents.. Pin
Dave Kreskowiak9-Jun-04 6:57
mveDave Kreskowiak9-Jun-04 6:57 
GeneralCode for a Calculator Pin
nofrills138-Jun-04 16:14
nofrills138-Jun-04 16:14 
GeneralRe: Code for a Calculator Pin
Jim Taylor8-Jun-04 22:15
Jim Taylor8-Jun-04 22:15 
GeneralTreeView in run time Pin
Brad Fackrell8-Jun-04 9:16
Brad Fackrell8-Jun-04 9:16 
GeneralRe: TreeView in run time Pin
Dave Kreskowiak8-Jun-04 9:31
mveDave Kreskowiak8-Jun-04 9:31 
GeneralRe: TreeView in run time Pin
Brad Fackrell8-Jun-04 9:36
Brad Fackrell8-Jun-04 9:36 
GeneralRe: TreeView in run time Pin
Dave Kreskowiak8-Jun-04 10:08
mveDave Kreskowiak8-Jun-04 10:08 
GeneralRe: TreeView in run time Pin
Brad Fackrell8-Jun-04 10:12
Brad Fackrell8-Jun-04 10:12 
GeneralRe: TreeView in run time Pin
Brad Fackrell8-Jun-04 11:48
Brad Fackrell8-Jun-04 11:48 
GeneralRe: client/server read and write Pin
fo0lish8-Jun-04 5:45
fo0lish8-Jun-04 5:45 
GeneralRe: client/server read and write Pin
Dave Kreskowiak8-Jun-04 6:47
mveDave Kreskowiak8-Jun-04 6:47 
GeneralRe: client/server read and write Pin
fo0lish9-Jun-04 14:59
fo0lish9-Jun-04 14:59 

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.