| Forum: VB.NET |
Thema:
drag&drop... fieses problem |
Von:
G. Guest (
13.12.2005 20:48) |
hallo,
ich bin am endmonster meines projektes angelangt und weiss nicht mehr weiter.
mit folgendem code lass ich mir in der laufzeit pictureboxes erstellen:
Public Class Form1
Dim pic() As PictureBox
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ReDim pic(0)
pic(0) = New PictureBox
pic(0).Width = 10
pic(0).Height = 10
pic(0).BackColor = Color.Blue
pic(0).Visible = True
pic(0).Parent = Me
pic(0).Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ReDim Preserve pic(pic.GetUpperBound(0) + 1)
pic(pic.GetUpperBound(0)) = New PictureBox
pic(pic.GetUpperBound(0)).Left = pic(pic.GetUpperBound(0) - 1).Left + 20
pic(pic.GetUpperBound(0)).Show()
pic(pic.GetUpperBound(0)).Width = 10
pic(pic.GetUpperBound(0)).Height = 10
pic(pic.GetUpperBound(0)).BackColor = Color.Red
pic(pic.GetUpperBound(0)).Visible = True
pic(pic.GetUpperBound(0)).Parent = Me
pic(pic.GetUpperBound(0)).Show()
End Sub
End Class
kann mir jemand zeigen wie man diese pics nun per drag&drop ziehen kann?
dieses problem ist mir als anfänger eine nummer zu hoch, ich hoffe es gibt hier jemand der ähnliches schon gemacht hat bzw. sich einfach besser auskennt?
danke
| Betreff |
Von |
Datum |
|
|
|
|
Klaas
Wedemeyer
|
20.12.2005 17:45 |
|
|
|
Antworten
Vorsicht bei der Eingabe: Die Zeichen ' oder -- sind nicht erlaubt!