can you convert this VB6 sample code
i have a sample code i downloaded sometime ago,
and i need its functionality.
i have a project that uses code snipets from it,
but after i upgraded to .net, it dont work anymore.
the problem is in the biggest problem is the api calls.
can anyone convert this sample into
a functional vb.net sample.
One Major Thing to change.
Change all refrences from "Form1" that are in "Form1" to Me
You need to refer to an instance of a class, not a class. In .NET a form is a class. Next, you can't use the line method. For:
Form1.picture1.line
change to
Me.Picture1.CreateGraphics.DrawLine()
I don' feel like changing that all, but you can probably fix that much.
Also, replace .HDC
with .Handle
This should solve most if not all of your problems
Re: One Major Thing to change.
Quote:
Originally posted by VBD
Next, you can't use the line method. For:
Form1.picture1.line
change to
Me.Picture1.CreateGraphics.DrawLine()
guess the way the .CreatGraphics.DrawLine() is
used seems very tricky, you cannot do a simple
replacement.
btw, the full vb line for the line is:
Form1.Picture1.Line (aX, aY)-(aX + 725, aY + 2.5 * TwipY), vbBlue, BF
can anyone give a .net equivalent ?!?!