|
-
Feb 17th, 2001, 09:15 AM
#1
Thread Starter
Lively Member
I have the following code behind a command button:
Dim OldBrush As Long
Dim OldPen As Long
Dim NewBrush As Long
Dim NewPen As Long
Dim Color As Long
Color = RGB(0, 0, 255)
NewPen = CreatePen(PS_SOLID, 3, Color)
OldPen = SelectObject(Form1.hdc, NewPen)
NewBrush = CreateSolidBrush(Color)
OldBrush = SelectObject(Form1.hdc, NewBrush)
Rectangle Form1.hdc, 50, 50, 100, 50
SelectObject Form1.hdc, OldBrush
SelectObject Form1.hdc, OldPen
DeleteObject NewPen
When I click the button, nothing happens at all.
P.S. I do have all the necessary declerations.
On Error Resume Screaming...

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
|