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.

86 lines
2.7 KiB

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
  3. Begin VB.Form DeviceListWindow
  4. Caption = "Fax Devices"
  5. ClientHeight = 4830
  6. ClientLeft = 60
  7. ClientTop = 345
  8. ClientWidth = 7575
  9. Icon = "devlist.frx":0000
  10. LinkTopic = "Form2"
  11. MDIChild = -1 'True
  12. ScaleHeight = 4830
  13. ScaleWidth = 7575
  14. Begin ComctlLib.ListView DeviceList
  15. Height = 4575
  16. Left = 120
  17. TabIndex = 0
  18. Top = 120
  19. Width = 7335
  20. _ExtentX = 12938
  21. _ExtentY = 8070
  22. View = 3
  23. LabelWrap = -1 'True
  24. HideSelection = -1 'True
  25. _Version = 327680
  26. ForeColor = -2147483630
  27. BackColor = -2147483633
  28. BorderStyle = 1
  29. Appearance = 1
  30. BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  31. Name = "Comic Sans MS"
  32. Size = 12
  33. Charset = 0
  34. Weight = 400
  35. Underline = 0 'False
  36. Italic = 0 'False
  37. Strikethrough = 0 'False
  38. EndProperty
  39. MouseIcon = "devlist.frx":0442
  40. NumItems = 0
  41. End
  42. End
  43. Attribute VB_Name = "DeviceListWindow"
  44. Attribute VB_GlobalNameSpace = False
  45. Attribute VB_Creatable = False
  46. Attribute VB_PredeclaredId = True
  47. Attribute VB_Exposed = False
  48. Private Sub DeviceList_DblClick()
  49. Set Port = Ports.Item(DeviceList.SelectedItem.Index)
  50. DeviceWindow.MyInit
  51. DeviceWindow.Show
  52. End Sub
  53. Private Sub Form_Load()
  54. On Error Resume Next
  55. Create_ColumnHeaders
  56. Err.Clear
  57. Set Ports = Fax.GetPorts
  58. Dim itmX As ListItem
  59. If Err.Number = 0 Then
  60. For i = 1 To Ports.Count
  61. Set Port = Ports.Item(i)
  62. Set itmX = DeviceList.ListItems.Add(, , CStr(Port.DeviceId))
  63. itmX.SubItems(1) = Port.Name
  64. Next i
  65. Else
  66. Msg = "The fax server could not enumerate the ports"
  67. MsgBox Msg, , "Error"
  68. Err.Clear
  69. Unload DeviceListWindow
  70. End If
  71. End Sub
  72. Private Sub Form_Resize()
  73. DeviceList.Left = DeviceListWindow.ScaleLeft
  74. DeviceList.Top = DeviceListWindow.ScaleTop
  75. DeviceList.Width = DeviceListWindow.ScaleWidth
  76. DeviceList.Height = DeviceListWindow.ScaleHeight
  77. Create_ColumnHeaders
  78. End Sub
  79. Private Sub Create_ColumnHeaders()
  80. DeviceList.ColumnHeaders.Clear
  81. DeviceList.ColumnHeaders.Add , , "DeviceId", 1000
  82. DeviceList.ColumnHeaders.Add , , "Name", DeviceList.Width - 1700
  83. End Sub