SetPort Method

PocketBrowser 3.x API

The SetPort Method of the MicroFlash ActiveX Object sets the port to which the printer connects.

SetPort (Method of the MicroFlash ActiveX Object) Syntax

Microflash.SetPort(strPort);


ParametersW Toggle Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description
Default Value
strPort String String representation of the port number that the printer is to connect to N/A

Examples Toggle Examples

The following javascript code demonstrates the usage of this method:

<script>
MicroFlash.SetPort('COM1:');
MicroFlash.AddData('Hello');
MicroFlash.AddData(' ');
MicroFlash.AddData('World\n');
MicroFlash.AddLine('From the PocketBrowser Team');
MicroFlash.Print(10);
alert('printed');
MicroFlash.Clear();
</script>
Copy example to clipboard Copy example to clipboard

Info Toggle Additional Information

Supported Platforms Windows CE, Windows Mobile
Persistence Executes immediately.
Minimum Requirements None.