Introduction
next

PicturePNG

Copyright 2015-2018 by Hestor Ltd.
All Rights Reserved.
PicturePNG is a trademark of Hestor Ltd

We developed PicturePNG for our own internal use within our software applications, we have developed many applications over the years.

These range from simple stand alone systems, to systems in use within large organisations including Hospitals, etc.

PicturePNG will allow you to place PNG images on your DESIGN / RUN time forms, it also offers the following;

* Allow users to select / open images (including PNGs)

* Open and Save images in different formats (thus giving you a saveas method)

* Copy image to original Microsoft Picture control or even the clipboard

* HTML URL interaction, allowing users to click to visit your website

All of which is done by setting a simple properties / calling simple methods.

* Alignment, FilePicture, HTML Active, HTML Link

* LastError, OpenPicture, SavePicture,

* Html Active, Html Link, Exported2Clipboard

Send your comments, suggestions or to ask questions about this component

Copyright 2018 - All Rights Reserved Hestor Ltd

© 2018 Hestor Ltd


Updates

Updates

Updates are automatically notified to all developers / registered user.

If you need any assistance or wish to ask any questions please email support@hestor.com

Send your comments, suggestions or to ask questions about this component

Copyright 2018 - All Rights Reserved Hestor Ltd


Getting Support

Getting Support

We want to be as helpful as possible. We always want you to come away happy. We realize that we can't make everyone happy (for some reason, our families believe we should be at home sometimes) we will however always help as best we can.

Help With Our Components

If you're having trouble with one of our components, here are a few general suggestions.

First, take a look at the sample programs. Usually, there is a sample program that shows how to

use every feature of our components. These can be quite helpful.

These sample programs are located in the default installation folders eg: c:\program files\hestor\PicturePng\Samples

Second, if you haven't already, take a look at the help file and/or manual.

They spell out what each of the Properties, Events, Methods, Objects and Interfaces does.

If you are still having trouble with one of our components, please feel free to contact us to get help.

When you do, make sure that you have as much information about your problem ready as possible.

The more you tell us, the better we can help you.

Help With General Programming

Many people come to us with questions about general programming issues. We would love to help everyone learn to become great programmers, but we simply don't have the time.

We would always suggest that you read books, try by example, take a look at someone else's coding, when buying books try the likes of ebay first, you can save a huge amount on books purchased that have already been used, and as a rule - as any developer will tell you - you only ever need just a chapter from a book - we personally have hundreds and hundreds of books in the office and the vast majority of them are secondhand !

Getting Support

You can receive support for our products from our FAQ, web site or e-mail.

This Help File

This help file is fully searchable. We suggest that you try that first before anything else. By searching in this help file, you'll be searching all of the reference information for this component and all of the FAQ questions and answers.

FAQ

You can find our FAQ at http://www.ocx.hestor.com/Faqs.html

E-Mail

If you cannot find the answer to your question on our web site, you can email us directly at support@hestor.com.


How to Purchase Licenses

© 2018 Hestor Ltd


Online Via Website
How to Purchase Licenses > Online Via Website

Online Via Website

You can purchase a full licence by visiting our website at the following address;

http://www.ocx.hestor.com

PicturePng is sold as a single per developer OCX, this means each developer will require their own licence,.

As a good will gesture we will allow each developer to use their licence key for the OCX on both a fixed computer and their own laptop / notebook.

If you have any issues with registering your licence code or any other problems please contact us; support@hestor.com


Email / Telephone Direct
How to Purchase Licenses > Email / Telephone Direct

Email / Telephone Direct

We are always happy to help where ever possibly, you can send any questions or support issues via email to; support@hestor.com

We are based in the United Kingdom, support via telephone is offered between the hours of 9:00am to 5.00pm UK time.

You can call the support line on +44 (0) 161 660 1366


Legal Information

© 2018 Hestor Ltd


Royalty Free License Agreement
Legal Information > Royalty Free License Agreement

Royalty Free Licence Agreement

PicturePNG™ by Hestor Ltd

License Agreement

Hestor Ltd grants a license to use the enclosed software to the original purchaser. Copies may be made for back-up purposes only.

Copies made for any other purpose are expressly prohibited, and adherence to this requirement is the sole responsibility of the purchaser.

Customer written applications containing embedded Hestor Ltd products may be freely distributed, without royalty payments to Hestor Ltd, provided that such distributed Hestor Ltd product is bound into these applications in such a way so as to prohibit separate use in design mode, and that such Hestor Ltd product is distributed only in conjunction with the customer's own software product. The Hestor Ltd product may not be distributed by itself in any form.

