How to draw on Image component?

Moderatoren:crack, Marwin, Krüsty

Antworten
Ignat
Alter Hase
Beiträge:80
Registriert:Samstag 2. August 2003, 11:13
Kontaktdaten:

Beitrag von Ignat » Samstag 9. August 2003, 00:31

Hi!
One question for Visual Basic...:)
For example, I have form and Image component on it (with loaded pricture - JPEG).
I want to draw line on picture by mouse clicking.
I dont want to change images file - only to show line (for example, red color)!
What should I do?

------------------------------------------------------------------------------------------
Rußland
If the ship don't know where to go - it has no fair wind...

Ignat
Alter Hase
Beiträge:80
Registriert:Samstag 2. August 2003, 11:13
Kontaktdaten:

Beitrag von Ignat » Dienstag 12. August 2003, 16:37

Hallo Leute!
In another forum (VBStreets - its the russian forum) I found the answer to my question.
For people who has the problem I had I post this answer here:
I was told that I must use PictureBox (not Image) and use functions:

Code: Alles auswählen

Private Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As POINTAPI) As Long 
Private Declare Function LineTo Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long 
----------------------------------------------------------------------------
Rußland
If the ship don't know where to go - it has no fair wind...

Antworten