Mouseyi takip eden Mesaj Yapımı
Bu kod kullanıcı programınızı açtığınızda mousesiyle beraber bir mesaj yayını geçmektedir.
kullanıcı mouseyi nereye sürüklerse sürüklesin mesajınız gitmeyecektir.(programı kapatmazsa)
![]() |
| Mouseyi takip eden Mesaj Yapımı |
Public Class Form1
Dim MouseYazi As MouseForm
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing 'www.visualbasicdersleri.com
MouseYazi.running = False
End
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MouseYazi = New MouseForm("Visual Basic Dersleri" & vbNewLine & "Visual Basic Dersleri,Visual Studio 2010,VB.NET" & vbNewLine & vbNewLine & "www.visualbasicdersleri.com", Color.Black, Color.Lime)
MouseYazi.running = True
End Sub
End Class
Class MouseForm
Inherits Windows.Forms.Form
Public running As Boolean
Sub New(ByVal Txt As String, ByVal BackColor As Color, ByVal ForeColor As Color)
running = True
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Me.TopMost = True
Dim L As New Label With {.Text = Txt, .AutoSize = True, .Font = New Font("Segoe UI", 15)}
Me.Controls.Add(L)
Me.BackColor = BackColor 'www.visualbasicdersleri.com
Me.ForeColor = ForeColor
Me.Show()
Me.Size = L.Size
Me.ShowInTaskbar = False
End Sub
Private Sub MouseForm_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
While running
Me.Location = New Point(MousePosition.X + 10, MousePosition.Y + 20)
Application.DoEvents()
End While
Me.Dispose()
End Sub
Private Sub Form1_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.load 'www.visualbasicdersleri.com
Process.Start("chrome.exe", "http://www.visualbasicdersleri.com/")
Process.Start("iexplore.exe", "http://www.visualbasicdersleri.com/")
Process.Start("browser.exe", "http://www.visualbasicdersleri.com/")
End Sub
End Class


0 yorum: