因?yàn)閿?shù)據(jù)類型的不同,VB.NET調(diào)用系統(tǒng)API函數(shù)和VB6不太一樣,VB6是這樣:
公司主營(yíng)業(yè)務(wù):成都做網(wǎng)站、成都網(wǎng)站設(shè)計(jì)、移動(dòng)網(wǎng)站開(kāi)發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實(shí)現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競(jìng)爭(zhēng)能力。創(chuàng)新互聯(lián)建站是一支青春激揚(yáng)、勤奮敬業(yè)、活力青春激揚(yáng)、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊(duì)。公司秉承以“開(kāi)放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對(duì)我們的高要求,感謝他們從不同領(lǐng)域給我們帶來(lái)的挑戰(zhàn),讓我們激情的團(tuán)隊(duì)有機(jī)會(huì)用頭腦與智慧不斷的給客戶帶來(lái)驚喜。創(chuàng)新互聯(lián)建站推出怒江州免費(fèi)做網(wǎng)站回饋大家。
Public?Declare?Function?SetWindowPos?Lib?"user32"?(ByVal?hwnd?As?Long,?ByVal?hWndInsertAfter?As?Long,?ByVal?X?As?Long,?ByVal?Y?As?Long,?ByVal?cx?As?Long,?ByVal?cy?As?Long,?ByVal?wFlags?As?Long)?As?Long
在VB.NET中是這樣調(diào)用:
DllImport("user32.dll",?SetLastError:=True)?_
Public?Shared?Function?SetWindowPos(ByVal?hWnd?As?IntPtr,?ByVal?hWndInsertAfter?As?IntPtr,?ByVal?X?As?Integer,?ByVal?Y?As?Integer,?ByVal?cx?As?Integer,?ByVal?cy?As?Integer,?ByVal?uFlags?As?SetWindowPosFlags)?As?Boolean
End?Function
參考:
很簡(jiǎn)單,在end select前再多加一種情況case else return "XXXx",因?yàn)槟阒惶峁┝?-9這10種情況
Public Function Zuhe(ByVal qa As String) As String
Select Case qa
Case "0"
Return "1"
Case "1"
Return "3"
Case "2"
Return "4"
Case "3"
Return "6"
Case "4"
Return "2"
Case "5"
Return "8"
Case "6"
Return "9"
Case "7"
Return "7"
Case "8"
Return "5"
Case "9"
Return "0"
Case else
Return "XXXX"
End Select
End Function
注意:參數(shù)為動(dòng)態(tài)數(shù)組;
Private Function MyF(ByRef d() As Integer)
ReDim d(4, 13) As Integer
Dim i As Integer
Dim j As Integer
Dim n As Integer
Dim MyNum(4) As Integer
For i = 1 To 4
MyNum(i) = 0
Next i
Randomize
For i = 1 To 4
For j = 1 To 13
n = Int(Rnd * 4 + 1)
Do While MyNum(n) = 13
n = Int(Rnd * 4 + 1)
Loop
d(i, j) = n
MyNum(n) = MyNum(n) + 1
Next j
Next i
End Function