SendMessageToControl
Previous Top Next

Sends a system message to the specified control.
See this page for more information about system messages: http://msdn2.microsoft.com/en-us/library/bb775494(VS.85).aspx

Syntax: SendMessageToControl (Control As Control, Msg As UInt32, WParam As UInt32, LParam As UInt32) As Int32

Example - Scrolls a multiline TextBox:
'hardware1 is a Hardware object.
Sub Globals
      WM_VSCROLL  = 277
      SB_LINEUP = 0
      SB_LINEDOWN = 1
      SB_PAGEUP = 2
      SB_PAGEDOWN = 3
End Sub

Sub App_Start
      Form1.Show
      hardware1.New1
End Sub

Sub btnLineUp_Click
      hardware1.SendMessageToControl("TextBox1",WM_VSCROLL,SB_LINEUP,0)
End Sub

Sub btnLineDown_Click
      hardware1.SendMessageToControl("TextBox1",WM_VSCROLL,SB_LINEDOWN,0)
End Sub

Sub btnPageUp_Click
      hardware1.SendMessageToControl("TextBox1",WM_VSCROLL,SB_PAGEUP,0)
End Sub

Sub btnPageDown_Click
      hardware1.SendMessageToControl("TextBox1",WM_VSCROLL,SB_PAGEDOWN,0)
End Sub