類TBaseDB的DFM代碼如下:
inherited FrmBaseSEdit: TFrmBaseSEdit
Left = 195
Top = 112
Width = 484
Height = 385
Caption = #31777#21934#32232#36655#31383#39636#27169#29256
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 12
inherited Panel1: TPanel
Width = 476
Height = 270
object HQSplitter1: THQSplitter
Left = 0
Top = 75
Width = 476
Height = 5
Cursor = crVSplit
Hint = #40670#25802#27492#34389#25110#20197#25918#22823#25976#25818#28687#35261#21312','#20877#27425#40670#25802#21063#24674#24489#21407#29376
Align = alTop
Beveled = True
Color = clYellow
ParentColor = False
Control = Panel2
HideControl = False
ShrinkColor = clBlack
end
object Panel2: TPanel
Left = 0
Top = 0
Width = 476
Height = 75
Align = alTop
BevelOuter = bvNone
ParentColor = True
TabOrder = 0
end
object Panel3: TPanel
Left = 0
Top = 80
Width = 476
Height = 190
Align = alClient
BevelOuter = bvNone
ParentColor = True
TabOrder = 1
object GridMain: TDBGridEh
Left = 0
Top = 0
Width = 476
Height = 190
Align = alClient
ColumnDefValues.Title.TitleButton = True
DataSource = DSMain
Flat = True
FooterColor = clInfoBk
FooterFont.Charset = DEFAULT_CHARSET
FooterFont.Color = clWindowText
FooterFont.Height = -12
FooterFont.Name = #26032#32048#26126#39636
FooterFont.Style = []
ImeName = 'FM-WuBi(HK)'
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit, dgMultiSelect]
OptionsEh = [dghHighlightFocus, dghClearSelection, dghAutoSortMarking, dghMultiSortMarking, dghRowHighlight, dghDblClickOptimizeColWidth]
PopupMenu = PopupMenuDesignGrid
SortLocal = True
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -12
TitleFont.Name = #26032#32048#26126#39636
TitleFont.Style = []
OnColEnter = GridMainColEnter
OnGetCellParams = GridMainGetCellParams
OnTitleBtnClick = GridMainTitleBtnClick
end
end
end
inherited CoolBar1: TCoolBar
Width = 476
Bands = <
item
Control = ToolBar1
ImageIndex = -1
MinHeight = 84
Width = 472
end>
inherited ToolBar1: TToolBar
Width = 459
end
end
inherited ActionGrid: TActionList
Left = 304
Top = 8
end
inherited PopupMenuDesignGrid: TPopupMenu
Left = 260
Top = 9
end
inherited ActionList1: TActionList
Left = 120
end
inherited DSMain: TDataSource
Left = 144
Top = 216
end
inherited HQFilter: THQSelfQueryDialog
Left = 216
end
inherited ADSMain: TADODataSet
CursorType = ctStatic
Left = 88
Top = 216
end
end
A子類的DFM代碼如下(能實現復制):
inherited FrmDollar: TFrmDollar
Left = 143
Top = 120
Width = 570
Height = 388
ActiveControl = DBEdit1
Caption = #24163#21029#35373#32622
PixelsPerInch = 96
TextHeight = 12
inherited Panel1: TPanel
Top = 87
Width = 562
Height = 274
inherited HQSplitter1: THQSplitter
Top = 84
Width = 562
end
inherited Panel2: TPanel
Width = 562
Height = 84
object Label1: TLabel
Left = 7
Top = 6
Width = 32
Height = 12
AutoSize = False
Caption = #24163#21029
FocusControl = DBEdit1
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -9
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Label2: TLabel
Left = 7
Top = 60
Width = 32
Height = 12
AutoSize = False
Caption = #35498#26126
FocusControl = DBEdit2
end
object Label3: TLabel
Left = 7
Top = 43
Width = 32
Height = 12
AutoSize = False
Caption = #26085#26399
end
object Label4: TLabel
Left = 7
Top = 25
Width = 32
Height = 12
AutoSize = False
Caption = #21295#29575
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -9
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object DBEdit1: TDBEdit
Left = 42
Top = 4
Width = 97
Height = 18
DataField = 'DollarID'
DataSource = DSMain
ImeName = 'FM-WuBi(HK)'
TabOrder = 0
end
object DBEdit2: TDBEdit
Left = 42
Top = 56
Width = 97
Height = 18
DataField = 'Remark'
DataSource = DSMain
ImeName = 'FM-WuBi(HK)'
TabOrder = 3
OnExit = PUBDBControlExit
end
object DBDateTimeEditEh1: TDBDateTimeEditEh
Left = 42
Top = 38
Width = 97
Height = 19
DataField = 'FDate'
DataSource = DSMain
EditButtons = <>
ImeName = 'FM-WuBi(HK)'
Kind = dtkDateEh
TabOrder = 2
Visible = True
end
object DBNumberEditEh1: TDBNumberEditEh
Left = 42
Top = 21
Width = 97
Height = 19
currency = False
DataField = 'HuiLu'
DataSource = DSMain
EditButton.Visible = True
EditButtons = <>
ImeName = 'FM-WuBi(HK)'
TabOrder = 1
Visible = True
end
end
inherited Panel3: TPanel
Top = 89
Width = 562
Height = 185
inherited GridMain: TDBGridEh
Width = 562
Height = 185
Columns = <
item
EditButtons = <>
FieldName = 'DollarID'
Footers = <>
end
item
EditButtons = <>
FieldName = 'Remark'
Footers = <>
Width = 87
end
item
EditButtons = <>
FieldName = 'FDate'
Footers = <>
Width = 98
end
item
EditButtons = <>
FieldName = 'HuiLu'
Footers = <>
end>
end
end
end
inherited CoolBar1: TCoolBar
Width = 562
Height = 87
Bands = <
item
Control = ToolBar1
ImageIndex = -1
MinHeight = 83
Width = 558
end>
inherited ToolBar1: TToolBar
Width = 545
Height = 83
EdgeInner = esNone
end
end
inherited ActionGrid: TActionList
Left = 360
end
inherited PopupMenuDesignGrid: TPopupMenu
Left = 284
end
inherited ActionList1: TActionList
Left = 160
end
inherited DSMain: TDataSource
Left = 80
Top = 208
end
inherited HQFilter: THQSelfQueryDialog
Left = 232
end
inherited ADSMain: TADODataSet
CommandText = 'select * from BDollar'
Left = 32
Top = 208
object ADSMainDollarID: TStringField
DisplayLabel = #24163#21029
DisplayWidth = 8
FieldName = 'DollarID'
Required = True
Size = 8
end
object ADSMainRemark: TStringField
DisplayLabel = #35498#26126
DisplayWidth = 34
FieldName = 'Remark'
Size = 50
end
object ADSMainFDate: TDateTimeField
DisplayLabel = #26085#26399
DisplayWidth = 18
FieldName = 'FDate'
end
object ADSMainHuiLu: TFloatField
DisplayLabel = #21295#29575
DisplayWidth = 10
FieldName = 'HuiLu'
Required = True
end
object ADSMainCUser: TStringField
DisplayLabel = #24314#31435#32773
FieldName = 'CUser'
Visible = False
end
object ADSMainCDate: TDateTimeField
DisplayLabel = #24314#31435#26178#38291
FieldName = 'CDate'
Visible = False
end
object ADSMainEUser: TStringField
DisplayLabel = #20462#25913#32773
FieldName = 'EUser'
Visible = False
end
object ADSMainEDate: TDateTimeField
DisplayLabel = #20462#25913#26178#38291
FieldName = 'EDate'
Visible = False
end
end
inherited FRDBMain: TfrDBDataSet
Left = 320
end
inherited PopupMenuReport: TPopupMenu
Left = 200
end
end
子類B的DFM代碼如下(點復制按鈕,怎麼都不執行對應ACTION的OnExcute事件代碼)
inherited FrmWorkshop: TFrmWorkshop
Left = 98
Top = 97
Width = 646
Height = 447
Caption = #32068#21029#36039#26009
PixelsPerInch = 96
TextHeight = 12
object Label4: TLabel [0]
Left = 8
Top = 50
Width = 72
Height = 12
Caption = #34389#29702#20154#21729#21517#31281
end
inherited Panel1: TPanel
Top = 89
Width = 638
Height = 331
inherited HQSplitter1: THQSplitter
Top = 113
Width = 638
end
inherited Panel2: TPanel
Width = 638
Height = 113
object Label1: TLabel
Left = 6
Top = 24
Width = 48
Height = 12
Caption = #32068#21029#32232#34399
end
object Label3: TLabel
Left = 240
Top = 5
Width = 24
Height = 12
Caption = #20633#27880
end
object Label2: TLabel
Left = 6
Top = 43
Width = 48
Height = 12
Caption = #32068#21029#21517#31281
end
object Label5: TLabel
Left = 29
Top = 61
Width = 24
Height = 12
Caption = #20027#31649
end
object Label6: TLabel
Left = 28
Top = 94
Width = 24
Height = 12
Caption = #38651#35441
end
object Label7: TLabel
Left = 29
Top = 6
Width = 24
Height = 12
Caption = #37096#38272
end
object Label8: TLabel
Left = 29
Top = 78
Width = 24
Height = 12
Caption = #38936#29677
end
object DBEditEh1: TDBEditEh
Left = 58
Top = 23
Width = 121
Height = 18
DataField = 'workshopno'
DataSource = DSMain
EditButtons = <>
ImeName = 'FM-WuBi(HK)'
TabOrder = 0
Visible = True
end
object DBEditEh2: TDBEditEh
Left = 58
Top = 40
Width = 121
Height = 18
DataField = 'workshopname'
DataSource = DSMain
EditButtons = <>
ImeName = 'FM-WuBi(HK)'
TabOrder = 1
Visible = True
end
object DBMemo1: TDBMemo
Left = 272
Top = 3
Width = 153
Height = 106
DataField = 'Remark'
DataSource = DSMain
ImeName = 'FM-WuBi(HK)'
TabOrder = 2
end
object DBEditEh3: TDBEditEh
Left = 58
Top = 57
Width = 121
Height = 18
DataField = 'Manager'
DataSource = DSMain
EditButtons = <>
ImeName = 'FM-WuBi(HK)'
TabOrder = 3
Visible = True
end
object DBEditEh4: TDBEditEh
Left = 58
Top = 91
Width = 121
Height = 18
DataField = 'Tel'
DataSource = DSMain
EditButtons = <>
ImeName = 'FM-WuBi(HK)'
TabOrder = 4
Visible = True
end
object DBComboBox1: TDBComboBox
Left = 58
Top = 3
Width = 121
Height = 20
DataField = 'DeptName'
DataSource = DSMain
ImeName = 'FM-WuBi(HK)'
ItemHeight = 12
Items.Strings = (
#21322#25104#21697#37096
#21046#25104#21697#37096)
TabOrder = 5
end
object DBEditEh5: TDBEditEh
Left = 58
Top = 74
Width = 121
Height = 18
DataField = 'ForeMan'
DataSource = DSMain
EditButtons = <>
TabOrder = 6
Visible = True
end
end
inherited Panel3: TPanel
Top = 118
Width = 638
Height = 213
inherited GridMain: TDBGridEh
Width = 638
Height = 213
DrawMemoText = True
Columns = <
item
EditButtons = <>
FieldName = 'DeptName'
Footers = <>
Width = 82
end
item
EditButtons = <>
FieldName = 'workshopno'
Footers = <>
Width = 79
end
item
EditButtons = <>
FieldName = 'workshopname'
Footers = <>
Width = 80
end
item
EditButtons = <>
FieldName = 'Tel'
Footers = <>
Width = 86
end
item
EditButtons = <>
FieldName = 'Manager'
Footers = <>
Width = 60
end
item
EditButtons = <>
FieldName = 'ForeMan'
Footers = <>
end
item
EditButtons = <>
FieldName = 'Remark'
Footers = <>
Width = 118
end>
end
end
end
inherited CoolBar1: TCoolBar
Width = 638
Height = 89
Bands = <
item
Control = ToolBar1
ImageIndex = -1
MinHeight = 85
Width = 634
end>
inherited ToolBar1: TToolBar
Width = 621
Height = 85
inherited ToolButton17: TToolButton
Width = 9
end
inherited ToolButton12: TToolButton
Top = 44
end
inherited ToolButton10: TToolButton
Top = 44
end
inherited ToolButton18: TToolButton
Top = 44
end
inherited ToolButton7: TToolButton
Top = 44
end
inherited ToolButton24: TToolButton
Top = 44
end
inherited ToolButton11: TToolButton
Top = 44
Width = 12
end
inherited ToolButton13: TToolButton
Left = 183
Top = 44
end
inherited ToolButton14: TToolButton
Left = 218
Top = 44
end
inherited ToolButton15: TToolButton
Left = 253
Top = 44
end
inherited ToolButton16: TToolButton
Left = 261
Top = 44
end
inherited ToolButton22: TToolButton
Left = 296
Top = 44
end
inherited ToolButton23: TToolButton
Left = 331
Top = 44
end
inherited ToolButton20: TToolButton
Left = 366
Top = 44
end
inherited ToolButton21: TToolButton
Left = 374
Top = 44
end
end
end
inherited ActionGrid: TActionList
Left = 360
end
inherited PopupMenuDesignGrid: TPopupMenu
Left = 284
end
inherited ActionList1: TActionList
Left = 472
end
inherited DSMain: TDataSource
Left = 104
Top = 264
end
inherited HQFilter: THQSelfQueryDialog
Left = 440
end
inherited ADSMain: TADODataSet
CommandText = 'Select * from Workshop order by DeptName'
Left = 40
Top = 264
object ADSMainDeptName: TStringField
DisplayLabel = #37096#38272
FieldName = 'DeptName'
end
object ADSMainworkshopno: TStringField
DisplayLabel = #32068#21029#32232#34399
DisplayWidth = 13
FieldName = 'workshopno'
Size = 15
end
object ADSMainworkshopname: TStringField
DisplayLabel = #32068#21029#21517#31281
DisplayWidth = 13
FieldName = 'workshopname'
end
object ADSMainManager: TStringField
DisplayLabel = #20027#31649
DisplayWidth = 8
FieldName = 'Manager'
FixedChar = True
Size = 8
end
object ADSMainForeMan: TStringField
DisplayLabel = #38936#29677
FieldName = 'ForeMan'
Size = 10
end
object ADSMainTel: TStringField
DisplayLabel = #38651#35441
FieldName = 'Tel'
Size = 16
end
object ADSMainRemark: TMemoField
DisplayLabel = #20633#27880
FieldName = 'Remark'
BlobType = ftMemo
end
end
inherited FRDBMain: TfrDBDataSet
Left = 400
end
inherited PopupMenuReport: TPopupMenu
Left = 321
end
end
煩請大家幫我分析問題到底出在哪里?