龙空技术网

六十四位Office中API函数声明语句第56讲

VBA语言専攻 191

前言:

此时我们对“cchar函数怎么用”大概比较关切,大家都需要了解一些“cchar函数怎么用”的相关知识。那么小编同时在网络上搜集了一些有关“cchar函数怎么用””的相关知识,希望小伙伴们能喜欢,兄弟们一起来学习一下吧!

【分享成果,随喜正能量】你之所以看到的是一个不完美的世界,是因为你有各种执着和不切实际的期待,如果你可以从这里出离,你会变的非常强大,不再坚持必须用自己喜欢的杯子喝水,不再坚持茶的味道必需不浓不淡。如果你出离了所有的执着,那么你就会变得非常自由,没有任何事情可以激怒你或伤害你。。

跟我学VBA,我这里专注VBA, 授人以渔。我98年开始,从源码接触VBA已经20余年了,随着年龄的增长,越来越觉得有必要把这项技能传递给需要这项技术的职场人员。希望和数据打交道的朋友,都来学习VBA,利用VBA,起码可以提高自己的工作效率,可以有时间多陪陪父母,多陪陪家人,何乐而不为呢?

这讲我们继续学习64位Office API声明语句学习之56讲,这些内容是MS的权威资料,看似枯燥,但对于想学习API函数的朋友是非常有用的。

Declare PtrSafe Function CharToOemBuff Lib "user32" Alias "CharToOemBuffA" (ByVal lpszSrc As String, ByVal lpszDst As String, ByVal cchDstLength As Long) As Long

Declare PtrSafe Function OemToCharBuff Lib "user32" Alias "OemToCharBuffA" (ByVal lpszSrc As String, ByVal lpszDst As String, ByVal cchDstLength As Long) As Long

Declare PtrSafe Function CharUpper Lib "user32" Alias "CharUpperA" (ByVal lpsz As String) As String

Declare PtrSafe Function CharUpperBuff Lib "user32" Alias "CharUpperBuffA" (ByVal lpsz As String, ByVal cchLength As Long) As Long

Declare PtrSafe Function CharLower Lib "user32" Alias "CharLowerA" (ByVal lpsz As String) As String

Declare PtrSafe Function CharLowerBuff Lib "user32" Alias "CharLowerBuffA" (ByVal lpsz As String, ByVal cchLength As Long) As Long

Declare PtrSafe Function CharNext Lib "user32" Alias "CharNextA" (ByVal lpsz As String) As String

Declare PtrSafe Function CharPrev Lib "user32" Alias "CharPrevA" (ByVal lpszStart As String, ByVal lpszCurrent As String) As String

' Language dependent Routines

Declare PtrSafe Function IsCharAlpha Lib "user32" Alias "IsCharAlphaA" (ByVal cChar As Byte) As Long

Declare PtrSafe Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA" (ByVal cChar As Byte) As Long

Declare PtrSafe Function IsCharUpper Lib "user32" Alias "IsCharUpperA" (ByVal cChar As Byte) As Long

Declare PtrSafe Function IsCharLower Lib "user32" Alias "IsCharLowerA" (ByVal cChar As Byte) As Long

Declare PtrSafe Function SetFocus Lib "user32" Alias "SetFocus" (ByVal hwnd As LongPtr) As LongPtr

Declare PtrSafe Function GetFocus Lib "user32" Alias "GetFocus" () As LongPtr

Declare PtrSafe Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As LongPtr

' Keyboard Information Routines

Declare PtrSafe Function GetKBCodePage Lib "user32" Alias "GetKBCodePage" () As Long

Declare PtrSafe Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal nVirtKey As Long) As Integer

Declare PtrSafe Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer

Declare PtrSafe Function GetKeyboardState Lib "user32" Alias "GetKeyboardState" (pbKeyState As Byte) As Long

Declare PtrSafe Function SetKeyboardState Lib "user32" Alias "SetKeyboardState" (lppbKeyState As Byte) As Long

Declare PtrSafe Function GetKeyboardType Lib "user32" Alias "GetKeyboardType" (ByVal nTypeFlag As Long) As Long

Declare PtrSafe Function GetKeyNameText Lib "user32" Alias "GetKeyNameTextA" (ByVal lParam As Long, ByVal lpBuffer As String, ByVal nSize As Long) As Long

Declare PtrSafe Function ToAscii Lib "user32" Alias "ToAscii" (ByVal uVirtKey As Long, ByVal uScanCode As Long, lpbKeyState As Byte, lpwTransKey As Long, ByVal fuState As Long) As Long

Declare PtrSafe Function ToUnicode Lib "user32" Alias "ToUnicode" (ByVal wVirtKey As Long, ByVal wScanCode As Long, lpKeyState As Byte, ByVal pwszBuff As String, ByVal cchBuff As Long, ByVal wFlags As Long) As Long

Declare PtrSafe Function OemKeyScan Lib "user32" Alias "OemKeyScan" (ByVal wOemChar As Long) As Long

Declare PtrSafe Function VkKeyScan Lib "user32" Alias "VkKeyScanA" (ByVal cChar As Byte) As Integer

Const KEYEVENTF_EXTENDEDKEY = &H1

Const KEYEVENTF_KEYUP = &H2

Declare PtrSafe Sub keybd_event Lib "user32" Alias "keybd_event" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As LongPtr)

Const MOUSEEVENTF_MOVE = &H1 ' mouse move

Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down

Const MOUSEEVENTF_LEFTUP = &H4 ' left button up

Const MOUSEEVENTF_RIGHTDOWN = &H8 ' right button down

Const MOUSEEVENTF_RIGHTUP = &H10 ' right button up

Const MOUSEEVENTF_MIDDLEDOWN = &H20 ' middle button down

Const MOUSEEVENTF_MIDDLEUP = &H40 ' middle button up

Const MOUSEEVENTF_ABSOLUTE = &H8000& ' absolute move

Declare PtrSafe Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As LongPtr)

Declare PtrSafe Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long

Declare PtrSafe Function GetInputState Lib "user32" Alias "GetInputState" () As Long

Declare PtrSafe Function GetQueueStatus Lib "user32" Alias "GetQueueStatus" (ByVal fuFlags As Long) As Long

Declare PtrSafe Function GetCapture Lib "user32" Alias "GetCapture" () As LongPtr

Declare PtrSafe Function SetCapture Lib "user32" Alias "SetCapture" (ByVal hwnd As LongPtr) As LongPtr

Declare PtrSafe Function ReleaseCapture Lib "user32" Alias "ReleaseCapture" () As Long

Declare PtrSafe Function MsgWaitForMultipleObjects Lib "user32" Alias "MsgWaitForMultipleObjects" (ByVal nCount As Long, pHandles As LongPtr, ByVal fWaitAll As Long, ByVal dwMilliseconds As Long, ByVal dwWakeMask As Long) As Long

第1套教程:VBA代码解决方案

第2套教程:VBA数据库解决方案

第3套教程:VBA数组与字典解决方案

第4套教程:VBA代码解决方案之视频(第一套的视频讲解)

第5套教程:VBA中类的解读和利用

第6套教程:VBA信息获取与处理

第7套教程:VBA之EXCEL应用

第8套教程:VBA之Word应用(最新推出)

上述教程的学习顺序:

① 7→1→3→2→6→5或者7→4→3→2→6→5。

② 7→8

标签: #cchar函数怎么用