home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Multithrea985736252002.psc / MTDemo.cls < prev   
Encoding:
Visual Basic class definition  |  2001-07-06  |  793 b   |  25 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "MTDemo"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = True
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = True
  14. Sub NewFormThread(OPtr As Long, MainFormHandle As Long)
  15. 'The interesting part is here
  16. 'We store the WindowHandle of the MainWindow and a pointer
  17. 'to the Main Window Form by using the SetProp function against
  18. 'The Hwnd of the New Form as a virtual property
  19.     Dim Frm As New MTFORM
  20.     Frm.Show
  21.     SetProp Frm.hwnd, "MAINHWND", MainFormHandle
  22.     SetProp Frm.hwnd, "OBJPTR", OPtr
  23.     Set Frm = Nothing
  24. End Sub
  25.