Neither source code for Hestor Ltd products nor modified source code for Hestor Ltd products may be distributed under any circumstances, nor may you distribute .OBJ, .LIB, etc. files that contain our routines. This component may be used as a constituent component only if the compound component thus created is distributed with and as an integral part of an application. Permission to use this component as a constituent component does not grant a right to distribute the license (LIC) file or any other file other than the component executable itself. This license may not be transferred to a third party.

This product is licensed for use by only one developer at a time. Hestor Ltd expressly prohibits installing this product on more than one computer if there is any chance that both copies will be used simultaneously. This restriction also extends to installation on a network server, if more than one workstation will be accessing the product. All developers working on a project that includes a Hestor Ltd product, even though not working directly with the Hestor Ltd , are required to purchase a license for that Hestor Ltd product.

This software is provided "as is". Hestor Ltd makes no warranty, expressed or implied, with regard to the software. All implied warranties, including the warranties of merchantability and fitness for a particular use, are hereby excluded.

Hestor Ltd's LIABILITY IS LIMITED TO THE PURCHASE PRICE. Under no circumstances shall Hestor Ltd or the authors of this product be liable for any incidental or consequential damages, nor for any damages in excess of the original purchase price.

To be eligible for free technical support via the Internet and to ensure that you are notified of any future updates, please complete the enclosed registration card and return it to Hestor Ltd .

English Version

We require that you purchase one copy of a component per developer on a project. If this is met, you may distribute the component with your application royalty free. You may never distribute the LIC file. You may not change the product in any way that removes or changes the requirement of a license file.

We encourage the use of our components as constituent components when the compound components you create are an integral part of your application. But we don't allow distribution of our components as constituents of other components when the compound component is not part of an application. The reason we need to have this restriction is that without it someone might decide to use our component as a constituent, add some trivial (or even non-trivial) enhancements and then sell the compound component. Obviously there would be little difference between that and just plain reselling our component.

If you have purchased the source code, you may not re-distribute the source code either (nor may you copy it into your own project). Hestor Ltd retains the copyright to the source code.

Your license is non transferable. Contact us for further information.

The sample versions of our products are intended for evaluation purposes only. You may not use the sample version to develop completed applications.

If you have any issues with registering your licence code or any other problems please contact us; support@hestor.com


PicturePNG Reference

© 2018 Hestor Ltd


PicturePNG Overview
PicturePNG Reference > PicturePNG Overview

PicturePNG Overview

We developed PicturePNG for our own internal use within our software applications, we have developed many applications over the years.

These range from simple stand alone systems, to systems in use within large organisations including Hospitals, etc.

PicturePNG will allow you to place PNG Images on your form at both DESIGN and RUN time;

* Allow users to select / open images (including PNGs)

* Open and Save images in different formats (thus giving you a saveas method)

* Copy image to original Microsoft Picture control or even the clipboard

* HTML URL interaction, allowing users to click to visit your website

All of which is done by setting a simple properties / calling simple methods.

* Alignment, FilePicture, HTML Active, HTML Link

* LastError, OpenPicture, SavePicture,

* Html Active, Html Link, Exported2Clipboard


Technical / Distribution Information
PicturePNG Reference > Technical / Distribution Information

Technical / Distribution Information

Active X Control

PicturePNG OCX

FILENAME | PicturePNG.Ocx
Object Name | PicturePNG
Object ID |
Compatibility | VB 5.0 and 6.0, VFP 5.0 and 6.0, other languages
DLL's required | All required additional DLL's will be installed during setup if required.
Registration | You will need to register the OCX control within your installation programme.

Distribution Note

When you develop and distribute an application that uses this component:

1. The ActiveX control (PicturePNG.ocx) must be included in the installation package.

2. Use RegSvr32.EXE (or any other install package) to register the OCX.

3. Install the component file(s) into the user's Windows SYSTEM32 folder.

The component file(s) has/have version information built into it.

During installation, ensure that you are not overwriting a newer version.

4. DO NOT include the component's .LIC file.


License Key Registration - How to register
PicturePNG Reference > License Key Registration - How to register

License Key Registration - How to register

Method 1 - Design Mode

After placing the object onto your Form, press F4 - bring up the property window and enter your

registration details.

Enter in your Company, Licence and User details as they appear in the registration email we

have sent you.

Once entered into the object properties, the NAG screen will not be shown.

Method 2 - Programmatically

You can enter your registration details via coding, this is then processed at run time.

Example Coding (Visual Basic 6)

With PicturePng1

.Company = "Hestor Ltd"

.Licence = "122-837D-203-72F"

