· Windows APIs
大多数的API调用可以象在Visual Basic 6.0中一样使用,因为
数据类型发生了改变。在Visual Basic 6.0中的Long类型在Visual Basic.NET中定义为Integer类型。在升级过程中这些定义会自动改变,例如:Private Declare Function GetVersion Lib "kernel32" () As
Long
Fun...
· In VB6, you could call this sub in one of two ways:
foo “Hello ”
Call foo(“Hello ”)
In VB.NET, you also could call this sub in one of two ways:
Foo(“Hello ”)
Call foo(“Hello ”)
The difference, of course, is that the parentheses are always required in the VB.NET
calls,...
· Dim txtBillTo as TextBox
Dim txtShipTo as TextBox
txtShipTo =txtBillTo
The line of code txtShipTo =txtBillTo sets the Text property of txtShipTo to the
value in the Text property of txtBillTo . But what if that isn’t what you wanted?
What if, instead, you wanted to create an...
· Major VB.NET Changes
VB.NET introduces major changes to the VB language. Some
are modifications to existing ways of working, whereas others
are brand new. This chapter will cover some of those
changes, but this is by no means an exhaustive list of all
changes from VB to VB.NE...
· Your First VB.NET
Application
It’s time to jump in and start working with VB.NET. First, you
need to learn a little bit about the new IDE. The new VB.NET
IDE might look somewhat familiar to you, but there are some
significant changes that make it a more useful environment.
H...
· Figure 2.3
The New Project dialog box.
If you examine the Visual Basic project types, you’ll see that many of them are dif-ferent
from what you are used to with VB6. Some of the major project types are
Windows Application—This is a standard executable, in VB6 terminology. ...
· '窗体中
Option ExplicitPrivate Sub Form_Load()
Dim ret As Long'记录原来的window程序地址preWinProc = GetWindowLong(Me.hWnd, GWL_WNDPROC)'用自定义程序代替原来的window程序ret = SetWindowLong(Me.hWnd, GWL_WNDPROC, AddressOf wndproc)idHotKey = 1 'in the range &h0000 through &hBF...