Morgen VB-Pler,
Ich habe mir mit GDI+ ein set von Controls erstellt das ähnlich wie in der Entwiklungslaufzeit einen Rahmen mit Punkten hinzufügt. Das war ja ganz einfach nun mein Problem wie kann ich das Control zur Laufzeit Vergrößern und verkleinern
mein code dazu:
Ich habe mir mit GDI+ ein set von Controls erstellt das ähnlich wie in der Entwiklungslaufzeit einen Rahmen mit Punkten hinzufügt. Das war ja ganz einfach nun mein Problem wie kann ich das Control zur Laufzeit Vergrößern und verkleinern
mein code dazu:
VB.NET-Quellcode
- Protected Overrides Sub OnMouseDown(e As Windows.Forms.MouseEventArgs)
- MyBase.OnMouseDown(e)
- If e.Button = Windows.Forms.MouseButtons.Left Then
- If rect1.Contains(e.Location) Then
- MyBase.Cursor = Windows.Forms.Cursors.PanNW
- End If
- If rect2.Contains(e.Location) Then
- MyBase.Cursor = Windows.Forms.Cursors.PanNE
- End If
- If rect3.Contains(e.Location) Then
- MyBase.Cursor = Windows.Forms.Cursors.PanSW
- End If
- If rect4.Contains(e.Location) Then
- MyBase.Cursor = Windows.Forms.Cursors.PanSE
- End If
- End If
- End Sub
- Protected Overrides Sub OnMouseMove(e As Windows.Forms.MouseEventArgs)
- MyBase.OnMouseMove(e)
- If e.Button = Windows.Forms.MouseButtons.Left Then
- If rect1.Contains(e.Location) Then
- End If
- If rect2.Contains(e.Location) Then
- End If
- If rect3.Contains(e.Location) Then
- End If
- If rect4.Contains(e.Location) Then
- End If
- End If
- End Sub