• Trainer
  • Forums
  • Suche
  • Members
  • Kalender
  • Hilfe
  • Extras
Forum stats
Show team
Neue Beiträge ansehen
Heutige Beiträge ansehen
Home of Gamehacking - Archiv
Login to account Create an account
Login
Benutzername:
Passwort: Passwort vergessen?
 



  Home of Gamehacking - Archiv Coding Visual Basic 6, VB.NET
« Zurück 1 2 3 4
Form Abrunden VB 2008

Ansichts-Optionen
Form Abrunden VB 2008
DNA Offline
Administrator
*******
Beiträge: 1.330
Themen: 123
Registriert seit: May 2010
Bewertung: 26
#1
28.08.2010, 22:00 (Dieser Beitrag wurde zuletzt bearbeitet: 29.08.2010, 02:51 von DNA.)
Hi,

um die Ecken einer Form abzurunden braucht man folgendes...

Die Funktion

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
    Sub abrunden(ByVal was As Object, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal radius As Integer)
        Dim gp As System.Drawing.Drawing2D.GraphicsPath = New System.Drawing.Drawing2D.GraphicsPath()
        gp.AddLine(x + radius, y, x + width - radius, y)
        gp.AddArc(x + width - radius, y, radius, radius, 270, 90)
        gp.AddLine(x + width, y + radius, x + width, y + height - radius)
        gp.AddArc(x + width - radius, y + height - radius, radius, radius, 0, 90)
        gp.AddLine(x + width - radius, y + height, x + radius, y + height)
        gp.AddArc(x, y + height - radius, radius, radius, 90, 90)
        gp.AddLine(x, y + height - radius, x, y + radius)
        gp.AddArc(x, y, radius, radius, 180, 90)
        gp.CloseFigure()
        was.region = New System.Drawing.Region(gp)
        gp.Dispose()
    End Sub


Folgendes in Form_Load

Code:
abrunden(Me, 0, 0, Me.Width, Me.Height, 20)


Das wars auch schon Wink


~DNA

ACHTUNG: Lesen gefährdet die Dummheit

[Bild: dna-sig.gif]
Suchen
Antworten
Share Thread:            


Nachrichten in diesem Thema
Form Abrunden VB 2008 - von DNA - 28.08.2010, 22:00
RE: Form Abrunden VB 2008 - von chesar - 12.09.2010, 14:27

  • Druckversion anzeigen
  • Thema abonnieren


Benutzer, die gerade dieses Thema anschauen:

  • Kontakt
  • Forum team
  • Forum stats
  • Nach oben
 
  • RSS-Synchronisation
  • Lite mode
  • Home of Gamehacking - Archiv
  • Help
 
Forum software by © MyBB - Theme © iAndrew 2014



Linearer Modus
Baumstrukturmodus