| |
VB.NET - FortgeschritteneRe: Fade-In,Fade-Out nicht linear | | | Autor: GPM | Datum: 24.12.06 19:43 |
| Schau Dir mal die Demo einer einfachen Bezierkurve mit 4 Punkten an.
Mit der rechten Maustaste werden die 4 Punkte ein- und ausgeblendet.
Eventuell hilft Dir das schon etwas.
Imports System.Drawing.Drawing2D
Public Class Form1
Dim bzpoints() As Point = {New Point(50, 400), New Point(250, 400), New _
Point(400, 400), New Point(450, 100)}
Dim gpath As New GraphicsPath
Dim curpoint As Int32
Dim ptsvisible As Boolean
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As _
System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
curpoint = -1
If ptsvisible AndAlso gpath.IsVisible(e.Location) Then
For i As Int32 = 0 To 3
If Math.Abs(e.X - bzpoints(i).X) < 6 AndAlso Math.Abs(e.Y - _
bzpoints(i).Y) < 6 Then
curpoint = i
End If
Next
End If
If e.Button = Windows.Forms.MouseButtons.Right Then
ptsvisible = Not ptsvisible
Me.Refresh()
End If
End Sub
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As _
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
e.Graphics.SmoothingMode = SmoothingMode.HighQuality
e.Graphics.DrawBezier(New Pen(Color.Yellow, 2), bzpoints(0), bzpoints( _
1), bzpoints(2), bzpoints(3))
If ptsvisible Then
gpath.Reset()
For i As Int32 = 0 To 3
gpath.AddEllipse(bzpoints(i).X - 5, bzpoints(i).Y - 5, 10, 10)
Next
e.Graphics.FillPath(Brushes.Red, gpath)
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles MyBase.Load
Me.SetStyle(ControlStyles.DoubleBuffer Or ControlStyles.UserPaint Or _
ControlStyles.AllPaintingInWmPaint, True)
Me.SetBounds(100, 100, 500, 500)
Me.BackColor = Color.Black
End Sub
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As _
System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
If ptsvisible AndAlso curpoint > -1 AndAlso e.Button = _
Windows.Forms.MouseButtons.Left Then
bzpoints(curpoint) = New Point(e.X, e.Y)
Me.Refresh()
End If
End Sub
End Class MfG GPM | |
Fade-In,Fade-Out nicht linear | 1.430 | Hannes H. | 24.12.06 10:44 | Re: Fade-In,Fade-Out nicht linear | 953 | GPM | 24.12.06 19:43 | Re: Fade-In,Fade-Out nicht linear | 941 | Hannes H. | 24.12.06 20:03 | Re: Fade-In,Fade-Out nicht linear | 899 | Hannes H. | 25.12.06 09:47 | Re: Fade-In,Fade-Out nicht linear | 914 | Hannes H. | 25.12.06 10:25 | Re: Fade-In,Fade-Out nicht linear | 932 | GPM | 25.12.06 14:39 | Re: Fade-In,Fade-Out nicht linear | 901 | Hannes H. | 25.12.06 16:16 | Re: Fade-In,Fade-Out nicht linear | 905 | Hannes H. | 25.12.06 17:05 | Re: Fade-In,Fade-Out nicht linear | 892 | GPM | 25.12.06 18:48 | Re: Fade-In,Fade-Out nicht linear | 1.096 | Hannes H. | 26.12.06 09:41 | Re: Fade-In,Fade-Out nicht linear | 930 | GPM | 26.12.06 11:34 | Re: Fade-In,Fade-Out nicht linear | 953 | GPM | 26.12.06 13:52 | Re: Fade-In,Fade-Out nicht linear | 898 | Hannes H. | 26.12.06 16:18 | Re: Fade-In,Fade-Out nicht linear | 904 | Hannes H. | 30.12.06 09:02 | Re: Fade-In,Fade-Out nicht linear | 1.044 | GPM | 30.12.06 09:59 | Re: Fade-In,Fade-Out nicht linear | 901 | GPM | 30.12.06 11:19 | Re: Fade-In,Fade-Out nicht linear | 882 | Hannes H. | 30.12.06 16:00 | Re: Fade-In,Fade-Out nicht linear | 911 | GPM | 30.12.06 17:29 | Re: Fade-In,Fade-Out nicht linear | 917 | Hannes H. | 30.12.06 18:37 | Re: Fade-In,Fade-Out nicht linear | 969 | GPM | 03.01.07 13:35 | Re: Fade-In,Fade-Out nicht linear | 927 | Hannes H. | 25.01.07 21:07 | Re: Fade-In,Fade-Out nicht linear | 861 | Hannes H. | 20.02.07 10:40 | Re: Fade-In,Fade-Out nicht linear | 971 | GPM | 20.02.07 12:16 | Re: Fade-In,Fade-Out nicht linear | 858 | Hannes H. | 20.02.07 15:50 | Re: Fade-In,Fade-Out nicht linear | 898 | Hannes H. | 23.02.07 09:34 | Re: Fade-In,Fade-Out nicht linear | 866 | Hannes H. | 23.02.07 09:38 | Re: Fade-In,Fade-Out nicht linear | 848 | GPM | 23.02.07 11:16 | Re: Fade-In,Fade-Out nicht linear | 872 | Hannes H. | 23.02.07 12:21 | Re: Fade-In,Fade-Out nicht linear | 992 | Hannes H. | 25.02.07 10:13 | Re: Fade-In,Fade-Out nicht linear | 888 | GPM | 25.02.07 11:54 | Re: Fade-In,Fade-Out nicht linear | 949 | GPM | 25.12.06 18:57 |
| 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 |
|
|
sevOutBar 4.0
Vertikale Menüleisten á la Outlook
Erstellen von Outlook ähnlichen Benutzer- interfaces - mit beliebig vielen Gruppen und Symboleinträgen. Moderner OfficeXP-Style mit Farbverläufen, Balloon-Tips, u.v.m. Weitere InfosTipp des Monats Access-Tools Vol.1
Über 400 MByte Inhalt
Mehr als 250 Access-Beispiele, 25 Add-Ins und ActiveX-Komponenten, 16 VB-Projekt inkl. Source, mehr als 320 Tipps & Tricks für Access und VB
Nur 24,95 EURWeitere Infos
|