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.

205 lines
6.0 KiB

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
  3. Object = "{E1A6B8A3-3603-101C-AC6E-040224009C02}#1.0#0"; "IMGTHUMB.OCX"
  4. Object = "{6D940288-9F11-11CE-83FD-02608C3EC08A}#1.0#0"; "IMGEDIT.OCX"
  5. Begin VB.Form Form1
  6. Caption = "Fax Tiff VB Test App"
  7. ClientHeight = 6510
  8. ClientLeft = 60
  9. ClientTop = 345
  10. ClientWidth = 10125
  11. LinkTopic = "Form1"
  12. ScaleHeight = 6510
  13. ScaleWidth = 10125
  14. StartUpPosition = 3 'Windows Default
  15. Begin ImgeditLibCtl.ImgEdit ImgEdit1
  16. Height = 6135
  17. Left = 5520
  18. TabIndex = 9
  19. Top = 240
  20. Width = 4455
  21. _Version = 65536
  22. _ExtentX = 7858
  23. _ExtentY = 10821
  24. _StockProps = 96
  25. BorderStyle = 1
  26. ImageControl = "ImgEdit1"
  27. End
  28. Begin VB.CommandButton Command2
  29. Caption = "&Get Next Fax..."
  30. Height = 735
  31. Left = 2400
  32. TabIndex = 8
  33. Top = 120
  34. Width = 2055
  35. End
  36. Begin VB.TextBox Text3
  37. BackColor = &H008080FF&
  38. BeginProperty Font
  39. Name = "Courier New"
  40. Size = 12
  41. Charset = 0
  42. Weight = 400
  43. Underline = 0 'False
  44. Italic = 0 'False
  45. Strikethrough = 0 'False
  46. EndProperty
  47. Height = 420
  48. Left = 2520
  49. Locked = -1 'True
  50. TabIndex = 7
  51. Top = 2145
  52. Width = 2775
  53. End
  54. Begin VB.TextBox Text2
  55. BackColor = &H008080FF&
  56. BeginProperty Font
  57. Name = "Courier New"
  58. Size = 12
  59. Charset = 0
  60. Weight = 400
  61. Underline = 0 'False
  62. Italic = 0 'False
  63. Strikethrough = 0 'False
  64. EndProperty
  65. Height = 420
  66. Left = 2520
  67. Locked = -1 'True
  68. TabIndex = 6
  69. Top = 1665
  70. Width = 2775
  71. End
  72. Begin VB.TextBox Text1
  73. BackColor = &H008080FF&
  74. BeginProperty Font
  75. Name = "Courier New"
  76. Size = 12
  77. Charset = 0
  78. Weight = 400
  79. Underline = 0 'False
  80. Italic = 0 'False
  81. Strikethrough = 0 'False
  82. EndProperty
  83. Height = 420
  84. Left = 2520
  85. Locked = -1 'True
  86. TabIndex = 5
  87. Top = 1185
  88. Width = 2775
  89. End
  90. Begin ThumbnailLibCtl.ImgThumbnail ImgThumbnail1
  91. Height = 2775
  92. Left = 120
  93. TabIndex = 1
  94. Top = 3600
  95. Visible = 0 'False
  96. Width = 5175
  97. _Version = 65536
  98. _ExtentX = 9128
  99. _ExtentY = 4895
  100. _StockProps = 97
  101. BackColor = 8421631
  102. BorderStyle = 1
  103. BackColor = 8421631
  104. ThumbBackColor = -2147483643
  105. ScrollDirection = 0
  106. End
  107. Begin MSComDlg.CommonDialog CommonDialog1
  108. Left = 4680
  109. Top = 360
  110. _ExtentX = 847
  111. _ExtentY = 847
  112. _Version = 327680
  113. DefaultExt = "tif"
  114. DialogTitle = "Fax Tiff File Open"
  115. FileName = "*.tif"
  116. Filter = "*.tif"
  117. InitDir = "c:\"
  118. End
  119. Begin VB.CommandButton Command1
  120. Caption = "&Open A TIFF File..."
  121. Height = 735
  122. Left = 120
  123. TabIndex = 0
  124. Top = 120
  125. Width = 2055
  126. End
  127. Begin VB.Label Label3
  128. Caption = "Recip Number:"
  129. Height = 255
  130. Left = 360
  131. TabIndex = 4
  132. Top = 2280
  133. Width = 1935
  134. End
  135. Begin VB.Label Label2
  136. Caption = "CSID:"
  137. Height = 255
  138. Left = 360
  139. TabIndex = 3
  140. Top = 1800
  141. Width = 1935
  142. End
  143. Begin VB.Label Label1
  144. Caption = "Receive/Send Time:"
  145. Height = 255
  146. Left = 360
  147. TabIndex = 2
  148. Top = 1320
  149. Width = 1935
  150. End
  151. End
  152. Attribute VB_Name = "Form1"
  153. Attribute VB_GlobalNameSpace = False
  154. Attribute VB_Creatable = False
  155. Attribute VB_PredeclaredId = True
  156. Attribute VB_Exposed = False
  157. Dim FaxTiff As Object
  158. Dim FaxServer As Object
  159. Private Sub Command1_Click()
  160. CommonDialog1.CancelError = True
  161. CommonDialog1.ShowOpen
  162. ImgThumbnail1.Visible = True
  163. ImgThumbnail1.Image = CommonDialog1.filename
  164. FaxTiff.Image = CommonDialog1.filename
  165. Text1.Text = FaxTiff.ReceiveTime
  166. Text2.Text = FaxTiff.Csid
  167. Text3.Text = FaxTiff.RecipientNumber
  168. ErrHandler:
  169. Exit Sub
  170. End Sub
  171. Private Sub Command2_Click()
  172. On Error Resume Next
  173. FaxTiff.Image = FaxServer.GetNextFax
  174. If Err.Number = 0 Then
  175. Text1.Text = FaxTiff.ReceiveTime
  176. Text2.Text = FaxTiff.Csid
  177. Text3.Text = FaxTiff.RecipientNumber
  178. ImgThumbnail1.Visible = True
  179. ImgThumbnail1.Image = FaxTiff.Image
  180. ImgEdit1.Image = FaxTiff.Image
  181. ImgEdit1.Visible = True
  182. ImgEdit1.Page = 1
  183. ImgEdit1.Display
  184. Else
  185. Msg = "No faxes available"
  186. MsgBox Msg, , "Fax Router"
  187. Err.Clear
  188. End If
  189. End Sub
  190. Private Sub Form_Load()
  191. On Error Resume Next
  192. Set FaxTiff = CreateObject("FaxTiff.FaxTiff")
  193. Set FaxServer = CreateObject("FaxQueue.FaxQueue")
  194. FaxServer.Connect = "weswhome"
  195. If Not Err.Number = 0 Then
  196. Msg = "Could not connect to fax server"
  197. MsgBox Msg, , "Fax Router"
  198. Err.Clear
  199. End If
  200. End Sub