home *** CD-ROM | disk | FTP | other *** search
- vxbtut1
- Business Card Directory Browse
- Form2%
- MemoBox
- ButtonExit
- E&xit
- ButtonIndex
- &Order
- ButtonAgain
- A&gain
- ButtonSearch
- &Search
- ButtonDelete
- &Delete
- ButtonAdd
- ButtonEdit
- &Edit
- BrowseBox
- Form_Click
- Form_Load
- OpenFileS
- Enabled
- FALSE
- ExitMenu
- PckFile
- PackFile
- vxFilter
- vxTop
- vxEof
- EditMode
- ADDING(
- vxbtut2?
- vxTableDeclare
- VX_RED3
- vxTableFieldO
- VX_EXPRt
- VX_FIELD
- vxBrowseCase
- VX_UPPER
- vxBrowseSetupL
- TRUEY
- VX_SEMIBOLD0
- StateDbf
- vxUseDbf
- StateNtx
- vxUseNtx%
- vxSelectDbfb
- DbfAreao
- vxSelectNtx
- NtxArea2
- Form_Paint
- vxFormFramef
- vxbtut1
- hWndJ
- vxCtlStyle
- BrowseBox
- VX_RECESS
- MemoBoxf
- vxCtlBrowse+
- vxCtlHwnd
- NtxArea1n
- Form_Resize
- Form_Unload
- Cancel
- vxCtlBrowseMsgH
- VXB_CLOSE
- vxCloseAll
- vxWindowDereg
- ButtonExit_Clickn
- ButtonEdit_Click
- UPDATING
- RecNum
- VXB_GETCURRENTREC
- vxGoy
- BrowseBox_Change
- BrowseBox_KeyPress
- KeyAscii
- ButtonAdd_Click
- VXB_REFRESH
- TopRec
- VXB_GETTOPREC
- vxRecNum
- ButtonDelete_Clickb
- DELETING
- DeleRec3
- vxbtut0"
- vxRecNo
- VX_GRAY
- vxBrowsePos
- MousePointer
- frame9
- BrowseBox_KeyDown
- KeyCode
- Shift
- button
- StatBox
- StatBar
- firstN
- keydown*
- fromM
- NewRec
- vxAppendBlank
- vxReplString
- CoBox|
- vxWrite8
- ButtonAgain_Click
- pointer
- added
- FirstTime
- ButtonIndex_ClickV
- NtxAr
- NtxArea2
- CANCELLED
- TopRecNum
- vxbasea
- version
- less/
- vxLockRecordz
- vxDeleteRec%
- vxUnlock>
- ElseDeleRec
- ButtonSearch_Click
- SeekStr
- contained
- browse
- VXB_SEARCHPRG
- ButtonAgain
- VXB_SEARCHAGAIN00
- VXB_SEARCHAGAIN
- vxNumRecs
- hardware
- Form_QueryUnload
- UnloadModeS
- BrowseRunning
- MemoBox_Change
- Form_LostFocus
- ButtonEdit_KeyPress
- ButtonAgain_KeyDownI
- vxTableReset
- BofExpr
- EofExpr
- vxSeek4
- newkey
- vxField
- oldkey
- vxBrowseArray
- static switch set to TRUE in form
- load procedure so we know when this
- form is first loaded
- BrowseBox_KeyDown
- whenever a record is highlighted, thist
- proc receives a middle button codec
- from the ctlBrowse so we can dynamicallya
- display data in another text box if we like
- middle button?w
- Record Number
- if INSERT key is pressed, emulate
- Add Button pressr
- If DELETE key is pressed, emulate
- Delete button press
- BrowseBox_KeyPress
- if ENTER key is received (also sent byt
- double clicking), then edit the recordc
- NOTE: YOU MUST ALWAYS TRAP THE ENTER KEY
- AND CHANGE THE KEYASCII CODE TO
- A ZERO WHEN USING VXCTLBROWSE
- EVEN IF YOU DON'T USE IT-
- if ESC key is received, then emulatel
- exit button press
- ButtonAdd_Click
- set global so edit form knows what we're doing)
- get browse top rec so if user cancels add
- we have some place to restart the browseo
- show edit form as modal so it has to be dealt
- with before we come back here
- If user didn't cancel, get current record
- pointer. It will be the new record.
- restart the browse with either the new
- record or the old top recorde
- activity
- SOFTWARE
- activity
- company
- activity
- company
- ButtonAgain_Click
- search for same string againg
- ButtonDelete_Click
- save current browse state
- Deleting record
- Issue confirmation message for delete
- Confirm Delete
- if yes, then delete the recordl
- lock the record before deleting
- check to see if there are any records
- leftk
- if all gone, eof will
- be true
- else set up NEXTN
- rec for restart
- pretend user cancelled
- if we can't locke
- user is cancelling deletion
- no records left
- user cancelled delete
- restart the browseo
- Record Number
- ButtonEdit_Click
- set global so edit form knows what we're doingo
- get current and top records so we haveh
- some place to go when we come back here
- position record pointer for edit form
- always use a modal form for editing
- because we don't want the user to
- click on the browse window and mess everythingh
- up while we are editing the recordc
- restart browse at old top recordc
- use code below if you want the browse display
- to restart at the edited record instead of the
- old top record and comment out line above.e
- (close old browse to clear the screen because
- the new top position may be near the end of the
- file and there may not be enough records leftl
- to overwrite any old ones that were in the
- table)
- k& = vxCtlBrowseMsg(vxCtlHwnd(BrowseBox), VXB_CLOSE, 0)
- j% = vxCtlBrowse(vxCtlHwnd(BrowseBox), DbfArea, NtxArea1, 0, RecNum&, vxCtlHwnd(MemoBox), "bmemo").
- ButtonExit_Click
- on exit, unload this form
- ButtonIndex_Click
- swap index order in the browse box-
- close the browse
- swap the indexes and change the table slightly-
- so if activity index, activity shows first
- release browse table memory
- Activity
- left(activity,20)
- Company
- left(company,20)
- Phone
- phone
- State
- state
- Country
- country
- re-open the browse in the new order
- bmemo
- Company
- left(company,20)
- Phone
- phone
- Activity
- left(activity,20)
- State
- state
- Country
- country
- re-open the browse in the new order
- bmemo
- display dynamic data for first show of the browse
- Record Number
- ButtonSearch_Click
- search for a string passed by the user that
- is contained within the browse tablea
- Search string?
- Search for String
- Form_Load
- set FirstTime switch on for Paint
- Disable menu items that could interfere
- search again button is disabled because
- we haven't specified a search string yet
- register the default database as the master
- we'll call the browse first time always
- using NtxArea1. The "Order" button will
- change the index to the one currently NOT
- selectedh
- set up the browse
- Company
- left(company,20)
- Phone
- phone
- Activity
- left(activity,20)
- State
- state
- Country
- country
- If the typeface is too large on your display,
- CHANGE the parameter following "Helv" above toe
- a smaller numberm
- change the mouse pointer in the browse box
- from an I-Beam to an arrow to stop any flickerc
- Form_Paint
- register the database with this windown
- make the form 3-d
- initiate the browse the first time only
- bmemo
- on initial paint of the browse, middle button
- keydown is not sent to browse box so we wantw
- to do our dynamic display here as well as
- from a keydown in the browse box code
- Record Number
- Form_Resize
- if form is resized, redraw so old
- frame is erased
- Form_Unload
- close the browse-
- close all the files
- deregister the window and release memorym
- Re-enable menu items on controller form
- clear status bar
-