Mincom LinkOne WinView COM Control
Mincom LinkOne WinView COM Control
Mincom LinkOne WinView COM Control
5.11
Copyright 2010 by Mincom®. All rights reserved.
No part of this document may be reproduced, transferred, sold, or otherwise disposed of without the
written permission of Mincom Pty Ltd.
All trademarks are the copyright of their respective owners.
LinkOne is a registered trademark of Mincom Pty Ltd.
Microsoft, Windows, and the .NET Framework are registered trademarks of Microsoft Corporation.
Every effort has been made to ensure the accuracy of this manual. However, Mincom Pty Ltd makes
no warranties with respect to this documentation and disclaims any implied warranties of
merchantability and fitness for a particular purpose. Mincom Pty Ltd shall not be liable for any errors or
for incidental or consequential damages in connection with the furnishing, performance, or use of this
manual or the examples herein. The information in this document is subject to change without notice.
Contents
System Requirements ..............................................................................................................................1
COM Control Reference ...........................................................................................................................2
Properties ..............................................................................................................................................3
LinkOneArguments Property .............................................................................................................3
LinkOneConnected Property .............................................................................................................3
Caption Property ...............................................................................................................................3
Enabled Property...............................................................................................................................3
Methods ................................................................................................................................................4
Advise Method...................................................................................................................................4
UnAdvise Method ..............................................................................................................................4
Command Method .............................................................................................................................4
Request Method ................................................................................................................................5
Poke Method .....................................................................................................................................5
StartedLinkOne Method ....................................................................................................................5
Events ...................................................................................................................................................6
Attention Event ..................................................................................................................................6
ConnectionChanged Event ...............................................................................................................6
EditSelections ....................................................................................................................................6
Selections Event................................................................................................................................6
LinkOne WinView COM Control Reference
System Requirements
The minimum system requirements to run LinkOne WinView are:
A personal computer running:
Windows 7 (all editions)
Windows Vista (all editions)
Windows XP with Service Pack 2
Windows 2003 Server with Service Pack 1
Windows 2000 with Service Pack 4
Windows 2000 Server with Service Pack 4
Windows 2008 Server
Microsoft .NET Framework 2.0 or higher.
80 MB available hard disk space.
Microsoft Internet Explorer 6.0 with Service Pack 1 or higher.
1
LinkOne WinView COM Control Reference
2
LinkOne WinView COM Control Reference
Properties
The following properties can be accessed on the LinkOne COM Control.
LinkOneArguments Property
Description
Gets or Sets the command-line arguments to be used when starting an instance of LinkOne WinView.
Default value is "-ni".
Return Type
BSTR
LinkOneConnected Property
Description
Gets or Sets a boolean value indicating if the COM control has established a connection to an
instance of LinkOne WinView.
Returns True if connected, false if not connected.
If LinkOne WinView is not connected and this value is set to true, a new connection with LinkOne
WinView will be initialized.
Return Type
Boolean
Caption Property
Description
This property is now deprecated. In versions prior to version 5.0, it determined the text that would
appear on the ActiveX control.
Return Type
BSTR
Enabled Property
Description
This property is now deprecated. In versions prior to version 5.0 it determined the enabled state of the
ActiveX control button.
Return Type
Boolean
3
LinkOne WinView COM Control Reference
Methods
Advise Method
Description
Tells LinkOne WinView to advise your program of activity in the connected LinkOne WinView
application.
Arguments
eventString - Identifies which events you wish to be advised about.
Possible values are
ATTENTION - An Attention Event will be sent when the “attention” button is pressed.
SELECTIONS - A Selections Event will be sent whenever the LinkOne Selection list is modified.
SEL&ATTN - An Attention Event will be sent when the “attention” button is pressed and a
Selections Event will be sent whenever the LinkOne Selection list is modified.
EDIT_SELECTIONS - An EditSelections Event will be sent when the user asks for the Edit
Selection dialog to be displayed.
NONE - Turn off all events. The equivalent of calling the UnAdvise method for each of the above
strings.
Usage
object.Advise( string eventString )
UnAdvise Method
Description
Tells LinkOne WinView to no longer advise your program of activity in the connected LinkOne
WinView application.
Arguments
eventString - Identifies which events you wish to no longer be advised about.
Possible values are
ATTENTION - Attention Events will no longer be triggered.
SELECTIONS - Selections Events will no longer be triggered.
EDIT_SELECTIONS - EditSelections Events will no longer be triggered.
Usage
object.UnAdvise( string eventString )
Command Method
Description
Sends a LinkOne command string to LinkOne WinView.
Arguments
commandString - A command string enclosed in brackets (i.e. '[' and ']'). Please refer to the WinView
5 Technical Reference for more information on LinkOne Commands.
4
LinkOne WinView COM Control Reference
Usage
object.Command( string commandString )
Request Method
Description
Gets a named value from LinkOne WinView for the current view state. The name value can be a
pre-defined name or a user defined name.
Arguments
type - The type of data you want to retrieve from LinkOne WinView. Please refer to the WinView 5 API
documentation for a list of types that can be returned.
Usage
object.Request( string type )
Returns
A string containing the requested data.
Poke Method
Description
Transmits data to a control within the LinkOne WinView shell.
Arguments
control - Identifies the control you wish to send information to. The only control available is
SELECTIONS.
data - The data you wish to send to the control. The only available data is the selection list definition
(.sel) file content.
Usage
object.Poke( string control, string data )
StartedLinkOne Method
Description
Indicates whether the currently running LinkOne instance was started by this COM control.
Arguments
None
Usage
object.StartedLinkOne()
Returns
boolean - Returns true if LinkOne instance was started by the COM control, false otherwise.
5
LinkOne WinView COM Control Reference
Events
Attention Event
Description
This event handler will be called when attention button has been pressed.
Pre-Condition
Must be advised of ATTENTION or SEL&ATTN events via one of the following commands
object.Advise(“ATTENTION”)
object.Advise(“SEL&ATTN”)
ConnectionChanged Event
Description
This event is fired when the COM control is connected to and disconnected from the LinkOne.exe.
When this event is fired, there is no indication of whether WinView is connected or disconnected. You
have to query the LinkOneConnected property.
Pre-Condition
None
EditSelections
Description
This event is fired after the user has changed the view state of the selection list by going to the View
menu and selecting the Selection List menu item.
This event is also fired if the [SELECTIONS.HIDE] or [SELECTIONS.SHOW] commands are run.
Pre-Condition
Must be advised of SELECTIONS or SEL&ATTN events via the following command
object.Advise(“SELECTIONS”)
object.Advise(“SEL&ATTN”)
Selections Event
Description
This event is fired after the user has added or removed an item from the selection list. This event will
also be called numerous times after you have cleared the current selection list. It is recommended that
this event is not hooked up if you are clearing a selection list.
The event handler is called regardless of adding or deleting selection list item and you have to use
other COM control facilities to determine which event has occurred. Take heed of the
recommendations above and avoid doing too much work in the event handler.
Pre-Condition
Must be advised of SELECTIONS or SEL&ATTN events via one of the following commands
object.Advise(“SELECTIONS”)
object.Advise(“SEL&ATTN”)
6
LinkOne WinView COM Control Reference