Bir adet label oluşturun ve aşağıdaki kod satirlarını forma yapıştırın. Kod: Private Sub Form_Activate() a: Label1 = Format(Now, "hh:mm:ss") DoEvents GoTo a End Sub
"Visual Basic" kategorisindeki yazıları incelemektesiniz.
Text Renklendirme
07
May 2011
Textlerin Üzerinde Gelindiğinde Arkaplan Değiştirme Ve Textten Çıkıldığında Eski Haline Dönmesi Modüle Yasarsanız Projenin Bütün Formlarında Kullanabilirsiniz. Kod: Public Sub TxtRenkGir(TxtBox As Object, Optional NesneLockedKontrulu As Boolean ) On Error Resume Next If TypeName(TxtBox ) = "TextBox" Then If NesneLockedKontrulu = True And TxtBox.Locked = True Then Exit Sub End If TxtBox.BackColor = &H80FFFF TxtBox.SetFocus TxtBox.SelStart = 0 TxtBox.SelLength = Len(TxtBox ) End Sub Public Sub TxtRenkCik(TxtBox As Object, Optional NesneLockedKontrulu As Boolean ) On Error Resume Next If TypeName(TxtBox ) = "TextBox" Then If NesneLockedKontrulu = True And TxtBox.Locked = True Then Exit Sub End If TxtBox.BackColor = &H80000005...
Ses ayar programı
07
May 2011
basit ses ayar programı ‘bir kaydırma cubuğu(Slider1)(textpozision=0 yapın) ‘ve bir metin kutusu(Text1) ihtiyaç vardır. Kod: Private Declare Function waveOutSetVolume Lib "Winmm" (ByVal wDeviceID As Integer, ByVal dwVolume As Long) As Integer Private Declare Function waveOutGetVolume Lib "Winmm" (ByVal wDeviceID As Integer, dwVolume As Long) As Integer Private Sub Command1_Click() Dim a, i As Long Dim tmp As String a = waveOutGetVolume(0, i) tmp = "&h" & Right(Hex$(i), 4) Text1 = CLng(tmp) End Sub Private Sub Slider1_Scroll() Dim a, i As Long Dim tmp, vol As String Slider1.Min = 0 Slider1.Max = 100 vol = Slider1.Value * 650 Text1 = Slider1.Value...
Web Adresi Açmak
07
May 2011
Web adresleri nasıl açılır ( Bi Butonun veya Labelın Click Olayına Ekleyin ) Kod: Dim iRet As Long Dim Cevap As Integer Cevap = MsgBox("www.cod3r.org adresini açmak istiyor musunuz?", vbInformation + vbYesNo, www.cod3r.org ) Select Case Cevap Case vbYes iRet = Shell("start.exe http://www.cod3r.org", vbNormal ) Case vbNo Exit Sub End Select
Ses Çalmak
07
May 2011
Api Kod: Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long ) As Long Kod: Private Sub Command1_Click( ) çalınacak ses dosyanın adını yazınız... sndPlaySound "sesdosyası.wav", 1 End Sub


