home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / design / 3ddemo / other.bas < prev    next >
BASIC Source File  |  1995-02-26  |  607b  |  40 lines

  1. Option Explicit
  2.  
  3. Sub CenterForm (fm As Form)
  4.  
  5. Dim itop%, ileft%
  6.  
  7. If fm.WindowState = 0 Then
  8.     itop% = (Screen.Height - fm.Height) / 2
  9.     ileft% = (Screen.Width - fm.Width) / 2
  10.     fm.Move ileft%, itop%
  11. End If
  12.  
  13. End Sub
  14.  
  15. Sub ExitProgram ()
  16.  
  17.  
  18. App3DUnregister
  19.  
  20. End
  21.  
  22.  
  23. End Sub
  24.  
  25. Sub Main ()
  26.  
  27. Dim suc%
  28.  
  29. suc% = App3DRegister()
  30.  
  31. If suc% Then
  32.     Form2.Show
  33. Else
  34.     MsgBox "Could Not Register this application with CTL3DV2.  Try changing the Declare Statements to call CTL3D.DLL instead.  If you get this after doing this, then CTL3D doesn't exist."
  35.     End
  36. End If
  37.  
  38. End Sub
  39.  
  40.