.User = "Davids"

End With

* To complete a registration process, you need to specify the three fields above;

* Company Name, Licence Number & User Name - all of these details are emailed to you upon

successful purchase of a valid licence subscription.

* You can confirm the licence has been successful by calling the Property CallKey, for example;

Dim bSuccess as Boolean

bSuccess = PicturePng1.ConfirmKey

MsgBox "Key Status (True = Valid, False - Invalid) : " & bSuccess

If you have any problems or issues please contact us via support@hestor.com


NAG Screen - Valid licece details required
PicturePNG Reference > NAG Screen - Valid licece details required

NAG Screen - Valid licence details required

Until you have purchased and registered your details, the NAG screen will appear periodically.

Enter in your Company, Licence and User details as they appear in the registration email we have sent you.

Once entered into the object properties, the NAG screen will not be shown either at Design or Run time.

See License Key Registration for further information on how to register your purchase details.

If you have any problems or issues please contact us via support@hestor.com


Tutorials

© 2018 Hestor Ltd


Basic Example (VB)
Tutorials > Basic Example (VB)


Sample A
Tutorials > Basic Example (VB) > Sample A

Basic Examples - Sample A

Within the installation folder you will find the Samples folder, under that the Basic folder you will find the project SampleA.vbp

This example allows you to try out give methods, such as Open Picture, Save Picture, Copy Picture

In addition to that you can test out setting the properties OpenPicture and SavePicture, yep these are

both methods and functions ! But with a big difference, calling the methods without passing

any file name will evoke the Browser interface for the user to select there file.

Unlike the Microsoft Standard Picture control, the PicturePNG control will both display PNG images at run

time but also at DESIGN time !

Take time to try the methods out, look at the properties and above all look at the sample source code.


Enhanced Example (VB)
Tutorials > Enhanced Example (VB)


Enhanced Sample
Tutorials > Enhanced Example (VB) > Enhanced Sample

Enhanced Example - Enhanced_Sample

Within the installation folder you will find the Samples folder, under that the Enhanced folder you will find the project EnhancedSample.vbp

This example shows a whole host of examples, showing you just how flexible the PicturePng control is.

Try changing various settings, and what the component change in front of you.

TIP: We would suggest that you first of all try the Alignment property before actually even loading any
images into the control. Some of the more elaborate properties / methods will require that you either

