3 Kasım 2013 Pazar
Form Köşelerini Oval Yapma Kodları
Oto Ekspertiz Cihazları hakkında bilgi almak isterseniz
burayı
tıklayın
Imports System.Drawing.Color Public Class Form1 #Region " windows mesajı" Const TEST_ET As Integer = &H84 Const YAKALA As Integer = &H1 Const BASLIK As Integer = &H2 #End Region Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) Select Case m.Msg Case TEST_ET MyBase.WndProc(m) If m.Result = YAKALA Then m.Result = BASLIK Case Else MyBase.WndProc(m) End Select End Sub 'FORMU YUVARLAK YAPMAK 'Private Sub Mesaj_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint ' Dim Tempshape As New System.Drawing.Drawing2D.GraphicsPath() ' Tempshape.AddEllipse(0, 0, Me.Width, Me.Height) ' Me.Region = New System.Drawing.Region(Tempshape) 'End Sub 'KÖŞELERİNİ OVAL YAPMAK Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Integer, ByVal hRgn As Integer, ByVal bRedraw As Integer) As Integer Private Declare Function CreateRoundRectRgn Lib "gdi32" Alias "CreateRoundRectRgn" (ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer, ByVal X3 As Integer, ByVal Y3 As Integer) As Integer Private Sub Mesaj_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SetWindowRgn(Me.Handle, CreateRoundRectRgn(0, 0, Me.Width, Me.Height, 32, 32), True) End Sub Private Function Control() As Color Throw New NotImplementedException End Function Private Sub Button1_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown If e.Button = Windows.Forms.MouseButtons.Right Then Me.Close() Else If Me.BackColor = Color.Red Then Me.BackColor = Color.RoyalBlue Else Me.BackColor = Red End If End If End Sub Private Sub Button1_MouseLeave(sender As System.Object, e As System.EventArgs) Handles Button1.MouseLeave Dim tooltip As New ToolTip() tooltip.SetToolTip(Button1, "Kapatmak için sağfare tuşunu kullan") End Sub Private Sub Form1_DoubleClick(sender As System.Object, e As System.EventArgs) Handles MyBase.DoubleClick Me.Close() End Sub End Class
Hiç yorum yok:
Yorum Gönder
Sonraki Kayıt
Önceki Kayıt
Ana Sayfa
Kaydol:
Kayıt Yorumları (Atom)
Hiç yorum yok:
Yorum Gönder