WEB开发网
开发学院WEB开发综合 VB如何将DBgrid印出来 阅读

VB如何将DBgrid印出来

 2006-02-27 11:44:58 来源:WEB开发网   
核心提示:->OptionExplicitPRivateSubCommand1_Click()DimIAsLong,JAsLong,KAsLongDimPrintStringAsStringForI=0ToData1.Recordset.RecordCount-1IfK=DBGrid1.VisibleRowsThenDBGrid
->OptionExplicit
PRivateSubCommand1_Click()
DimIAsLong,JAsLong,KAsLong
DimPrintStringAsString
ForI=0ToData1.Recordset.RecordCount-1
IfK=DBGrid1.VisibleRowsThen
DBGrid1.Scroll0,DBGrid1.VisibleRows
K=0
EndIf
ForJ=0ToDBGrid1.Columns.Count-1
PrintString=PrintString&
DBGrid1.Columns(J).CellText(DBGrid1.RowBookmark(K))&"/"
Next
Printer.PrintPrintString
PrintString=""
K=K 1
DoEvents
Next
EndSub

PrivateSubForm_Activate()
Data1.Recordset.MoveLast
Data1.Recordset.MoveFirst
EndSub->
->

Tags:VB 如何 DBgrid

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接