GetConnectorBitmapEx

Example

Purpose: Returns a bitmap for one of the connectors (horizontal bars) in the toolbox.

Returns: A string with the file name of the bitmap.

Argument  

Type

Required

Purpose

1

Integer

Yes

The number of the toolbox connector (1-32)

2

Integer

No

The height (in pixels) of the resultant bitmap.  If not present or zero, the connector will be set to 97x32 pixels

3

Integer

No

1 or 0.  

If this argument is 1, then the current DPI setting is used to enlarge the resultant bitmap. For example, if the computer is running at a 200% font scale (192 DPI), then the resultant bitmap will be doubled in size. So, if your computer is set to 200% DPI and if this argument is 1 and argument 2 is 0, then the resultant bitmap size of a symbol bitmap will be 64x64 pixels. If argument 2 is present and not zero, then if argument 3 is 1, then the bitmap size specified in argument 2 gets multiplied by the current font scale factor.

Argument 3 is important because it lets the caller decide if DPI awareness is important. For example, if the caller is not DPI aware then the caller would most likely not use argument 3, since Milestones would be running in a non-DPI aware sandbox where Windows is automatically enlarging bitmaps.

For example, on a 100% scale DPI system (96 DPI) GetConnectorBitmapEx(8,0,0) returns this bitmap:

On a form in a VB.net application, assume a picture control named picBarImage is used.  This code will display a picture of the 3rd bar in the current toolbox.

dim myconnectorbitmap as string

myconnectorbitmap=.getconnectorbitmapex(3)

picBarImage.Image = System.Drawing.Image.FromFile(myconnectorbitmap)

Note:  

 

Milestones Professional 2019 Automation Methods and Properties.  © Copyright 2018, KIDASA Software, Inc. All rights reserved.