Telegraph
SpellBuddy.com
SpellBuddy.com


» Home» Products» Telegraph» Manual


SpellBuddy.WindowsCE.Forms.Telegraph.TelegraphPole

Public Constructors

TelegraphPole()

Public Class TelegraphPole()

Creates the Telegraph Pole message interceptor.


Public Methods

AddTelegraphWire

Public Boolean = AddTelegraphWire(TelegraphWire, Boolean)

Adds a TelegraphWire to the Telegraph Pole list.

Parameters
Wire
A reference to a user created TelegraphWire class.
WireChildren
Set this value true to loop all child windows, automatically adding a new TelegraphWire for each.


Returns
Returns True if successful. If the wired windows parent window handle was available, the returned reference's hWndParent will be populated.

Example
TelegraphWire tw = new TelegraphWire();
tw.ListenTohWnd = Control1hWnd;
tw.Name = "Control1";
tw.WireEvent += new TelegraphWire.WireEventHandler(MsgEvents);
if (Telegraph.AddTelegraphWire(ref tw, false))
{
     // store a local copy of the wire for future use
     telegraphwirearray.Add(tw);
}
See Also
PoleWires; RemoveTelegraphWire;


DiscoverWindowHandle

Public IntPtr = DiscoverWindowHandle(IntPtr, String)

Searches the child windows of the Parent parameter for the Token parameter. The programmer must set the controls Text property to the Token string before searching.

Parameters
Parent
fs
The parent window to search.
Token
A unique string to search for. The max. allowed token length is 128.


Returns
The controls window handle, or null if the control was not found.

Example
// create a random # to make the token more unique
int rnd = new System.Random().Next(999);
// create the token w/ a tick count to make it more unique
string token = rnd.ToString()+"_"+System.Environment.TickCount.ToString();
// store off the existing controls text
string oldtext = yourcontrol.Text;
// set the controls text to the token
yourcontrol.Text = token;
// call DiscoverWindowHandle
IntPtr yourcontrolhandle = Telegraph.DiscoverWindowHandle(yourparent, token);
// restore the original text
yourcontrol.Text = oldtext;

RemoveTelegraphWire

Public Boolean = RemoveTelegraphWire(TelegraphWire)

Removes a TelegraphWire from the Telegraph Pole list.

Parameters
Wire
A TelegraphWire class.


Returns
Returns True if successful.

See Also
PoleWires; AddTelegraphWire;


Public Properties

KeepAlive

Public Boolean = KeepAlive

Set this value true to prevent the message interceptor from automatically disabling itself when the parent form looses focus. Setting this value true is highly discouraged. The message interceptor will continue to use processor resources and will slow down the device.


PoleWires

Public ArrayList = PoleWires

Returns a copy of the Telegraph Pole list. It contains the currently wired TelegraphWires.

See Also
AddTelegraphWire; RemoveTelegraphWire;

Trapped

Public Boolean = Trapped

Gets or Sets the message trap value. After activating the message trap, the returned value will be false until the trap has been established. If you need to know when the trap is set, use TelegraphTrappedEvent.

See Also
TelegraphTrappedEvent;


Public Events

TelegraphTrappedEvent

Public Event TelegraphTrappedEvent(EventArgs)

This Event is sent to indicate the message trap is activated.

See Also
Trapped; TelegraphUnTrappedEvent;


TelegraphUnTrappedEvent

Public Event TelegraphUnTrappedEvent(EventArgs)

This Event is sent to indicate the message trap is de-activated.

See Also
Trapped; TelegraphTrappedEvent;



SpellBuddy.WindowsCE.Forms.Telegraph.TelegraphWire

Public Constructors

TelegraphWire()

Public Class TelegraphWire()

The TelegraphWire class used for connecting the Pole message interceptor to the Users application.


Public Properties

hWndParent

Public IntPtr = hWndParent

Handle to the parent window of ListenTohWnd.


ListenTohWnd

Public IntPtr = ListenTohWnd

Handle to a window to intercept message from.


Name

Public String = Name

Name for the TelegraphWire.


Public Events

WireEvent event

Public Event WireEvent(WireEventArgs)

Event handler to send intercepted messages.



SpellBuddy.WindowsCE.Forms.Telegraph.TelegraphWire.WireEventArgs

Public Constructors

WireEventArgs()

Public Class WireEventArgs

Contains the intercepted message


Public Properties

hwnd

Public IntPtr = hwnd

message handle


lParam

Public int = lParam

lParam


message

Public int = message

message


pt

Public int = pt

mouse


time

Public int = time

time


wParam

Public int = wParam

wParam



SpellBuddy Copyright © 2003-2008, Craig Lubitz. All Rights Reserved. Parts of this web site are Copyright © 2002, John Minadeo. All Rights Reserved.