Picture Control  Example
------------------
Update 2007_10_01
-Rightclick Menu added
-Setredraw (False/True) to prevent Flicker
-------------------------
Requirements
--------------------------
Windows NT4 and later
PB 9.03 ( convertable to PB 8 / PB 7 /PB 6.5  using Export/Import
Most Datawindows are Release 6, so no source edit is necessary

The Example has been tested to convert to  PB11 without any problem 	

------------------------------------
Purpose
------------------------------------
- load picture from string (blob) into picture control
- zoom and scroll picture
- print picture using a datawindow
-----------------------------------------
New in this version
-----------------------------------
Additional Resize Option   Size Picture to A4 Format
Rememer last Resize Option 
Open Picture in a Standard Picure Window  w_img_sh using parameter

(Tooltips for Buttons more than one line)


-------------------------------------------
General
-------------------------------------------
Most of the objetcts are necessary, because they are
referenced by basic classes that I use.

The main window in focus is    w_picturecontrol

with the main Object in focus       u_picturescroll on it

u_picturescroll is a userobject with a picture
and two scrollbars on it.


You can load PictureFiles in a picture object
zoom scroll and print

With the example application there are a lot of 
objects in the library.

The main reason is, that i use a lot of inherited controls
in which other are referenced.

If you want to use the control in your application
you can use 

userobject  instead of   u_userobject  
picture     instead of   u_picture

and it will work nearly the same.

A special case is the printing of the picture.
Here it is necessary to create a temporary picturefile and
assign the name to a picture within a datawindow.
Because the file should be deleted after printing, you should use
a response window for preview.
I have used   w_printcomposite_response ( a descendant of  w_printcomposite with windowtype Response!)
(Watch that the response window is resizable. I have got the code from Sybase code_exchange)

w_printcomposite has  a lot of functionality, that isn't necessary for printing the picture.

You will recognize, that there are some other features in the application.
- Tooltips (using Tag) for Picture and Commandbuttons using u_picturebutton, u_commandbutton, n_dotiming
  just place u_picturebutton on a window and it will work

- Resizeservice for Windows and Userobjects using n_wbusiness   n_ubusiness 
  n_wbusiness.of_resizeaddcontrol(dc_x, dc_y, dc_width, dc_heigt)

- Microhelp (using Tag) for all controls, telling them there Microhelpparent using
   n_fbusiness.of_controlstrigger(windowforcontrolcollect,w_MicrohelpParent,"ue_sethelpparent"
   then capture mousemove of the control and trigger w_MicrohelpParent

- Basic for a lot of reducing complexity, is to get a reference of the next parent window
  in the constructor of every control. So you can use iw_ControlParent within every control
  no matter if it is on a tabpage


--------------------------------------------------------------------------
There is a very good third party tool for browsing and analysing existing
PB Applications.
It is called PBBrowse and available at http://www.oowidgets.com/
Costs for a license is more than accetable (49.00 $)
I'm using this for years and it helps me a lot.  
-----------------------------------------------------------------------
Regards
Martin Bremer
E-Mail: m-bremer@wellcom.de (prefered)
or   martinbremer@compuserve.com  
 //EOF