home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / browse_1 / brwinc.bas < prev    next >
BASIC Source File  |  1993-07-19  |  3KB  |  50 lines

  1. Option Explicit
  2. ' the BRW_INC.TXT was included here
  3.  
  4. '====== BROWSE CONTROL CONSTANTS ===============================================================
  5. ' Limitative Constants
  6. Global Const BRW_MAX_NO_OF_COLS = 64     ' Maximum number of columns in the browse
  7. Global Const BRW_MAX_COL_WIDTH = 256     ' Maximum column width (in characters)
  8.  
  9. ' Error Codes
  10. Global Const BRW_ERR_BADINDX = 81        ' Invalid index reference to one of the array properties
  11. Global Const BRW_ERR_NO_OF_COLS = 32700  ' Invalid number of columns
  12. Global Const BRW_ERR_COL_NO = 32702      ' Invalid column no
  13. Global Const BRW_ERR_ROW_NO = 32703      ' Invalid row number
  14. Global Const BRW_ERR_COL_WIDTH = 32704   ' Invalid data column width (characters)
  15. Global Const BRW_ERR_COL_WIDTHX = 32705  ' Invalid column width (pixels)
  16.  
  17. ' Available actions (for the Action property)
  18. Global Const BRW_ACT_REFRESHLINE = 1     ' Refresh current line (will trigger one GetLine event)
  19. Global Const BRW_ACT_REFRESHALL = 2      ' Refresh all visible lines / records (impl. RefreshBar)
  20. Global Const BRW_ACT_REFRESHBAR = 3      ' Refresh the vertical scroll bar (not needed normally)
  21. Global Const BRW_ACT_GOBOTTOM = 4        ' Go to the last record in file / scope and refresh all
  22. Global Const BRW_ACT_GOTOP = 5           ' Go to the first record in file / scope and refresh all
  23. Global Const BRW_ACT_UP = 6              ' Skip one record up, if not posible a HitTop is fired
  24. Global Const BRW_ACT_DOWN = 7            ' Skip one record down, if not pos. a HitBottom is fired
  25. Global Const BRW_ACT_RIGHT = 8           ' Move to the next column to the right (if any)
  26. Global Const BRW_ACT_LEFT = 9            ' Move to the next column to the left (if any)
  27. Global Const BRW_ACT_EDIT = 10           ' Edit current cell, if editing is enabled
  28.  
  29. ' Values of the nRowCol argument of the Change event:
  30. Global Const BRW_CHANGE_REC = 0          ' The record no has changed
  31. Global Const BRW_CHANGE_ROW = 1          ' The recno no and the Row have changed
  32. Global Const BRW_CHANGE_COL = 2          ' The column no has changed
  33. Global Const BRW_CHANGE_BOTH = 3         ' Both the row and column no have changed
  34.  
  35. ' Column text display alignment for the ColAlign propriety
  36. Global Const BRW_ALIGN_LEFT = 0          ' The column text is left justified (default):
  37. Global Const BRW_ALIGN_CENTER = 1        ' The column text is centered
  38. Global Const BRW_ALIGN_RIGHT = 2         ' The column text is right justified
  39. Global Const BRW_ALIGNH_LEFT = 4         ' The column header text is left justified (default):
  40. Global Const BRW_ALIGNH_CENTER = 8       ' The column header text is centered
  41. Global Const BRW_ALIGNH_RIGHT = 16       ' The column header text is right justified
  42. '===============================================================================================
  43.  
  44. Function HasFocus (c As Control) As Integer
  45.    ' find out if the control c has focus
  46.    On Error Resume Next
  47.    If Screen.ActiveControl.hWnd = c.hWnd Then HasFocus = True
  48. End Function
  49.  
  50.