Leaked source code of windows server 2003
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.

96 lines
2.7 KiB

  1. VERSION 5.00
  2. Begin VB.Form ConnectDialog
  3. Caption = "Connect To A Fax Server"
  4. ClientHeight = 1815
  5. ClientLeft = 60
  6. ClientTop = 345
  7. ClientWidth = 6780
  8. BeginProperty Font
  9. Name = "Comic Sans MS"
  10. Size = 12
  11. Charset = 0
  12. Weight = 400
  13. Underline = 0 'False
  14. Italic = 0 'False
  15. Strikethrough = 0 'False
  16. EndProperty
  17. Icon = "connect.frx":0000
  18. LinkTopic = "Form1"
  19. ScaleHeight = 1815
  20. ScaleWidth = 6780
  21. StartUpPosition = 1 'CenterOwner
  22. Begin VB.CommandButton CancelButton
  23. Caption = "Cancel"
  24. Height = 495
  25. Left = 4283
  26. TabIndex = 3
  27. Top = 1200
  28. Width = 1455
  29. End
  30. Begin VB.CommandButton OkButton
  31. Caption = "Ok"
  32. Default = -1 'True
  33. Height = 495
  34. Left = 1080
  35. TabIndex = 2
  36. Top = 1200
  37. Width = 1455
  38. End
  39. Begin VB.TextBox ServerName
  40. BackColor = &H8000000F&
  41. Height = 495
  42. Left = 2400
  43. TabIndex = 1
  44. Top = 120
  45. Width = 4215
  46. End
  47. Begin VB.Label Label1
  48. Caption = "Fax Server Name:"
  49. Height = 375
  50. Left = 120
  51. TabIndex = 0
  52. Top = 240
  53. Width = 2175
  54. End
  55. End
  56. Attribute VB_Name = "ConnectDialog"
  57. Attribute VB_GlobalNameSpace = False
  58. Attribute VB_Creatable = False
  59. Attribute VB_PredeclaredId = True
  60. Attribute VB_Exposed = False
  61. Private Sub CancelButton_Click()
  62. Unload ConnectDialog
  63. End Sub
  64. Private Sub Form_Load()
  65. ServerName.Text = GetSetting("Fax", "FaxTest", "ServerName", "")
  66. ServerName.SelStart = 0
  67. ServerName.SelLength = Len(ServerName.Text)
  68. End Sub
  69. Private Sub Form_Unload(Cancel As Integer)
  70. SaveSetting "Fax", "FaxTest", "Servername", ServerName.Text
  71. End Sub
  72. Private Sub OkButton_Click()
  73. On Error Resume Next
  74. If ServerName.Text = "" Then
  75. msg = "You must specify a fax server name"
  76. MsgBox msg, , "Error"
  77. ServerName.SetFocus
  78. Exit Sub
  79. End If
  80. ServerName.Text = LCase(ServerName.Text)
  81. Err.Clear
  82. Fax.Connect (ServerName.Text)
  83. If Err.Number = 0 Then
  84. Connected = True
  85. Unload ConnectDialog
  86. Exit Sub
  87. Else
  88. msg = "The fax server you specified is not available"
  89. MsgBox msg, , "Error"
  90. Err.Clear
  91. End If
  92. ServerName.SetFocus
  93. End Sub