走近VB.Net(一),VB中的族,类,对象(摘录部分MS

页面导航:首页 > 软件编程 > vb.net > 走近VB.Net(一),VB中的族,类,对象(摘录部分MS

走近VB.Net(一),VB中的族,类,对象(摘录部分MS

来源: 作者: 时间:2016-02-05 12:32 【

base.onQueryContinueDrag to send this event to any registered event listeners.OnResize (inherited from Control) Raises the Resize event.OnValidated (inherited from Control) Raises the Validated e
base.onQueryContinueDrag to send this event to any registered event listeners.

OnResize (inherited from Control) Raises the Resize event.

OnValidated (inherited from Control) Raises the Validated event.

OnValidating (inherited from Control) Raises the Validating event.

ParentChanged (inherited from Control) Called by the .NET Framework after a controls parent changes. This allows (for example) child controls to automatically hook events on their parent, giving better encapsulation.

ProcessCmdKey (inherited from RichControl) [To be supplied.]

ProcessDialogChar (inherited from Control) Processes a dialog character.

ProcessDialogKey (inherited from Control) Processes a dialog key.

ProcessKeyEventArgs (inherited from Control) Processes a key message.

ProcessKeyPreview (inherited from Control) Previews a keyboard message.

ProcessMnemonic (inherited from Control) Processes a mnemonic character.

ProcessTabKey (inherited from ContainerControl) Selects the next available control and makes it the active control.

RaiseDragEventArgs (inherited from RichControl) Raises the event associated with key with the event data of e and a sender of this control.

RaiseKeyEventArgs (inherited from Control) Raises the event associated with key with the event data of e and a sender of this control.

RaiseMouseEventArgs (inherited from Control) Raises the event associated with key with the event data of e and a sender of this control.

RaisePaintEventArgs (inherited from RichControl) Raises the event associated with key with the event data of e and a sender of this control.

RaisePropertyChangedEvent (inherited from Control) Raises the property changed event. This creates the needed event data and then calls OnPropertyChanged.

RecreateHandle (inherited from Control) Forces the recreation of the handle for this control. Inheriting controls must call base.recreateHandle.

ResumeLayout (inherited from Control) Overloaded. Resumes normal layout logic.

RTLTranslateAlignment (inherited from RichControl) Overloaded. [To be supplied.]

RTLTranslateContent (inherited from RichControl) [To be supplied.]

RTLTranslateHorizontal (inherited from RichControl) [To be supplied.]

RTLTranslateLeftRight (inherited from RichControl) [To be supplied.]

ScaleCore (inherited from Control) Performs the work of scaling the entire control and any child controls.

SendMessage (inherited from Control) Overloaded. Sends a Win32 message to the control.

这是VB6中最有名的API消息函数了,我把这个API的中文帮助附录于下,只要第一个参数不ByVal hwnd As Long不用就是了

Declare Function SendMessage& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any)

说明
调用一个窗口的窗口函数,将一条消息发给那个窗口。除非消息处理完毕,否则该函数不会返回。SendMessageBynum, SendMessageByString是该函数的“类型安全”声明形式
返回值
Long,由具体的消息决定
参数表
参数 类型及说明
hwnd Long,要接收消息的那个窗口的句柄
wMsg Long,消息的标识符
wParam Long,具体取决于消息
lParam Any,具体取决于消息

使用如下:Me.SendMessage(  ByVal wMsg As Long, ByVal wParam As Long, lParam As Any)

至如如何设定参数,就参考VB6.的一些源代码了,下面是一个拖动无标题栏窗体的用法:

Private Sub Form1_MouseDown(ByVal eventSender As Object, ByVal e As System.WinForms.MouseEventArgs)

        mousedown的事件中窗体中的下拉列表是找不到的,自己写一个吧,加上(ByVal eventSender As Object, ByVal e As System.WinForms.MouseEventArgs)即可

        下面的代码使窗体可以拖动

        Me.Capture() = False 释放鼠标捕获,等同于API的ReleaseCapture()

        Me.SendMessage(&HA1S, 2, 0) 唔,这个就是哪个sendmessage的API了,只是第一个句柄参数不再用了。

    End Sub

我们继续往下看:

SetBoundsCore (inherited from RichControl) [To be supplied.]

SetClientSizeCore (inherited from Control) Performs the work of setting the size of the client area of the control.

SetStyle (inherited from Control) Sets the current value of the specified bit in the controls style. NOTE: This is control style, not the Win32 style of the hwnd.

UpdateBounds (inherited from Control) Overloaded. Updates the bounds of the control.

UpdateStyles (inherited from Control) Forces styles to be reapplied to the handle. This function will call CreateParams to get the styles to apply.

UpdateZOrder (inherited from Control) Updates this control in its parents zorder.

WndProc [To be

Tags:

相关文章

    文章评论

    最 近 更 新
    热 点 排 行
    Js与CSS工具
    代码转换工具
    
    <