Draw graphics on user forms in excel 2002
I am trying to draw a line in an image control on a user form using VBA (Excel 2002). When using MoveToEx and LineTo (API) I'm supposed to declare an argument called "hdc".
VB Code:
Private Declare Function LineTo Lib "gdi32" Alias "LineTo" ([B]ByVal hdc As Long[/B], ByVal x As Long, ByVal y As Long) As Long
Since the Image control doesn't have a property called hdc i can't use LineTo. I have also tried to find other controls wich have a hdc property, but I can't seem to find one (such as the Picture contol in VBA 6.0).
If anyone could help me with this I'd be grateful.
Re: Draw graphics on user forms in excel 2002
Welcome to the Forums M0RRIS.
You could create your own user control which would be nothing more then a wrapper around the vb6 picturebox
control. Not very elegant or simple but it may work.
Just remembering that there may be an API that could create an hDC. Try a search over at allapi.net for the API.