vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
sevDataGrid - Gönnen Sie Ihrem SQL-Kommando diesen krönenden Abschluß!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Fortgeschrittene
Re: Picturebox zur Laufzeit mit mouse größe ändern 
Autor: wincnc
Datum: 11.04.07 19:12

Teil 2:
    Private Sub Form1_Shown(ByVal sender As Object, ByVal e As _
      System.EventArgs) Handles Me.Shown
        Dim N As Integer
        Dim Breite As Double
        Dim Höhe As Double
        Dim lbl As Double
 
        Panel1.Visible = False
 
        For N = 0 To 7
            L(N) = New Label
            With L(N)
                Panel1.Controls.Add(L(N))
                .Name = "vLabel" & CStr(N)
                .TabIndex = N
                .Text = ""
                .Size = New Size(6, 6)
                .BackColor = SystemColors.GradientActiveCaption
                .BorderStyle = BorderStyle.FixedSingle
                AddHandler .MouseMove, AddressOf L_MouseMove
                AddHandler .MouseDown, AddressOf L_MouseDown
            End With
        Next
 
        Panel1.MinimumSize = New Point(25, 25)
        Panel1.Padding = New Padding(2)
        Breite = Panel1.Width / 2
        Höhe = Panel1.Height / 2
        lbl = L(0).Width / 2
 
        L(0).Location = New Point(0, 0)
        L(0).Anchor = AnchorStyles.Left + AnchorStyles.Top
 
        L(1).Location = New Point(CInt(Breite) - CInt(lbl), 0)
        L(1).Anchor = AnchorStyles.Top
 
        L(2).Location = New Point(CInt(Breite * 2) - CInt(lbl * 2), 0)
        L(2).Anchor = AnchorStyles.Right + AnchorStyles.Top
 
        L(3).Location = New Point(CInt(Breite * 2) - CInt(lbl * 2), CInt(Höhe) _
          - CInt(lbl))
        L(3).Anchor = AnchorStyles.Right
 
        L(4).Location = New Point(CInt(Breite * 2) - CInt(lbl * 2), CInt(Höhe * _
          2) - CInt(lbl * 2))
        L(4).Anchor = AnchorStyles.Right + AnchorStyles.Bottom
 
        L(5).Location = New Point(CInt(Breite) - CInt(lbl), CInt(Höhe * 2) - _
          CInt(lbl * 2))
        L(5).Anchor = AnchorStyles.Bottom
 
        L(6).Location = New Point(0, CInt(Höhe * 2) - CInt(lbl * 2))
        L(6).Anchor = AnchorStyles.Left + AnchorStyles.Bottom
 
        L(7).Location = New Point(0, CInt(Höhe) - CInt(lbl))
        L(7).Anchor = AnchorStyles.Left
 
        L(0).Cursor = Cursors.SizeAll
        L(4).Cursor = Cursors.SizeNWSE
        L(1).Cursor = Cursors.SizeNS
        L(5).Cursor = Cursors.SizeNS
        L(2).Cursor = Cursors.SizeNESW
        L(6).Cursor = Cursors.SizeNESW
        L(3).Cursor = Cursors.SizeWE
        L(7).Cursor = Cursors.SizeWE
 
    End Sub
 
    Private Sub Binden(ByVal PBox As System.Windows.Forms.PictureBox)
        Panel1.Location = New Point(PBox.Left - 3, PBox.Top - 3)
        Panel1.Height = PBox.Height + 6
        Panel1.Width = PBox.Width + 6
        PBox.Parent = Panel1
        PBox.Dock = DockStyle.Fill
        PBox.BorderStyle = BorderStyle.FixedSingle
        Panel1.Visible = True
    End Sub
 
    Private Sub Lösen(ByVal PBox As System.Windows.Forms.PictureBox)
        PBox.Parent = Me
        PBox.Dock = DockStyle.None
        PBox.Location = New Point(Panel1.Left + 3, Panel1.Top + 3)
        PBox.Width = Panel1.Width - 6
        PBox.Height = Panel1.Height - 6
        PBox.BorderStyle = BorderStyle.None
        Panel1.Visible = False
    End Sub
 
End Class
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Picturebox zur Laufzeit mit mouse größe ändern2.687F.MUE.KS11.04.07 14:47
Re: Picturebox zur Laufzeit mit mouse größe ändern2.332mikeb6911.04.07 18:11
Re: Picturebox zur Laufzeit mit mouse größe ändern2.203wincnc11.04.07 19:11
Re: Picturebox zur Laufzeit mit mouse größe ändern2.435wincnc11.04.07 19:12
Re: Picturebox zur Laufzeit mit mouse größe ändern2.038F.MUE.KS12.04.07 07:26
Re: Picturebox zur Laufzeit mit mouse größe ändern1.999F.MUE.KS12.04.07 08:58
Re: Picturebox zur Laufzeit mit mouse größe ändern2.241F.MUE.KS12.04.07 09:00

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel