Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
4.5 KiB

  1. VERSION 5.00
  2. Object = "{97917068-BB0B-4DDA-8067-B1A00C890F44}#1.0#0"; "rdchost.dll"
  3. Begin VB.Form Form1
  4. Caption = "Salem Client"
  5. ClientHeight = 8355
  6. ClientLeft = 60
  7. ClientTop = 345
  8. ClientWidth = 11775
  9. LinkTopic = "Form1"
  10. ScaleHeight = 8355
  11. ScaleWidth = 11775
  12. StartUpPosition = 3 'Windows Default
  13. Begin RDCCLIENTHOSTLibCtl.SAFRemoteDesktopClientHost SAFRemoteDesktopClientHost1
  14. Height = 6975
  15. Left = 240
  16. OleObjectBlob = "SalemClientUnitTest.frx":0000
  17. TabIndex = 7
  18. Top = 840
  19. Width = 9375
  20. End
  21. Begin VB.CommandButton ChatButton
  22. Caption = "Chat"
  23. Height = 400
  24. Left = 9840
  25. TabIndex = 6
  26. Top = 1590
  27. Width = 1815
  28. End
  29. Begin VB.CommandButton Command5
  30. Caption = "Exit"
  31. Height = 375
  32. Left = 9840
  33. TabIndex = 5
  34. Top = 960
  35. Width = 1815
  36. End
  37. Begin VB.TextBox ConnectParmsTextBox
  38. Height = 375
  39. Left = 2160
  40. TabIndex = 4
  41. Top = 120
  42. Width = 5295
  43. End
  44. Begin VB.CommandButton Command4
  45. Caption = "Stop Remote Control"
  46. Height = 400
  47. Left = 9840
  48. TabIndex = 3
  49. Top = 2835
  50. Width = 1815
  51. End
  52. Begin VB.CommandButton Command3
  53. Caption = "Remote Control"
  54. Height = 400
  55. Left = 9840
  56. TabIndex = 2
  57. Top = 2205
  58. Width = 1815
  59. End
  60. Begin VB.CommandButton Command2
  61. Caption = "Disconnect"
  62. Height = 400
  63. Left = 7680
  64. TabIndex = 1
  65. Top = 120
  66. Width = 1815
  67. End
  68. Begin VB.CommandButton Command1
  69. Caption = "Connect"
  70. Height = 400
  71. Left = 240
  72. TabIndex = 0
  73. Top = 120
  74. Width = 1815
  75. End
  76. Begin VB.Shape Shape1
  77. BackColor = &H0000FF00&
  78. BorderStyle = 0 'Transparent
  79. Height = 180
  80. Left = 11280
  81. Top = 120
  82. Width = 180
  83. End
  84. End
  85. Attribute VB_Name = "Form1"
  86. Attribute VB_GlobalNameSpace = False
  87. Attribute VB_Creatable = False
  88. Attribute VB_PredeclaredId = True
  89. Attribute VB_Exposed = False
  90. Public WithEvents RemoteDesktopClientObj As SAFRemoteDesktopClient
  91. Attribute RemoteDesktopClientObj.VB_VarHelpID = -1
  92. Public ChannelMgr As ISAFRemoteDesktopChannelMgr
  93. Attribute ChannelMgr.VB_VarHelpID = -1
  94. Public WithEvents ChatChannel As ClientDataChannel
  95. Attribute ChatChannel.VB_VarHelpID = -1
  96. Public ChannelsAdded As Boolean
  97. Private Sub OLE1_Updated(Code As Integer)
  98. End Sub
  99. Private Sub ChatButton_Click()
  100. ChatDialog.Show
  101. End Sub
  102. Private Sub Command1_Click()
  103. If Not ChannelsAdded Then
  104. Set RemoteDesktopClientObj = SAFRemoteDesktopClientHost1.GetRemoteDesktopClient
  105. Set ChannelMgr = RemoteDesktopClientObj.ChannelManager
  106. Set ChatChannel = ChannelMgr.OpenDataChannel("70")
  107. ChannelsAdded = True
  108. End If
  109. RemoteDesktopClientObj.ConnectParms = TextBox.Text
  110. Call RemoteDesktopClientObj.ConnectToServer
  111. End Sub
  112. Private Sub Text1_Change()
  113. ChannelsAdded = False
  114. End Sub
  115. Private Sub Command2_Click()
  116. Shape1.BackStyle = 0
  117. RemoteDesktopClientObj.DisconnectFromServer
  118. End Sub
  119. Private Sub Command3_Click()
  120. RemoteDesktopClientObj.ConnectRemoteDesktop
  121. End Sub
  122. Private Sub Command4_Click()
  123. RemoteDesktopClientObj.DisconnectRemoteDesktop
  124. End Sub
  125. Private Sub Command5_Click()
  126. Unload Form1
  127. End Sub
  128. Private Sub ChatChannel_ChannelDataReady(ByVal channelName As String)
  129. Dim Buffer As String
  130. Dim Length
  131. Dim TempString As String
  132. If channelID = 70 Then
  133. ChatDialog.Show
  134. ChatDialog.SetFocus
  135. Buffer = RemoteDesktopClientObj.ReceiveChannelData()
  136. TempString = ChatDialog.OutputChatText.Text & vbCrLf & Buffer
  137. ChatDialog.OutputChatText.Text = TempString
  138. End If
  139. End Sub
  140. Private Sub RemoteDesktopClientObj_Connected()
  141. Shape1.BackStyle = 1
  142. End Sub
  143. Private Sub RemoteDesktopClientObj_Disconnected(ByVal reason As Long)
  144. Shape1.BackStyle = 0
  145. End Sub
  146. Private Sub SAFRemoteDesktopClientHost1_GotFocus()
  147. End Sub