|
-
Aug 3rd, 2004, 09:25 AM
#1
Thread Starter
Fanatic Member
hdc property from VB6
After conversion from VB6 to VB.NET the following code shows an error on frmMyMain.hdc.
moPaintEffects.PaintTransparentStdPic(frmMyMain.hdc, frmMyMain.imgOKCircle(i).Left, frmMyMain.imgOKCircle(i).Top, frmMyMain.imgOKCircle(i).Width, frmMyMain.imgOKCircle(i).Height, ....etc..
I know the hdc property is no longer used, but how might this code be changed for .NET?
-
Aug 3rd, 2004, 05:06 PM
#2
Lively Member
VB.NET uses Graphics() in place of hDC for drawing.
VB Code:
Sub Test
dim g as Graphics=me.CreateGraphics()
g.DrawLine(....)
End Sub
If you want to use hDC still with certain functions, maybe try calling the GetDC() api passing in the handle of the object you want.
VB Code:
moPaintEffects.PaintTransparentStdPic(GetDC(CInt(frmMyMain.Handle.ToString)),...
I can do all things with VB.
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
|