read the help topic or view the source code (the latter in our opinion is always better.


Custom Property F4

© 2018 Hestor Ltd


Access the ...
Custom Property F4 > Access the ...

Access the ...

F4 - Properties - DESIGN TIME ONLY

From the F4 properties form, you can double click on to the ... button of the Custom properties page.

By doing this you can access the bespoke inbuilt file browser to attach your chosen PNG picture.

You can either type in the absolute path and file name into the above text box or click onto the ... button.

If you click onto the button you will then see a custom file browser, this is similar to the windows browser,
however it will actually show you a preview of your PNG pictures on the right hand side.

When you have clicked onto the required image, click the Open button, followed by the Ok button. Your image will now be
shown on your form in DESIGN time !

Remember you can actually set the property AutoSize and Alignment to create Images with backgrounds, etc.

NOTE:

When calling the SavePicture method without a name, the above file browser will appear, so the user can specify the
file name and chose where to save the picture and even the file format (see File Types within the Appendixes).

Copyright 2015 - All Rights Reserved Hestor Ltd


Methods

© 2018 Hestor Ltd


About
Methods > About

Displays the About Box.

Syntax

[Visual Basic]

object.About

The syntax of the About method has these parts;

Part | Description
object | Required. A PicturePng component.

Remarks

This method displays the About Box for the control.

Copyright 2015 - All Rights Reserved Hestor Ltd


Confirm Key
Methods > Confirm Key

Returns a value to indicate if the current licence key is valid.

Syntax

[Visual Basic]

object.ConfirmKey [=confirmkey]

The syntax of the ConfirmKey property has these parts;

Part | Description
object | A PicturePng component.
confirmkey | A Boolean value that determines whether your licence key is valid.

Remarks

Each FancyFonts object requires licence validation, make sure you either set these values into the

objects properties at design time or set them within your coding at run time.

Example Coding (Visual Basic 6)

With PicturePng1

.Company = "Hestor Ltd"

.User = "Davids"

.License = "239-2398-D34-2817"

End With

Dim TestKey as Boolean

TestKey=PicturePng1.ConfirmKey

IF TestKey=True then Msgbox "Your Key is VALID" ELSE Msgbox "Sorry Key not accepted"

* Remember that the properties can be entered at design time onto the object itself (Visual Basic 6

- press F4), thus removing the need to manually add the coding above.

Data Type

Boolean


Enabled
Methods > Enabled

Enables or disables the object from running in LIVE mode.

Syntax

[Visual Basic]

object.Enabled [=enabled]

The syntax of the Enabled property has these parts;

Part | Description
object | A PicturePng component.
enabled | A Boolean value that determines whether the object is running in LIVE mode.

Remarks

Each PicturePng object can be shown either running (LIVE - TRUE) or not (PAUSED - FALSE).

The caption will be displayed in accordance with the property settings your have chosen regardless

of this setting.

Data Type

Boolean

Send your comments, suggestions or to ask questions about this component

Copyright 2018 - All Rights Reserved Hestor Ltd

Related Topics:
Enabled
© 2018 Hestor Ltd


Export2Clipboard
Methods > Export2Clipboard

Export current image contained within the PicturePng control

Syntax

[Visual Basic]

object.Export2Clipboard[=PicPng_Errors]

The syntax of the OpenPicture property has these parts;

Part | Description
object | A PicturePng component.
export2clipboard | nothing

Remarks

Once the image has been loaded into the PicturePng control you can export the image to the
clipboard in the following way;

Example Coding (Visual Basic 6)

Dim IsOk As Long

IsOk = PicturePng1.Export2Clipboard

If IsOk = 0 Then MsgBox "Image Copied to Clipboard Successfully."

*So long as no errors occurred you your image is now available to paste into other applications in the
usual manor (CTRL & V or Paste function), if any error was encountered the IsOk flag will

contain the error code, the LastError contains the true error description

Review the EXAMPLE Codings

We would suggest that you load up the examples provided, these not only show you how to
implement the methods but also show you example coding.

Data Type

Strings, Returns Long


FilePicture
Methods > FilePicture

Returns or sets the FilePicture of the PciturePng control.

Syntax

[Visual Basic]

object.FilePicture [= filepicture]

The syntax of the FlashingColor property has these parts;

Part | Description
object | A PicturePng component.
filepicture | Absolute path name / file name of image

Remarks

You can manually set this property both at design time and more importantly at run time.

* You must however pass the full absolute path name / file name in order for the image

file to be loaded, you can load up PNG images using this property.

Example Coding (Visual Basic 6)

With PicturePng1

.FilePicture="C:\Users\Davids\Pictures\Sample.png")

End Withe

*So long as no errors occurred you will see your image displayed within the PicturePNG

control after you press the enter key or after setting the property in code (as above).

Even PNG images are displayed at Design Time.

Data_Type

String


OpenPicture
Methods > OpenPicture

Open a Picture / Image within the PicturePng control

Syntax

[Visual Basic]

object.OpenPicture[=PicPng_Errors]

The syntax of the OpenPicture property has these parts;

Part | Description
object | A PicturePng component.
openpicture | An absolute path name / file name or BLANK

Remarks

You can call this method in one of two ways;

Method 1

Firstly, you can hard set the file you wish to open into the PicturePng control

Example Coding (Visual Basic 6)

Dim IsOk As Long

IsOk = PicturePng1.OpenPicture("C:\Users\Davids\Pictures\Sample.Png")

If IsOk <> 0 Then MsgBox "Error Code: " & IsOk & " - " & PicturePng1.LastError, vbCritical, "Error"

*So long as no errors occurred you will see your image displayed within the PicturePNG, if any error

was encountered the IsOk flag will contain the error code, the LastError contains the true

error description

Method 2 - User selects their image file

Secondly, you can actually get the user to go pick / select the picture they want to access, via the

built in browser method. To do this just call the method without passing any filename.

Example Coding (Visual Basic 6)

Dim IsOk As Long

IsOk = PicturePng1.OpenPicture

If IsOk <> 0 Then MsgBox "Error Code: " & IsOk & " - " & PicturePng1.LastError, vbCritical, "Error"

*So long as no errors occurred, the image the user has chosen will be displayed, if any error was
encountered the IsOk flag will contain the error code, the LastError contains the true error

description

Review the EXAMPLE Codings

We would suggest that you load up the examples provided, these not only show you how to

implement the methods but also show you example coding.

Data Type

Strings, Returns Long


SavePicture
Methods > SavePicture

Save a Picture / Image within the PicturePng control

Syntax

[Visual Basic]

object.SavePicture[=PicPng_Errors]

The syntax of the SavePicture property has these parts;

Part | Description
object | A PicturePng component.
savepicture | An absolute path name / file name

Remarks

You can call this method in one of two ways;

Method 1

