Arkadaşlar bir cok kod, profesyonel olarak yapılmış ve kaynak kodlu bircok uygulama ve derslerin bulunduğu visual basic 6.0 sitesi: www.visualbasickod.hostwq.net , virus falan yoktur merak etmeyin bir cok kişinin sorduğu soruların cevaplarını bulabileceği bir site. Bi teşekkur yeter
Ornek olarak bi programı koyuyorum fakat uzun ve karışık. Bu ve bunun gibi bir cok program sitede mevcut. Bilgisayar Kapat 1.0 programı:

MODULE1

Option Explicit
Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
' Constants used to detect clicking on the icon
Public Const WM_LBUTTONDBLCLK = &H203
Public Const WM_RBUTTONUP = &H205
' Constants used to control the icon
Public Const NIM_ADD = &H0
Public Const NIM_MODIFY = &H1
Public Const NIF_MESSAGE = &H1
Public Const NIM_DELETE = &H2
Public Const NIF_ICON = &H2
Public Const NIF_TIP = &H4
' Used as the ID of the call back message
Public Const WM_MOUSEMOVE = &H200
' Used by Shell_NotifyIcon
Public Type NOTIFYICONDATA
cbSize As Long
hWnd As Long
uId As Long
uFlags As Long
ucallbackMessage As Long
hIcon As Long
szTip As String * 64
End Type
'create variable of type NOTIFYICONDATA
Public TrayIcon As NOTIFYICONDATA


FORM1

Option Explicit
Private Declare Sub InitCommonControls Lib "comctl32.dll" ()
Private Declare Function Shell_NotifyIcon Lib "shell32.dll" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Long
Private Type NOTIFYICONDATA
cbSize As Long
hWnd As Long
uId As Long
uFlags As Long
ucallbackMessage As Long
hIcon As Long
szTip As String * 12
End Type
Dim tray As NOTIFYICONDATA
Dim saat As Date
Dim sn As Integer
Private Sub Command1_Click()
If Text1(0).Text = "" Or Text1(1).Text = "" Or Text1(2).Text = "" Then
MsgBox "Lutfen saati doğru olarak giriniz.", vbExclamation, "Bilgisayar Kapat 1.0"
Exit Sub
End If
saat = Text1(0).Text & ":" & Text1(1).Text & ":" & Text1(2).Text
Label8.Caption = saat
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
MsgBox "Bilgisayarın Kapanma Saati: " & saat & " olarak ayarlandı.", vbInformation, "Bilgisayar Kapat 1.0"
Form1.Visible = False
End Sub
Private Sub Command2_Click()
Form1.Visible = False
Form3.Show
End Sub
Private Sub Command3_Click()
Form1.Visible = False
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then
Command1_Click
End If
If KeyAscii 8 Then
If Not IsNumeric(Chr(KeyAscii)) Then KeyAscii = 0
End If
End Sub
Private Sub Timer1_Timer()
Label3.Caption = Date
Label4.Caption = Time
If saat = Time Then
Timer1.Enabled = False
Timer2.Enabled = True
End If
End Sub
Private Sub Form_Initialize()
InitCommonControls
TrayaEkle
Form1.Show
Timer2.Enabled = False
Image1.Picture = Form1.Icon
Image2.Picture = Form1.Icon
End Sub
Private Sub TrayaEkle()
Caption = "Bilgisayar Kapat 1.0"
tray.cbSize = Len(tray)
tray.hWnd = Form1.hWnd
tray.uId = vbNull
tray.szTip = "Bilgisayar Kapat 1.0"
tray.ucallbackMessage = &H200
tray.uFlags = 7
tray.hIcon = Form1.Icon
Shell_NotifyIcon 0, tray
Hide
ScaleMode = 3
App.TaskVisible = False
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'If App.TaskVisible = True Then Stop 'Exit Sub
Select Case X
Case &H203 'cift tıklanırsa
Form1.WindowState = 0
Form1.Show
Case &H201 ' &H201 sol tuş
PopupMenu mnm
End Select
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form3.Show
End Sub
Private Sub mncık_Click()
Form1.Visible = False
Form3.Show
End Sub
Private Sub mngoster_Click()
Form1.Show
End Sub
Private Sub p1_DblClick()
If App.TaskVisible = True Then
Me.Hide
End If
End Sub
Public Sub TraydanKaldır()
Shell_NotifyIcon 2, tray
End Sub
Private Sub Timer2_Timer()
Dim sn2
Form2.Show
sn = sn + 1
sn2 = 10 - sn
Form2.Label2.Caption = sn2
If sn = 10 Then
Timer2.Enabled = False
Timer1.Enabled = True
Shell ("shutdown -s -t 1")
End If
End Sub


FORM2

Private Sub Command1_Click()
Form1.Timer2.Enabled = False
Form3.Show
Form2.Visible = False
End Sub


FORM3

Dim a
Private Sub Form_Load()
a = 0
End Sub
Private Sub Timer1_Timer()
a = a + 1
If a = 3 Then
Form1.TraydanKaldır
End
End If
End Sub
__________________