ScrollConsoleScreenBuffer 这个api怎么在vb中声明?

来源:百度知道 编辑:UC知道 时间:2024/06/05 12:26:21
不知道为啥直接把从api查看器粘贴到工程里面去之后,却提示“用户定义类型未定义”

由于我vb是自学的 - - 所以烂的不是一般的烂~
希望知道的大大帮帮忙~~
分不多,只有九分了~

悉数奉上!
嘿~咋只能给五分?

这样声明才对,结构体也要声明!

Public(或Private) Declare Function ScrollConsoleScreenBuffer Lib "kernel32" Alias "ScrollConsoleScreenBufferA" (ByVal hConsoleOutput As Long, lpScrollRectangle As SMALL_RECT, lpClipRectangle As SMALL_RECT, dwDestinationOrigin As COORD, lpFill As CHAR_INFO) As Long
Public(或Private) Type CHAR_INFO
Char As Integer
Attributes As Integer
End Type
Public(或Private) Type COORD
x As Integer
y As Integer
End Type
Public(或Private) Type SMALL_RECT
Left As Integer
Top As Integer
Right As Integer
Bottom As Integer
End Type

Public(或Private) Declare Function ScrollConsoleScreenBuffer Lib "kernel32" Alias "ScrollConsoleScreenBufferA" (ByVal hConsoleOutput As Long, lpScrollRectangle As SMALL_RECT, lpClipRectangle As SMALL_RECT, dwDestinationOrigin As COORD, lpFill As CHAR_INFO) As Long

这个