Firstly, you can save your image using a fixed file path / name, extension

Example Coding (Visual Basic 6)

Dim IsOk As Long

IsOk = PicturePng1.SavePicture("C:\Users\Davids\Pictures\Sample.Png")

If IsOk <> 0 Then MsgBox "Error Code: " & IsOk & " - " & PicturePng1.LastError, vbCritical, "Error"

*So long as no errors occurred you the IsOk flag will be set to 0, otherwise you will get the
LastError message shown on screen.

Method 2 - User chooses where to save the image, its name and file format

Secondly, you can actually get the user choose where the file is to be saved, along with the name
and file format (see above for supported formats)

Simply call the function without passing it the file name.

Example Coding (Visual Basic 6)

Dim IsOk As Long

IsOk = PicturePng1.SavePicture()

If IsOk <> 0 Then

MsgBox "Error Code: " & IsOk & " - " & PicturePng1.LastError, vbCritical, "Error"

Else

MsgBox "Your image has been saved"

End If

*So long as no errors occurred, the image will be saved, if any error was encountered the IsOk
flag will contain the error code, the LastError contains the true error description

TIP: You can OPEN the image in one format and SAVE the image in another format !

Review the EXAMPLE Codings

We would suggest that you load up the examples provided, these not only show you how to

implement the methods but also show you example coding.

Data Type

String, Returns Long


Properties

© 2018 Hestor Ltd


Alignment
Properties > Alignment

Returns or sets the Alignment of the PicturePNG control.

Syntax

[Visual Basic]

object.Alignment [= alignment]

The syntax of the Alignment property has these parts;

Part | Description
object | A PicturePng component.
alignment | The alignment to the used when displaying the objects caption.

Remarks

The value of the alignment property must be one of the following constants;

Constants | Value | Description
TopLeft | 1 | Image to the top left hand side of the object
TopCentre | 2 | Image to the top centre of the object
TopRight | 3 | Image to the top right hand side of the object
MiddleLeft | 4 | Image to the middle left hand side of the object
MiddleCentre | 5 | Image to the middle centre of the object
MiddleRight | 6 | Image to the middle right hand side of the object
BottomLeft | 7 | Image to the bottom left hand side of the object
BottomCentre | 8 | Image to the bottom middle of the object
BottomRight | 9 | Image to the bottom right hand side of the object

* The alignment property has no effect when the property AutoSize = TRUE

Example Coding (Visual Basic 6)

With PicturePng1

.Alignment=Middle_Centre

End With

Data_Type

Integer


Appearance
Properties > Appearance

Returns / sets the Appearance of the control.

Syntax

[Visual Basic]

object.Caption [= caption]

The syntax of the Caption property has these parts;

Part | Description
object | A PicturePng component.
appearance | A String expression that is displayed as the objects caption title.

Remarks

The value of the alignment property must be one of the following constants;

Constants | Value | Description
Flat | 0 | Background panel is flat
3D | 1 | Background panel has a 3D effect to it

* As with the Microsoft Picture control, by combining the Appearance and

BorderStyle you can achive some very interesting effects.

Example Coding (Visual Basic 6)

With PicturePng1

.Alignment=Middle_Centre

End With

Data Type

Interger


AutoSize
Properties > AutoSize

Returns or sets the AutoSize property, turning on / off the autosizing of the control.

Syntax

[Visual Basic]

object.AutoSize [= autosize]

The syntax of the Edging property has these parts;

Part | Description
object | A PicturePng component.
autosize | A Boolean expression either being set as TRUE or FALSE

Remarks

* If AutoSize is set to TRUE the properties of Alignment will have no EFFECT whatsoever.

Data_Type

Boolean


BackColor
Properties > BackColor

Returns or sets the BackColor of the PicturePNG control.

Syntax

[Visual Basic]

object.BackColor [= backcolor]

The syntax of the BackColor property has these parts;

Part | Description
object | A PicturePng component.
backcolor | A color that determines the background color of the PicturePng's object.

Remarks

When using the PicturePNG control you can set a background colour and choose to align

the image in a given way, however when you save the image or copy2clipboard

the image is saved without any borders !

Example Coding (Visual Basic 6)

With PicturePng1

.BackColor= &H8000000F&

End With

Data_Type

OLE_COLOR


BorderStyle
Properties > BorderStyle

Returns or sets the BorderStyle of the PicturePNG control.

Syntax

[Visual Basic]

object.BorderStyle [= borderstyle ]

The syntax of the BorderStyle property has these parts;

Part | Description
object | A PicturePng component.
borderstyle | An Integer value

Remarks

