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
Zajímavá 0 před 4340 dny |
Sledovat
Nahlásit
|
Czech,Please.
Doplňuji:
or Russian
Upravil/a: honza19hk
1Kdo udělil odpovědi palec? briketka10
před 4340 dny
|
0 Nominace Nahlásit |
U otázky nebylo diskutováno.
Nový příspěvekBedy | 1528 | |
Michal Kole | 1199 | |
led | 1156 | |
Hlada | 1131 | |
mosoj | 1124 | |
gecco | 904 | |
www | 828 | |
badisko | 817 | |
cochee | 814 | |
Dochy | 725 |
Software |
Hardware |
Internet |
Programování a webdesign |
Sítě |
Bezpečnost |
Ostatní počítače a internet |