Avatar uživatele
Pokročilý

HOW TO MAKE e.Graphics.DrawImage/myBitmap TRUE (click)

when I have some code like this:

Private Sub MakeTransparent_Example1(ByVal e As PaintEventArgs)

' Create a Bitmap object from an image file.
Dim myBitmap As New Bitmap("Grapes.gif")

' Draw myBitmap to the screen.
e.Graphics.DrawImage(myBitmap, 0, 0, myBitmap.Width, _
myBitmap.Height)

' Make the default transparent color transparent for myBitmap.
myBitmap.MakeTransparent()

' Draw the transparent bitmap to the screen.
e.Graphics.DrawImage(myBitmap, myBitmap.Width, 0, myBitmap.Width, _
myBitmap.Height)

End Sub

How can I make this drawned shape "true", whitch code I should use to make something, some action, when I clicked on this shape.

I mean/need something like this:

Private Sub e. Graphics. DrawImage. myBitmap_Click(sender As Object, e As EventArgs) Handles e. Graphics. DrawImage. myBitmap. Click
If True Then e. Graphics. DrawImage. myBitmap. BackColor = Color.Black
End Sub

Basicly, I have a button1 in RED color and I need this: when I click on the one of shapes I need turn color of this shape to RED and when color of button1 is BLUE and I click on the one of shapes I need turn color of this shape to BLUE and so on. But here is the point: I have a lot of irregular shapes fitting into each other (like puzzles), so please, how should I do It? Thank you for your answer.

And If you have another solusion for these irregular shapes fitting into each other (like puzzles) whitch should change color or at least change themselves with picture of the same shape, but same color, it will be grat. Thanks

Odpovědi:

Avatar uživatele
Stříbrný

Czech,Please.
Doplňuji:
or Russian

 

Diskuze k otázce

 

U otázky nebylo diskutováno.

 

Přihlásit se

Položte otázku, odpovězte, zapojte se, …

začněte zde

Reklama

Kvalitní odpovědi v: Počítače a internet

Zlatý Bedy 1525
Zlatý Michal Kole 1198
Zlatý mosoj 1028
Zlatý Hlada 949
Zlatý ge0rge 894
Zlatý www 829
Zlatý led 819
Zlatý badisko 818
Zlatý gecco 795
Zlatý arygnoc 674

Zobrazit celkový žebříček

Facebook

 

Váš požadavek se vyřizuje, počkejte prosím.