The value of the borderstyle property must be one of the following constants;

Constants | Value | Description
None | 0 | No border is shown
Fixed | 1 | A 3D effect border is shown

* As with the Microsoft Picture control, you can combine the alignment property with that

of the borderstyle property.

Data_Type

Integer


Company
Properties > Company

Returns / sets your Company details, registered users.

Syntax

[Visual Basic]

object.Company [= company]

The syntax of the Company property has these parts;

Part | Description
object | A PicturePng component.
company | A String expression that contains your company information as from your registration details.

Remarks

The property company is used as a way of setting your registration details into the system, this

can either be set within the Design Mode or in Run Time.

Example Coding (Visual Basic 6)

With PicturePng1

.Company = "Hestor Ltd"

.Licence = "122-837D-203-72F"

.User = "Davids"

End With

* To complete a registration process, you need to specify the three fields above;

* Company Name, Licence Number & User Name - all of these details are emailed to you upon

successful purchase of a valid licence subscription.

* You can confirm the licence has been successful by calling the Property CallKey, for example;

Dim bSuccess as Boolean

bSuccess = PicturePng1.CofnrmKey

MsgBox "Key Status (True = Valid, False - Invalid) : " & bSuccess

Data Type

String

Copyright 2015 - All Rights Reserved Hestor Ltd


Enabled
Properties > Enabled

Returns or sets whether the control is Enabled.

Syntax

[Visual Basic]

object.Enabled [= enabled]

The syntax of the Enabled property has these parts;

Part | Description
object | A PicturePng component.
enabled | A Boolean expression either being set as TRUE or FALSE

Data_Type

Boolean

Send your comments, suggestions or to ask questions about this component

Copyright 2018 - All Rights Reserved Hestor Ltd

Related Topics:
Enabled
© 2018 Hestor Ltd


FilePicture
Properties > FilePicture

Returns or sets the FilePicture of the PicturePng control.

Syntax

[Visual Basic]

object.FilePicture [= filepicture]

The syntax of the FlashingColor property has these parts;

Part | Description
object | A PicturePng component.
filepicture | absolute path name / file name of image

Remarks

You can manually set this property both at design time and more importantly at run time.

* You must however pass the full absolute path name / file name in order for the image

file to be loaded, you can load up PNG images using this property.

Example Coding (Visual Basic 6)

With PicturePng1

.FilePicture="C:\Users\Davids\Pictures\Sample.png")

End Withe

*So long as no errors occurred you will see your image displayed within the PicturePNG

control after you press the enter key or after setting the property in code (as above).

Even PNG images are displayed at design time.

Data_Type

String


Html Active
Properties > Html Active

Returns / sets the HtmlActive status of the PicturePNG control

Syntax

[Visual Basic]

object.HtmlActive [= Enabled ]

The syntax of the HtmlActive property has these parts;

Part | Description
object | A PicturePng component.
enabled | A Boolean expression either being set as TRUE or FALSE

Remarks

You can make your images interactive with websites, set the HtmlLink to the required URL

and then set the HtmlActive to True.

When a user clicks either the background or the image itself the webpage is opened.

Example Coding (Visual Basic 6)

With PicturePng1

.HtmlLink = "http://www.ocx.hestor.com"

.HtmlActive = True

.ToolTextTip = "Click here to visit our website."

End With

* When the user hover's over the image or background of the control the tool text tip will
read Click here to visit my website,

* When the user clicks the object their default web browsers will launch and the preset website

will be visited, in this case our http://www.ocx.hestor.com website.

Data_Type

Boolean


Html Link
Properties > Html Link

Returns or sets the Html Link property of the PicturePNG control

Syntax

[Visual Basic]

object.HtmlLink [= string ]

The syntax of the HtmlLink property has these parts;

Part | Description
object | A PicturePng component.
http link | The http website address that is to be opened once the user's default browser has been launched.

Remarks

You should always use the full http addressing format to ensure that the link / website you

want to show is always shown.

You must also set the HtmlActive property to TRUE is order to make the PicturePNG clickable !

Example Coding (Visual Basic 6)

With PicturePng1

.HtmlLink = "http://www.ocx.hestor.com"

.HtmlActive = True

.ToolTextTip = "Click here to visit our website."

End With

* When the user hover's over the object the tool text tip will read

Click here to visit our website,

* When the user clicks the object their default web browsers will launch and the preset

website will be visited, in this case our http://www.ocx.hestor.com website.

Data_Type

String


LastError
Properties > LastError

Returns the LastError value the object encountered

Syntax

[Visual Basic]

object.LastError[=lasterror ]

