VB怎么添加MSHFlexgrid控件
2个回答
展开全部
添加MSHFlexgrid控件的办法如下:
要程序的代码是:Dim i, j, k As Integer
1、设置行列数
With MSHFlexGrid1
.Rows = 5
.Cols = 5
End With
2、添加表头
MSHFlexGrid1.Row = 0
For i = 1 To MSHFlexGrid1.Cols - 1
MSHFlexGrid1.Col = i
MSHFlexGrid1.Text = "列" & i
Next
3、添加记录
k = 1
For i = 1 To MSHFlexGrid1.Rows - 1
For j = 1 To MSHFlexGrid1.Cols - 1
MSHFlexGrid1.Row = i
MSHFlexGrid1.Col = j
MSHFlexGrid1.Text = k
k = k + 1
Next
Next
说明:添加部件"Microsoft Hierarchical FlexGrid Control 6.0 (OLEDB)"才能使用MSHFlexGrid.
要程序的代码是:Dim i, j, k As Integer
1、设置行列数
With MSHFlexGrid1
.Rows = 5
.Cols = 5
End With
2、添加表头
MSHFlexGrid1.Row = 0
For i = 1 To MSHFlexGrid1.Cols - 1
MSHFlexGrid1.Col = i
MSHFlexGrid1.Text = "列" & i
Next
3、添加记录
k = 1
For i = 1 To MSHFlexGrid1.Rows - 1
For j = 1 To MSHFlexGrid1.Cols - 1
MSHFlexGrid1.Row = i
MSHFlexGrid1.Col = j
MSHFlexGrid1.Text = k
k = k + 1
Next
Next
说明:添加部件"Microsoft Hierarchical FlexGrid Control 6.0 (OLEDB)"才能使用MSHFlexGrid.
网易云信
2023-12-06 广告
2023-12-06 广告
UIkit是一套轻量级、模块化且易于使用的开源UI组件库,由YOOtheme团队开发。它提供了丰富的界面元素,包括按钮、表单、表格、对话框、滑块、下拉菜单、选项卡等等,适用于各种类型的网站和应用程序。UIkit还支持响应式设计,可以根据不同...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询