home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / ctrl_3d / ctl3d.bas
BASIC Source File  |  1994-07-07  |  1KB  |  22 lines

  1. Declare Function GetModuleHandle Lib "Kernel" (ByVal ModuleName As String) As Integer
  2. Declare Function Ctl3dAutoSubclass Lib "Ctl3D.DLL" (ByVal hInst As Integer) As Integer
  3. Declare Function Ctl3dRegister Lib "Ctl3D.DLL" (ByVal hInst As Integer) As Integer
  4. Declare Function Ctl3dUnregister Lib "Ctl3D.DLL" (ByVal hInst As Integer) As Integer
  5.  
  6. Sub EndApp3D ()
  7.     Rem This Sub is used to end the 3D effects
  8.     Rem IMPORTANT: you must end 3D effects before your app ends
  9.     Inst% = GetModuleHandle(App.EXEName)  ' Get program's ModuleHandle.
  10.     ' Inst% = GetModuleHandle("VB.EXE")   ' Use this line when running in the VB environment
  11.     ret = Ctl3dUnregister(Inst%)          ' Unregister the program.
  12. End Sub
  13.  
  14. Sub StartApp3D ()
  15.     Rem Use this to start the 3D dialogs
  16.     Inst% = GetModuleHandle(App.EXEName)  ' Get program's ModuleHandle.
  17.     ret = Ctl3dRegister(Inst%)            ' Register program w/ Ctl3d.
  18.     ret = Ctl3dAutoSubclass(Inst%)        ' Subclass the program.
  19.     ' Inst% = GetModuleHandle("VB.EXE")   ' Use this line when running in the VB environment
  20. End Sub
  21.  
  22.