vb 随机获取6个1-33的数
摘要:```vbnet Private Sub random(ByVal num As Integer, ByVal min As Integer, ByVal max As Integer) Dim i As Integer = 1 Dim number As Integer Dim numbers As String = "" While i 0 number = CInt(Rnd() * (max - min + 1) + 1) End While numb...
阅读全文
posted @
2014-02-20 11:43
vinsonLu
阅读(512)
推荐(0) 编辑
vb 取得桌面路径
摘要:```vbnettxtPath.Text = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop)```
阅读全文
posted @
2014-02-20 11:24
vinsonLu
阅读(1857)
推荐(0) 编辑
VB 读取csv文件数据
摘要:Public adoConn As New ADODB.Connection Private Sub csv() adoConn.ConnectionString = "Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=C:\Documents and Settings\vinsonlu\Desktop\1400004" adoConn.Open() Dim rs As New ADODB.Recordset rs.Open("select * from Orders...
阅读全文
posted @
2014-02-14 14:53
vinsonLu
阅读(9099)
推荐(0) 编辑
VB datagrid指定行着色
摘要:有图有真相:关键点:使用datagrid的FetchRowStyle委托。(Form界面的datagrid名称:dgv)使用FetchRowStyle委托,要先打开开关:dgv.FetchRowStyles = True然后可以在FetchRowStyle委托里面更改datagrid每一行的单元格格式:Private Sub dgv_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles dgv.FetchRowStyle If dgv...
阅读全文
posted @
2014-02-13 12:17
vinsonLu
阅读(4319)
推荐(0) 编辑
Crystal Report 处理当前系统时间
摘要:Changed the print date format to HH/yy/MM/mm/SS/dd (For Example:2014/01/23 16:30:45= 161430014523) :iif(Hour(CurrentTime)<10,left('0'+totext(Hour(CurrentTime)),2),left(totext(Hour(CurrentTime)),2))+right(left(totext((Year(CurrentDate))),5),2)+iif(Minute(CurrentTime)<10,left('0'
阅读全文
posted @
2014-02-11 15:45
vinsonLu
阅读(846)
推荐(0) 编辑