1 Ocak 2013 Salı
cmd.exe ' yi ipconfig kod ile çalıştırmak
cmd.exe ' yi ipconfig kod ile çalıştırmak
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click 'bu kod ile diğeri aynı işlevi görür 'Dim myProcess As Process = System.Diagnostics.Process.Start("C:\Windows\System32\cmd.exe /k %windir%\system32\ipconfig.exe") Dim myProcess As Process = System.Diagnostics.Process.Start("C:\Windows\System32\cmd.exe", "/K ipconfig ") myProcess.WaitForExit() 'MessageBox.Show("Exit") myProcess.Close() End Sub
Başlıksız Formu taşımak
Public Class Form1 Private mouse_offset As Point Private Sub Form1_MouseDown(ByVal sender As Object,ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown mouse_offset = New Point(-e.X, -e.Y) End Sub Private Sub Form1_MouseMove(ByVal sender As Object, _ ByVal e As System.Windows.Forms.MouseEventArgs) _ Handles MyBase.MouseMove If e.Button = MouseButtons.Left Then Dim mousePos As Point = Control.MousePosition mousePos.Offset(mouse_offset.X, mouse_offset.Y) Location = mousePos End If End Sub End Class
Text içine yazılan harf sayısını Gösteren kod
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim HarfSay As String = TextBox2.Text Dim karakterSay = (From karakter In HarfSay.ToCharArray Where karakter = "a" Select karakter).Count Label1.text="Toplam Harf Satysı : " & karakterSay End Sub
Sonraki Kayıt
Ana Sayfa