home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / VISBASIC / VBRIG10A / DEMOSTD.GL_ / DEMOSTD.GL
Text File  |  1994-10-02  |  966b  |  30 lines

  1. Option Explicit
  2.  
  3. Const VBRIG_MODULE_ID_STRING = "DEMOSTD.GLO"
  4. Function CenterForm% (AForm As Form)
  5. '+++ VB/Rig Begin Push +++
  6. Const VBRIG_PROC_ID_STRING = "+CenterForm"
  7. Dim VBRigErr As Integer, VBRigErrMsg As String
  8. On Error GoTo CenterForm_VBRigErr
  9. Call VBRig_Error(VBRIG_PUSH_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING)
  10. '+++ VB/Rig End +++
  11.  
  12. AForm.Move (Screen.Width - AForm.Width) / 2, (Screen.Height - AForm.Height) / 2
  13. CenterForm% = 0
  14.  
  15. '+++ VB/Rig Begin Pop +++
  16. Call VBRig_Error(VBRIG_POP_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING)
  17. Exit Function
  18.  
  19. '===================
  20. CenterForm_VBRigErr:
  21. '===================
  22. VBRigErr = Err
  23. VBRigErrMsg = Error$
  24. Call VBRig_Error(VBRIG_SHOW_ERROR, VBRigErr, VBRigErrMsg, VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING)
  25. Call VBRig_Error(VBRIG_POP_PROC_STACK, 0, "", VBRIG_MODULE_ID_STRING, VBRIG_PROC_ID_STRING)
  26. Exit Function
  27. '+++ VB/Rig End +++
  28. End Function
  29.  
  30.