2011'den beri104 mesaj
Sabitlenmesi mükemmel olur =)
Visual Basic:
Programın kapanmasını engellemek(Form1'in altına)
Kendini Kopyalama:
Varsayılan tarayıcıdan site açmak.
Kendini silme:
FormBorderStyle None iken Form'u hareket ettirebilme:(Form1'in Altına)
C#
Internet sitesi açtırma:
Visual Basic:
Programın kapanmasını engellemek(Form1'in altına)
Protected Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
Const CS_NOCLOSE As Integer = &H200
cp.ClassStyle = cp.ClassStyle Or CS_NOCLOSE
CS_NOCLOSE.ToString.Trim()
Return cp
End Get
End PropertyKendini Kopyalama:
Dim Path As String = "C:\"
System.IO.File.Copy(Application.ExecutablePath, Path + System.IO.Path.GetFileName(Application.ExecutablePath))Varsayılan tarayıcıdan site açmak.
Shell("explorer.exe http://www.siteadı.com/")Kendini silme:
Dim kod As String
kod = My.Application.Info.DirectoryPath
Kill(kod & "\sil.exe")FormBorderStyle None iken Form'u hareket ettirebilme:(Form1'in Altına)
Dim IsDraggingForm As Boolean = False
Private MousePos As New System.Drawing.Point(0, 0)
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseDown
If e.Button = MouseButtons.Left Then
IsDraggingForm = True
MousePos = e.Location
End If
End Sub
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseUp
If e.Button = MouseButtons.Left Then IsDraggingForm = False
End Sub
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseMove
If IsDraggingForm Then
Dim temp As Point = New Point(Me.Location + (e.Location - MousePos))
Me.Location = temp
temp = Nothing
End If
End SubC#
Internet sitesi açtırma:
system.diagnostics.process.start("explorer.exe", "http://www.siteadı.com")