The syntax of the Interval property has these parts;

Part | Description
object | A PicturePng component.
lasterror | String containing the last error results

Remarks

When you call any function of method from the PicturePNG control, the object will
automatically record the last error encountered as a string value.

If no error occurred during the last function or method call then the wording is blank.

Example Coding (Visual Basic 6)

Dim IsOk As Long

IsOk = PicturePng1.OpenPicture

If IsOk <> 0 Then MsgBox "Error Code: " & IsOk & " - " & PicturePng1.LastError, vbCritical, "Error"

* The above method stores returned error value in IsOk

* By displaying the LastError property a true description is shown of the error encountered.

A full list of errors are showing at the end of the help guide.

Data Type

Long Integer


Licence
Properties > Licence

Returns / sets your Licence details, registered users.

Syntax

[Visual Basic]

object.Licence [= licence]

The syntax of the Company property has these parts;

Part | Description
object | A PicturePng component.
licence | A String expression that contains your licence information as from your registration details.

Remarks

The property licence is used as a way of setting your registration details into the system, this

can either be set within the Design Mode or in Run Time.

Example Coding (Visual Basic 6)

With PicturePng1

.Company = "Hestor Ltd"

.Licence = "122-837D-203-72F"

.User = "Davids"

End With

* To complete a registration process, you need to specify the three fields above;

* Company Name, Licence Number & User Name - all of these details are emailed to you upon

successful purchase of a valid licence subscription.

* You can confirm the licence has been successful by calling the Property CallKey, for example;

Dim bSuccess as Boolean

bSuccess = PicturePng1.CofnrmKey

MsgBox "Key Status (True = Valid, False - Invalid) : " & bSuccess

Data Type

String


Picture
Properties > Picture

Returns or sets the Picture of the PicturePNG control.

Syntax

[Visual Basic]

object.Picture[= picture ]

The syntax of the Enabled property has these parts;

Part | Description
object | A PicturePng component.
picture | This is the Microsoft Standard Picture control

Remarks

* At DESIGN time when you click this, you will be shown the usual Microsoft Standard

Picture control event allowing you to chose a picture - this WILL NOT accept

PNG images !

* At RUN time you can set the picture property as you would normally with the Standard

Microsoft Picture control.

Example Coding (Visual Basic 6)

With PicturePng1

.Picture=Picture1.Picture

End With

Data_Type

Std Picture


User
Properties > User

Returns / sets your User details, registered users.

Syntax

[Visual Basic]

object.User [= user ]

The syntax of the Company property has these parts;

Part | Description
object | A PicturePng component.
user | A String expression that contains your user information as from your registration details.

Remarks

The proeprty licence is used as a way of setting your registration details into the system, this can

either be set within the Design Mode or in Run Time.

Example Coding (Visual Basic 6)

With PicturePng1

.Company = "Hestor Ltd"

.Licence = "122-837D-203-72F"

.User = "Davids"

End With

* To complete a registration process, you need to specify the three fields above;

* Company Name, Licence Number & User Name - all of these details are emailed to you upon

successful purchase of a valid licence subscription.

* You can confirm the licence has been successful by calling the Property CallKey, for example;

Dim bSuccess as Boolean

bSuccess = PicturePng1.CofnrmKey

MsgBox "Key Status (True = Valid, False - Invalid) : " & bSuccess

Data Type

String

Copyright 2015 - All Rights Reserved Hestor Ltd


FAQ's

© 2018 Hestor Ltd


Does PicturePNG work with VB net
FAQ's > Does PicturePNG work with VB net

Does PicturePNG work with VB.net

We have test the control in as many programming languages as possible, likewise as many different versions of Windows as possible.

If however, you come across an instance where the control wont work with the programming language you are using then please do get in touch with us.

If you need any assistance or wish to ask any questions please email support@hestor.com


I can't stop the NAG Screen from showing
FAQ's > I can't stop the NAG Screen from showing

I can't stop the NAG Screen from showing

We have tested and tested over and over again to ensure that the NAG screen is only ever shown when the control is unlicensed.

As soon as you enter in your registration details the NAG screen will NOT be shown again.

If you are shaving issues with this, follow the example shown in the 'License Key Registration - How to register' listed under the PicturePNG Reference section.

If you need any assistance or wish to ask any questions please email support@hestor.com


I need something else can you help ?
FAQ's > I need something else can you help ?

I need something else can you help ?

We have developed many applications over the years, ranging from single programmes to entire automation network solutions for hospitals and the likes.

We have the ability to produce coding that will work with web interfaces, mobile devices, laptops. desktops.

