Tampilan Chatting Tampilan Explorer

Frans A. Siagian : Perancangan Komunikasi Client Server Dan Sistem Database, 2008 USU Repository © 2009 Dim rsShut As Recordset Dim rsOff As Recordset Dim rsMsg As Recordset Private Sub Timer1_Timer Timer1.Interval = 200 Dim jud, jud1 As String jud = PERANCANGAN KOMUNIKASI CLIENT SERVER jud1 = DAN SISTEM DATABASE Label1.Caption = Leftjud, j Label2.Caption = Rightjud1, j If j = 1 Then Label1.ForeColor = HFFFF00 ElseIf j 10 Then Label1.ForeColor = HFFFF00 Else Label1.ForeColor = HFFFF00 End If j = j + 1 If j Lenjud + 20 Then j = 1 End If Timer2.Enabled = True End Sub

4.2.3.2.1 Tampilan Chatting

Bentuk tampilan chatting ke client ketika dijalankan dapat dilihat pada Gambar 4.39. Gambar 4.39 Tampilan Chatting ke Client Kode programnya adalah sebagai berikut: Private Sub Connect_Click Winsock1.connect 192.168.10.2, 200 Frans A. Siagian : Perancangan Komunikasi Client Server Dan Sistem Database, 2008 USU Repository © 2009 Status.Caption = Sending request inputText.SetFocus End Sub Private Sub Disconnect_Click Winsock1.Close Status.Caption = Sending close request Unload Me End Sub Private Sub Send_Click Winsock1.SendData inputText.Text End Sub Private Sub Winsock1_Close Status.Caption = Connection closed End Sub Private Sub Winsock1_Connect Status.Caption = Request accepted End Sub Private Sub Winsock1_DataArrivalByVal bytesTotal As Long Dim txt As String Winsock1.GetData txt, vbString outputText.Print txt End Sub Bentuk tampilan chatting ke server ketika dijalankan dapat dilihat pada Gambar 4.40. Gambar 4.40 Tampilan Chatting ke Server Kode programnya adalah sebagai berikut: Option Explicit Private Const NERR_Success As Long = 0 Private Declare Function LockWorkStation Lib user32.dll As Long Private Declare Function NetMessageBufferSend Lib NETAPI32.DLL _ yServer As Any, yToName As Byte, yFromName As Any, yMsg As Byte, ByVal lSize As Long As Long Frans A. Siagian : Perancangan Komunikasi Client Server Dan Sistem Database, 2008 USU Repository © 2009 Private Declare Function SendMessage Lib user32 Alias SendMessageA ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any As Long Dim Str As String Private Sub PicHook_MouseMoveButton As Integer, Shift As Integer, x As Single, y As Single Dim Msg As Long Dim dReturn Msg = x Screen.TwipsPerPixelX Select Case Msg Case WM_LBUTTONUP Single Click dReturn = SetForegroundWindowMe.hwnd Me.Show Case WM_LBUTTONDBLCLK Double Click Me.WindowState = vbNormal dReturn = SetForegroundWindowMe.hwnd Me.Show Case WM_RBUTTONUP PopupMenu Me.mnuPopUp End Select End Sub

4.2.3.2.2 Tampilan Explorer

Bentuk tampilan explorer ketika dijalankan dapat dilihat pada Gambar 4.41. Gambar 4.41 Tampilan Explorer Kode programnya adalah sebagai berikut: Private Declare Sub keybd_event Lib user32 ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long Const VK_CONTROL = H11 Const KEYEVENTF_KEYUP = H2 Const VK_ESCAPE = H1B Const ATTR_NORMAL = 0 Const ATTR_READONLY = 1 Const ATTR_HIDDEN = 2 Const ATTR_SYSTEM = 4 Frans A. Siagian : Perancangan Komunikasi Client Server Dan Sistem Database, 2008 USU Repository © 2009 Const ATTR_VOLUME = 8 Const ATTR_DIRECTORY = 16 Const ATTR_ARCHIVE = 32 Dim FileListFileSpec As String Private Sub cboExtension_Click Clipboard.Clear If TrimcboExtension.Text = Then MsgBox No search pattern yet Exit Sub End If Screen.MousePointer = vbHourglass Dim mFirstPath As String Dim mErrDirDiver As Boolean Dim mDirCount As Integer Dim mNumFiles As Integer If dirList.Path dirList.ListdirList.ListIndex Then dirList.Path = dirList.ListdirList.ListIndex Screen.MousePointer = vbDefault End If filList.Pattern = cboExtension.Text mFirstPath = dirList.Path mDirCount = dirList.ListCount filesCount = 0 Screen.MousePointer = vbDefault If mErrDirDiver = True Then filesCount = 0 dirList.Path = CurDir drvList.Drive = dirList.Path Screen.MousePointer = vbDefault Exit Sub End If If filesCount 0 Then End If filList.Path = dirList.Path DirList_Change Screen.MousePointer = vbDefault End Sub

4.2.3.2.3 Tampilan Program