MsFlexGrid用法 轉貼

2021-04-03 01:10:57 字數 1032 閱讀 1271

option explicit

dim cn as new adodb.connection

dim rs as new adodb.recordset

dim str as string

dim strsql as string

str="provider=sqlserver.1;server=local;uid=sa;pwd="";database=pubs"

if cn.state=adstateopen then cn.close

cn.cursorlocation=aduseclient

cn.open str

strsql="select * from jobs"

with rs

if .state=adstateopen then .close

end if  

.locktype = adlockoptimistic

.cursorlocation = aduseclient

.cursortype = adopenkeyset

.activeconnection = cn

.open strsql

with  msflexgrid1

.rows=2

.cellalignment=4  

.textmatrix(1,0)="日期"

.textmatrix(1,1)="姓名"

.textmatrix(1,2)="專案"

do while not rs.eof

.rows=.rows+1

.cellalignment=4

.textmatrix(.rows-1,0)=rs.fields(0)

.textmatrix(.rows-1,1)=rs.fields(1)

.textmatrix(.rows-1,2)=rs.fields(2)

rs.movenext

loop

end with

rs.close

set rs =nothing

memset用法詳解 轉)

memset用法詳解 轉 2007 01 31 20 00 or memest原型 please type man memset in your shell void memset void s,int c,size t n memset 作用是在一段記憶體塊中填充某個給定的值,它對較大的結構體或陣...

轉 cvCvtColor的用法

cvcvtcolor 是opencv裡的顏色空間轉換函式,可以實現rgb顏色向hsv,hsi等顏色空間的轉換,也可以轉換為灰度影象。引數cv bgr2gray 是rgb 到gray,引數 cv gray2bgr 是gray 到rgb.處理結果是彩色的,則轉灰色就是了 void cvcvtcolor ...

memset用法詳解 轉)

功能 將s所指向的某一塊記憶體中的每個位元組的內容全部設定為ch指定的ascii值,塊的大小由第三個引數指定,這個函式通常為新申請的記憶體做初始化工作,其返回值為指向s的指標。void memset void s,int ch,unsigned n include include include i...

memset用法詳解 轉)

memset用法詳解 轉 目錄 隱藏 功 能用 法 程式例memset函式詳細說明 編輯本段 功 能 將s所指向的某一塊記憶體中的每個位元組的內容全部設定為ch指定的ascii值,塊的大小由第三個引數指定,這個函式通常為新申請的記憶體做初始化工作,其返回值為指向s的指標。編輯本段 用 法 void ...

轉 Delphi Invalidate的用法

1 invalidate介紹 void invalidate bool berase true 該函式的作用是使整個視窗客戶區無效。視窗的客戶區無效意味著需要重繪,例如,如果一個被其它視窗遮住的視窗變成了前臺視窗,那麼原來被遮住的部分就是無效的,需要重繪。這時windows會在應用程式的訊息佇列中放...