We have produced software for biometric devices, swipe cards, NFC readers, VFD poles and a range of other hardware.

We also have our own DATA Centre capabilities, host our own webservers, dns servers, mail cleaners, etc.

So if you need any assistance or wish to ask any questions please email support@hestor.com


The HTML doesn't work
FAQ's > The HTML doesn't work

The HTML doesn't work

We have had reports of some Anti Virus software and possibly Anti Malware programmes blocked the launching of the user's default web browser.

We suggest that you ensure your application is added to their white list if they have a white list facility.

If you need any assistance or wish to ask any questions please email support@hestor.com


Enumerations

© 2018 Hestor Ltd


Alignments
Enumerations > Alignments

Description

This enumeration lists the Alignments (supported positions) that the PicturePng offers.

Members

The value of the PicPng_Alignments property must be one of the following constants;

Constants

Value

Description

Top_Left | 1 | Image is positioned Top Left
Top_Centre | 2 | Image is positioned Top Centre
Top_Right | 3 | Image is positioned Top Right
Middle_Left | 4 | Image is positioned Middle Left
Middle_Centre | 5 | Image is positioned Middle Centre
Middle_Right | 6 | Image is positioned Middle Right
Bottom_Left | 7 | Image is positioned Bottom Left
Bottom_Middle | 8 | Image is positioned Bottom Middle
Bottom_Right | 9 | Image is positioned Bottom Right

Data_Type

Integer


FileTypes
Enumerations > FileTypes

Description

This enumeration lists the FileTypes (supported image formats) that the PicturePng offers.

Members

The value of the PicPng_FileTypes property must be one of the following constants;

Constants

Value

Description

Png | 1 | Portable Network Graphics
Jpg | 2 | Joint Photographic Expert Group
Bmp | 3 | Windows Bitmap (24 bit)
Gif | 4 | Graphics Interchange Format
WMF | 5 | Windows Meta File
EMF | 6 | Windows Enhanced Meta File

Remarks

By default, the PicturePng control will automatically find the selected image type, however

if you try and save an image in a invalid format - PNG will be used by default.

Data_Type

Integer


Appearances
Enumerations > Appearances

Description

This enumeration lists the Appearances (supported image formats) that the PicturePng offers.

Members

The value of the PicPng_Appearances property must be one of the following constants;

Constants

Value

Description

Flat | 0 | Background panel is flat
3D | 1 | Background panel is shown in 3D

Remarks

The PicturePng.Appearance property adheres to the Microsoft standard picture control, which is

why the numbering starts at 0 and not 1.

This allows for you to replace the Picture control with the new PicturePng without causing issues
for the appearance and / or border style properties.

Data_Type

Integer


BorderStyles
Enumerations > BorderStyles

Description

This enumeration lists the BorderStyles (supported image formats) that the PicturePng offers.

Members

The value of the PicPng_BorderStyles property must be one of the following constants;

Constants

Value

Description

None | 0 | No border is shown
Fixed Single | 1 | A fixed single line is shown

Remarks

The PicturePng.BorderStyle property adheres to the Microsoft standard picture control, which is

why the numbering starts at 0 and not 1.

This allows for you to replace the Picture control with the new PicturePng without causing issues
for the appearance and / or border style properties.

Data_Type

Integer


Errors
previous
Enumerations > Errors

Description

This enumeration lists the Errors (supported positions) that the PicturePng offers.

Members

The value of the PicPng_Errors property must be one of the following constants;

Constants

Value

Description

None | 0 | No Error Encountered From Last Operation
CantOpenFile | 1 | Cant Open the File
CantReadFile | 2 | Cant Read Image File
UknownFormat | 3 | Unknown File Format
FileNameError | 4 | File Name Error
FolderNotFound | 5 | Folder Not Found
CantSaveFile | 6 | Cant Save the File
CantCopy2Clipboard | 7 | Unable to Either Get or Place Data to Clipboard
UserCancelled | 98 | Operation Cancelled by User
Other | 99 | Internal Error - Ask Support

Remarks

The number returned from calling a method or setting a property will always be 0

if no errors were encountered. If however an error was encountered then

one of the above code numbers will be returned.

It is however possible to get the wording description returned when an error is

encountered, refer to the example below.

Example Coding (Visual Basic 6)

Dim IsOk As Long

IsOk = PicturePng1.OpenPicture

If IsOk <> 0 Then MsgBox "Error Code: " & IsOk & " - " & PicturePng1.LastError, vbCritical, "Error"

* 0 - Everything was fine, anything else the error code is shown along with a descriptor (LastError).

Data_Type

Long