All pastes #437369 Raw Edit

Something

public text v1 · immutable
·published 2007-04-13 00:18 UTC
rendered paste body
VERSION 5.00
Begin VB.Form frmMain 
   Caption         =   "Windower Helper Demo"
   ClientHeight    =   1800
   ClientLeft      =   60
   ClientTop       =   405
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   1800
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdDeleteTextObject 
      Caption         =   "Delete Text Object"
      Height          =   645
      Left            =   2730
      TabIndex        =   3
      Top             =   930
      Width           =   1575
   End
   Begin VB.CommandButton cmdSendString 
      Caption         =   "Send Text"
      Height          =   390
      Left            =   3405
      TabIndex        =   2
      Top             =   210
      Width           =   1200
   End
   Begin VB.TextBox txtInput 
      Height          =   360
      Left            =   165
      TabIndex        =   1
      Text            =   "/echo Test\n"
      Top             =   210
      Width           =   3090
   End
   Begin VB.CommandButton cmdCreateTextObject 
      Caption         =   "Create Text Object"
      Height          =   645
      Left            =   300
      TabIndex        =   0
      Top             =   930
      Width           =   1575
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim lTextHelper As Long
Dim lKeyboardHelper As Long

Private Sub cmdCreateTextObject_Click()
    Call CTHCreateTextObject(lTextHelper, "VB6Test")
    Call CTHSetText(lTextHelper, "VB6Test", "This is a sample text object.")
    Call CTHSetColor(lTextHelper, "VB6Test", 255, 255, 255, 255)
    Call CTHSetLocation(lTextHelper, "VB6Test", 100, 100)
    Call CTHSetVisibility(lTextHelper, "VB6Test", True)
    Call CTHFlushCommands(lTextHelper)
End Sub

Private Sub cmdDeleteTextObject_Click()
    Call CTHDeleteTextObject(lTextHelper, "VB6Test")
    Call CTHFlushCommands(lTextHelper)
End Sub

Private Sub cmdSendString_Click()
    Call CKHSendString(lKeyboardHelper, txtInput.text)
End Sub

Private Sub Form_Load()
    lKeyboardHelper = CreateKeyboardHelper("WindowerMMFKeyboardHandler")
    lTextHelper = CreateTextHelper("WindowerMMFTextHandler")
End Sub

Private Sub Form_Unload(Cancel As Integer)
    DeleteKeyboardHelper (lKeyboardHelper)
    DeleteKeyboardHelper (lTextHelper)
End Sub