Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Mincom LinkOne WinView COM Control

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

LinkOne WinView COM Control Reference

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.

Mincom Pty Ltd


GPO Box 1397
Brisbane QLD 4001
Australia
Ph: +61 7 3303 3333
Fax: +61 7 3303 3232
Web: http://www.mincom.com/linkone
Email: linkone.info@mincom.com
Published in Australia - 26/05/2010, 11:49.
Contents i

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

COM Control Reference


Please note that the LinkOne ActiveX control is now deprecated and should not be used. We encourage all
developers to use the new, richer .Net interfaces supplied with the LinkOne WinView program. For more
information on the LinkOne WinView .Net development platform and libraries please refer to Mincom
LinkOne WinView Technical Reference guide.
LinkOne WinView provides a COM control that allows external applications to send and receive
information to LinkOne WinView. This interface was made available in previous versions as an ActiveX
control. However, for versions 5 and above the control is supplied to developers as a COM
component. It has been provided as an intermediate measure to assist customers as they move their
LinkOne integrated applications onto our new .Net development platform.
The difference between ActiveX and COM controls is that ActiveX is a control which can be placed on
a form or resource. A COM control is a simply an object that can be called from code which references
it.
The LinkOne COM control provides a way to invoke the LinkOne Viewer, send commands to the
Viewer, and obtain information back from the Viewer. It enables you to access your LinkOne Viewer
from any environment that supports COM controls. This includes Visual Basic, web browsers, and
many other programming environments.
The LinkOne COM control is not a stand-alone control. It requires the LinkOne Viewer be installed on
the local PC as well. To use the control, treat it as you would any other COM control in your program
development environment by adding a reference to the L1ActiveX

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

You might also like