home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
db_grid
/
demoform.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1994-03-03
|
17KB
|
479 lines
DemoForm
DBT Grid Demonstration Program
Wingdings
Form1,
ColumnLabel
Column:
ColumnPosition
Label1
Visible Columns:
NVisibleColumns
Label3
Left Visible Column:
LeftColumn
RowLabel
RowPosition
Label2
Visible Rows:
NVisibleRows
Label4
Top Visible Row:
TopVRow
DBTGrid1
DBTGrid
$(Copyright (C)-1993, by Douglas A. Bebber&
MNU_GridSettings
&Grid Settings
MNU_ColS
&Columns
MNU_ColumnLabels
&Column labels
MNU_ColLabelsNone
&None
MNU_ColLabelLetters
&Letters
MNU_ColLabNum
&Numbers
MNU_ColLabelUser
&User defined
MNU_ColFix
MNU_ColFixTrue
&True
MNU_ColFixFalse
&False
MNU_ColResize
&Resize
MNU_ColResizeTrue
&True
MNU_ColResizeFalse
&False
MNU_ColSelect
&Selection
MNU_ColSelNone
&None
MNU_ColSelectSingle
&Single Column
MNU_ColSelMulti
&Multi Column
MNU_EditKeys
Edit &keys
MNU_AEK
&AbortEditKey
MNU_BEK
&BeginEditKey
MNU_EEK
&EndEditKey
MNU_Edit
&Edit mode
MNU_EditOn
MNU_EditOff
MNU_Font
&Fonts
MNU_FBold
MNU_FBT
MNU_FBF
False
MNU_FontName
" MNU_Arial
Arial
MNU_Courier
Courier
MNU_Fences
Fences
MNU_Fixedsys
Fixedsys
MNU_Modern
Modern
MNU_MSS
MS Sans Serif
MNU_MSSerif
MS Serif
MNU_MTExtra
MT Extra
* MNU_Roman
Roman
MNU_Script
Script
MNU_SmallFonts
Small Fonts
MNU_Symbol
Symbol
MNU_System
System
MNU_Terminal
Terminal
MNU_TNR
Times New Roman
MNU_WDG
Wingdings
MNU_GridLines
&Grid lines
< MNU_Horiz
&Horizontals
MNU_HorizOn
MNU_HorizOff
? MNU_Verts
&Verticals
MNU_RowVertOn
MNU_VertsOff
MNU_RowS
&Rows
MNU_RowLab
&Labels
MNU_RowLabNo
&None
MNU_RowLabBut
Row &buttons
MNU_RowLabNum
Row &numbers
MNU_RowSel
&Selection
MNU_RowSelNone
&None
MNU_RowSelSingle
&Single Row
MNU_RowSelMulti
&Multi row
MNU_Delete
&Delete
MNU_DeleteColumn
&Column
MNU_DeleteRow
MNU_Insert
&Insert
MNU_InsertColumn
&Column
MNU_InsertRow
MNU_MoveIt
&Move
MNU_MoveColumn
&Column
MNU_MoveRow
MNU_Quit
&Quit
Label1_Click
MNU_Quit_Click
Form_Click
@ Form_Load"
DBTGrid1
Columns
RowSelection3
SetColumnHeadings
FillGridr
Column`
ColumnHeading
CellStyleY
ColumnStringLengthD
Textf
Form_Resizet
Heightj
Form1S
Widthv
DemoForm
DBTGrid1_CellDoubleClicked
DBTGrid1_GridPositionChanged
ColumnPosition
RowPosition
MNU_RowVertOn_Click
Verticals
MNU_VertsOff_Click/
MNU_HorizOn_Click4
HorizontalsE
MNU_HorizOff_Clicke
MNU_EditOn_Click
EditModez
MNU_EditOff_Click
MNU_ColLabelsNone_Click
ColumnLabels
MNU_ColLabelLetters_Click
MNU_ColLabelUser_Click
MNU_ColLabNum_Click
MNU_RowLabNo_Click
RowLabels-
MNU_RowLabBut_Click\
MNU_RowLabNum_Click
DBTGrid1_GridHScroll
MNU_Arial_Click
FontName
MNU_Courier_Click
MNU_Fences_Click
MNU_Fixedsys_Click
MNU_Modern_Click
MNU_MSS_Click
DBTGrid1_CellValueChanged
Col/
DBTGrid*
MNU_MSSerif_Click?
MNU_MTExtra_ClickR
MNU_Roman_Clickf
MNU_Script_Click~
MNU_SmallFonts_Click
MNU_Symbol_Click
MNU_System_Click
MNU_Terminal_Click
MNU_TNR_Click
MNU_WDG_Click
MNU_FBF_Click-
FontBold(
MNU_FBT_Click;
MNU_FBF
CheckedO
MNU_FBT
MNU_EditOn
MNU_EditOff0
MNU_ColLabelUserr
MNU_ColLabelNone
MNU_ColLabelsNone
MNU_ColLabelsNum#
MNU_ColLabNum
MNU_ColLabelLetters
MNU_HoizOn
MNU_HorizOn
MNU_HorizOff
MNU_RowVertOn
MNU_RowVertOff
MNU_VertsOff
MNU_RowLabNum
MNU_Rows
MNU_RowLabNo
MNU_RowLabBut
NVisibleColumns
VisibleColumns
DBTGrid1_Resize
NVisibleRows
VisibleRows
LeftColumn
LeftVisibleColumn
NVisibleColumns_Changeu @
DBTGrid1_GridVScroll
TopVRow9
TopVisibleRowH
MNU_AEK_Click
EditKeyFormY
MNU_BEK_Clicku
MNU_EEK_Click
EditKey
MNU_MoveColumn_Click
NewColumnPosition
ColumnNumber
Value
Action
MoveColumn
MNU_MoveRow_Click
NewRowPosition,
RowNumber
MoveRow<
MNU_DeleteColumn_Click
DeleteColumn`
MNU_DeleteRow_Click
DeleteRow
MNU_InsertColumn_Click
InsertColumn
MNU_InsertRow_Click
InsertRow
MNU_ColFix_Click'
FixedColumn
MNU_ColFixFalse_Click
MNU_ColFixFalsec
MNU_ColFixTrue8 @
MNU_ColFixTrue_Click
tempP
False
MNU_ColSelNone_ClickQ
ColumnSelection
MNU_ColSelNone
MNU_ColSelMulti
MNU_ColSelectSingle
MNU_ColSelectSingle_Click
MNU_ColSelMulti_Click&
MNU_RowSelNone_Click
MNU_RowSelNone
MNU_RowSelSingle
MNU_RowSelMulti@
MNU_RowSelSingle_ClickY
MNU_RowSelMulti_Click
MNU_ColResizeTrue_Click
ResizeColumn
MNU_ColResizeTrue
MNU_ColResizeFalse
MNU_ColResizeFalse_Clicks
MNU_ColResize_Click
SingleRow
MultiRow
DBT_None
DBT_Numbersd
DBT_RowButtonsA
DBT_SingleRow
DBT_MultiRow
DBT_UserDefined
DBT_Letters
DBT_MultiColumn
DBT_SingleColumn
DBT_DeleteColumn
DBT_DeleteRow
DBT_InsertColumn
DBT_InsertRow
DBT_MoveColumn
DBT_MoveRow
MNU_Quit_Click
Form_Load
Define the number of rows and columns in the Grid.
Let the user select single rowso
Now label the Column Headings (keep the defaulti
ColumnHeadingStyle = 0-Centered)
OK the Grid's column format has been set.e
Lets put some data in it!a
Update the Visible Columns display..
Update the Visible Rows display.
Update the Left Visible Column display (in user units)..
Update the Top Visible Row display (in user units)..
SetColumnHeadings
Start with Column #1
Customer No.
Center text in the Celle
Move to Column #2e
Last Name"
Left justify text in the Cellt
Move to Column #3
First Name
Left justify text in the Cellt
Move to Column #4
Center text in the Celle
Move to Column #5e
Address"
Left justify text in the Cellt
Move to Column #6
Left justify text in the Cellt
Move to Column #7
State"
Center text in the Celle
Move to Column #8e
Center text in the Celle
Move to Column #9e
Phone"
Center text in the Celle
FillGrid
123459
1212 Westwood Ave.
Moline
61265"
(309) 762-4444
Move to Next row
623857
Smith"
4733 Carry Street"
Davenport"
52803"
(319) 326-8088
Move to Next row
883853
1114 Sparrow Road"
Rock Island"
61201"
(309) 788-8086
Move back to Row 0 Column 0
Form_Resize
DBTGrid1_GridPositionChanged
Display current row and column (in user units, i.e., + 1)
MNU_RowVertOn_Click
MNU_VertsOff_Click
MNU_HorizOn_Click
MNU_HorizOff_Click
MNU_EditOn_Click
MNU_EditOff_Click
MNU_ColLabelsNone_Click
MNU_ColLabelLetters_Click
MNU_ColLabelUser_Click
MNU_ColLabNum_Click
MNU_RowLabNo_Click
MNU_RowLabBut_Click
MNU_RowLabNum_Click
DBTGrid1_CellDoubleClicked
Cell Value:
MNU_Arial_Click
Arial"
MNU_Courier_Click
Courier"
MNU_Fences_Click
Fences
MNU_Fixedsys_Click
Fixedsys
MNU_Modern_Click
Modern
MNU_MSS_Click
MS Sans Serif"
DBTGrid1_CellValueChanged
MNU_MSSerif_Click
MS Serif
MNU_MTExtra_Click
MT Extra
MNU_Roman_Click
Roman"
MNU_Script_Click
Script
MNU_SmallFonts_Click
Small Fonts"
MNU_Symbol_Click
Symbol
MNU_System_Click
System
MNU_Terminal_Click
Terminal
MNU_TNR_Click
Times New Roman"
MNU_WDG_Click
Wingdings"
MNU_FBF_Click
MNU_FBT_Click
DBTGrid1_Resize
Update the Visible Columns display..
Update the Visible Rows display.
DBTGrid1_GridHScroll
Update the Left Visible Column display (in user units).
DBTGrid1_GridVScroll
Update the Top Visible Row display (in user units)..
MNU_AEK_Click
MNU_BEK_Click
MNU_EEK_Click
MNU_MoveColumn_Click
What column do you wish to move the current column to?
Move Grid Column
DBTGrid1.Action = DBT_MoveColumn
MNU_MoveRow_Click
What row do you wish to move the current row to?
Move Grid Row"
DBTGrid1.Action = DBT_MoveRow
MNU_DeleteColumn_Click
Delete the current grid column.
MNU_DeleteRow_Click
Delete the current grid row.
DBTGrid1.Action = DBT_DeleteRow
MNU_InsertColumn_Click
Insert a column before the current grid column.o
DBTGrid1.Action = DBT_InsertColumn
MNU_InsertRow_Click
Insert a row before the current grid row.o
DBTGrid1.Action = DBT_InsertRow
MNU_ColFixFalse_Click
Not a fixed column.N
MNU_ColFixTrue_Click
A fixed column.u
MNU_ColFix_Click
MNU_ColSelNone_Click
No column selection allowed.
MNU_ColSelectSingle_Click
Single column selection allowed.
MNU_ColSelMulti_Click
Multi column selection allowed.
MNU_RowSelNone_Click
No row selection allowed.
MNU_RowSelSingle_Click
Single row selection allowed.
MNU_RowSelMulti_Click
Multi row selection allowed.
MNU_ColResizeTrue_Click
Allow resizing of column
MNU_ColResizeFalse_Click
Do not allow resizing of columnn
MNU_ColResize_Click