Dec 052017
 
Graphic Viewer is a graphic file viewer for the Windows 3.0 environment.
File GRAF20.ZIP from The Programmer’s Corner in
Category Windows 3.X Files
Graphic Viewer is a graphic file viewer for the Windows 3.0 environment.
File Name File Size Zip Size Zip Type
CSGRAFIC.VBX 28335 8987 deflated
GRAPHIC.WRI 16256 4282 deflated
GRAPHICV.EXE 54418 27512 deflated
GRPHVIEW.WRI 6144 2439 deflated

Download File GRAF20.ZIP Here

Contents of the GRAPHIC.WRI file


1z"G{{|}~








Graphic


A Color Graphic Custom Control
for Visual Basic 1.00


















Version 2.0
January 1992

This program and associated documentation is copyrighted by
Stephen Cramp
C/Systems
13584 Kennedy Rd. N.,
Inglewood, Ont
CANADA L0N 1K0



Overview

Microsoft Visual Basic provides for the inclusion of third-party custom controls. These controls can be used to expand the capabilities of Visual Basic (VB) or add entirely new functionality. The custom controls are incorporated into the VB Toolbox at design time and used in the same way as the standard VB controls.

The Graphic Custom Control (Graphic) provides the capability of displaying Windows 3.0 and OS/2 bitmap picture files (BMP's) and PCX picture files in monochrome, 16-color, 256-color or 24-bit color . The properties and events associated with Graphic are detailed in the Properties section.


Loading the Control

The Graphic custom control is distributed in two different file formats. The file RGRAPHIC.VBX is the run-time version of the control. This is the file that would be distributed with an application. The file DGRAPHIC.VBX is the design-mode version of the control.

Installing the Graphic custom control files involves copying these two files to directories on the hard disk. The following commands will copy the files.

COPY {disk:\path\}DGRAPHIC.VBX C:\WIN30\VB\GRAPHIC.VBX
COPY {disk:\path\}RGRAPHIC.VBX C:\WIN30\GRAPHIC.VBX

These commands are examples and should be altered to reflect the directories where your main Windows 3.0 files are ( the value shown as WIN30 ) and the location of VB.EXE ( the value shown as VB ). Although both the run-time and design mode versions of the control have the same filename, you can still determine which is which. Use the DOS command TYPE to list the GRAPHIC.VBX file to the display. Within the first screen of information will be seen the file header. It will show "RunTime" for the run-time version and "Design" for the design-mode version of the file.

Before Graphic can be used in a VB program, it must be loaded into the Toolbox. To load the Graphic custom control, perform the following steps.

1.Run VB development environment
2.Select 'Add File' (Ctlr-F12)
3.Use the file dialog box to open the VB directory and select the file GRAPHIC.VBX
4.The icon of three colored squares will appear on the Toolbox.


Using Graphic

The control acts similar to the standard 16-color Picture control. A control is placed on the form by selecting the icon and then dragging to select the size of the window. The control can be stretched to the size required and moved about the form in the same way as the standard controls.

To load a BMP file into the control, set the "Filename'' property to a valid BMP file specifier. Include the file path if necessary. The picture will display in the control. It will be clipped if it is larger than the defined size of the control on the form. When saving VB project and form files, the Filename property value is not saved. If a picture image is required when the form is loaded, the Filename property has to be set in the Form_Load subroutine.

Within an application you can load a picture by simply setting the property to a valid BMP filename (e.g. Graphic1.Filename = "C:\PICTURES\MYDOG.BMP" ).

Error codes are returned by Graphic when the Filename property is set, therefore it is necessary that error handling be performed to handle these errors (see sample code). The error codes are detailed further in this document.


Properties

Graphic provides properties for the loading of the bitmap file as well as for returning information about the picture.

[ctlname].Filename = "[drive:path\filename.BMP]"

Setting this property with a string value will pass a bitmap file specifier to the Graphic custom control. The control determines the file type and displays it within the allocated window space. The value of this property is not saved with the VB application. Therefore if a picture is to be displayed at runtime, the property must be explicitly set in the Form_Load procedure and the picture file (.BMP or .PCX) must be available on the system that is running the application. Setting this value to a null string ("") will clear the picture from the display area.

[variable] = [ctlname].PicWidth

This property is read-only. When read, it will return the width of the loaded picture in pixels.

[variable] = [ctlname].PicHeight

This property is read-only. When read, it will return the height of the loaded picture in pixels.

[variable] = [ctlname].PicColorBits

This property is read-only. When read, it will return the number of color bits in the loaded picture. The value is the BitCount in the BMP or PCX file header, not the actual color bits used in the picture. It will return a value of either 1, 4, 8 or 24. This relates to monchrome, 16-color, 256-color and 16.7million-color picture respectively.

[ctlname].ScrollBars = [0/1/2/3]

This property is read or write. Setting the value to 0 will disable the display and use of scrollbars. Setting the value to 1 will enable the display and use of horizontal scrollbars only. Setting the value to 2 will enable the display and use of vertical scrollbars only. Setting the value to 3 will enable the display and use of horizontal and vertical scrollbars. If either or both scrollbars are enabled, they will only be displayed if the picture exceeds the size of the display area.


Error Codes

30000Unable to open file
30001File open error
30002Out of memory
30003General memory error
30004Error in file format
30005Error reading file
30006Error in palette


Cautions

Visual Basic does not pass Palette messages to controls. Therefore if another application is running in foreground that uses a logical palette, the colors on the back picture will be wrong. Similarily, if two Graphic controls are placed on one form, only one can have the correct palette loaded. This is not a factor when using a video controller supporting 32,768 colors or more.


Revision History

Version 2.0:Adds support for the display of 24-bit images when using a suitable display controller. Adds events for supporting the mouse and other functions. Adds scrollbar support. Adds support for PCX image files.

Version 1.1:Fixes problem with monochrome and 16-color bitmap files. Also provides support for OS/2 v1.1 and v1.2 bitmap files.

Support

C/Systems can be contacted via Compuserve at User ID 70471,137. Telephone support will be provided to registered users. Calls will be accepted between 7:30PM EST and 10:30PM EST at (416) 838-2896.

Order Form for Graphic Custom Control

Name:_______________________________

Company:_______________________________

Address:_______________________________
_______________________________
_______________________________

Phone:________________( not required )

Where did you find out about Graphic?_______________________________

Comments:________________________________________________
________________________________________________
________________________________________________
________________________________________________
________________________________________________

Shipping Information:

Disk Size:____3 1/2"____5 1/4"

QtyItemPriceTotal

____Software Registration for Graphic CC and [email protected] US$25.00 $_____
____Software Registration for Graphic CC and [email protected]$30.00 $_____
Add $1.00 each for 3 1/2" disks $_____
Shipping and Handling @(US / CDN)$3.00 $_____
Provincial Sales Tax @8% (Ont residents only) $_____
GST @7%(Cdn residents only) $_____
Total $_____
Remit in US or CDN Funds to:
Stephen CrampMake payment in Cheque or Money Order
C/Systemsonly please. DO NOT send cash.
13584 Kennedy Rd. N.,Please allow 3 to 4 weeks for delivery.
Inglewood, Ont,
CANADA L0N 1K0

I ______________________ (name) agree to that I may not redistribute the registered version of Graphic Custom Control (CC) in any way other than with my own application. I do not have the right to distribute the design-mode version of the CC in any way, shape or form. I am licensed for the use of the design-mode CC on one CPU only and cannot make copies except for backup purposes. I have the right to distribute the run-time version of the CC with my application on a royalty-free basis.

I agree with this statement __________________________ (signature)
not twtro#m8j
h%
ec`R^_[[email protected]
o2ljgebz"`_[+Y5V4444444gFp
jl4444444gFpp
jl44444444Fpp
jl44444444Fpp
jl44444T444Fpp
jlTc4n4444T444Fpp
jl44444444Fjl44444444Fjl44444444Fjl44444444Fjl!44444444F=p
jl!#484:444444Fjl:F4H4444444Fjl44U4W44444FjlW44U4W44444Fjl44U4W44444Fjl+44U4W44444Fjl+-4Q4x4W44444Fjlx4Q4x4W44444Fjl
4
4
4
4%
4'
444Fjl'
L4N4!
4#
4
4
444Fpp
jl4N4!
4#
4
4
444Fpp
jl4N4!
4#
4
4
444Fpp
jl4.404b4d4
444Fpp
jld4404b4d4
444Fpp
jl4404b4d4
444Fpp
jl4&404b4d4
444Fpp
jl&(4&404b4d4
444Fjl(J4&404b4d4
444Fpp
jlJL4404b4d4
444Fpp
jl4404b4d4
444Fjl4404b4d4
444Fpp
jl48404b4d4
444Fpp
jl8:48404b4d4
444Fjl:\48404b4d4
444Fpp
jl\^48404b4d4
444Fjl^N4P404b4d4
444FjlPR4_4a444444Fjl4'4)4+4547444Fjl7444+4547444Fpp
jl444+4547444Fpp
jl4444+4547444Fpp`p
jl4547444+4547444Fpp
[email protected]+4547444Fpp
[email protected]
44+4547444Fpp
jl
44464^4`4444Fjl444)4+4r4t44Fjl44L444444Fjl44444444Fjl*4r4444;4S44FjlSq444 4. 4B 4D 44FjlD 3"45"4z"4|"4. 4B 4D 44Fjlf=/:(;6l!=!4d4
444Fpp
jl&144Fpp
jlTms Rmn04b4d4
444Fpp
jl


 December 5, 2017  Add comments

Leave a Reply