WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

VisualBoxEditor

Keywords:   VisualBoxEditor  VBE25.zip

VisualBoxEditor, Copyright (c) 2002 Carlos LLuch
Version: 2.5

VisualBoxEditor is a winbatch script to visually design winbatch boxes. Apart from the standard box controls(boxbutton, boxtext..) You can also put window controls(listbox, combobox, progressbar, check, radio...) inside boxes.

FILES:
VisualBoxEditor.wbt(VBE)	Main file, box editor(standalone script).

vbefunctions.wbt		Additional functions to use as an include in the scripts produced by VBE.

editexample.wbt			Examples of how to use the controls,
listexample.wbt			(vbefunctions.wbt required).
comboexample.wbt
buttonexample.wbt
progressexample.wbt

Readme.txt			This file.

Supported controls are:
Edit		Windows edit control.
ListBox		Windows listbox control.
ComboBox	Windows combobox control.
Button		Windows button control(check,radio,3state).
Progress	Windows progress bar control.
BoxButton	Box button.
BoxText		Box text(one line only).
BoxBitmap	Standard box bitmap, represented by a rectangle in the editor.

In order to use the windows controls you will need some additional functions (vbefunctions.wbt).
An overview of each window control is recommended (controls & windows styles/messages), usage of each window control is explained with detail at: http://msdn.microsoft.com/
See examples.

REQUIREMENTS:
Winbatch 2002d or later.

USAGE:
Right click inside the editor to show the pop up menu:

Add control: 	Adds a new control.

Remove control:	Removes the control under the mouse.

Clone control:	Creates a new control with the same class, width, height and style of the control under the mouse.

Bitmap:		
	Exact size:	Resizes the rectangle that represents the bitmap to the real bitmap size.
	Zoom in:	Increases the size of the bitmap rectangle 1/4 of its size. 
	Zoom out:	Decreases the size of the bitmap rectangle 1/4 of its size. 
	Show name:	Shows the bitmap filename.

Box attributes:	Sets the attributes of the final box.
	Caption: 	Changes the box caption,the default caption is 'VisualBoxEditor'.
	Color:	Changes the box background color, default is white.
	Center box:	Centers the box on screen.
	Standard size:	Resizes the box to the standard 'BoxOpen' WIL function.
	System menu:	Shows or removes the system menu, default is shown.
	Minimize button:Enables or disables the minimize button, default is enabled.
	Close button:	Enables or disables the close button, default is disabled.

New:		Removes all existing controls, restores the default box attributes and asks for a new caption. Current VBE settings are untouched.

(*)Load

Save as:	Saves the box, if you save with .wbt extension and the file vbefunctions.wbt is in the same directory you can view the box inmediately. You need at least 1 button defined to save the box.

VBE Settings:
	Exclusive(@On):	Turns on or off the exclusive mode.
	Track control:	Displays the position of the control that you are moving in the VBE caption.

Exit:		Closes the script.

(*) Not supported in this version.

To move  a control, left click on it and move it holding the left mouse clicked.

To resize a control, using the mouse, like any standard window. Resize the editor in the same way. 
 
After choosing a control you are asked for some parameters:

Control id:	An integer that identifies the control.

Control handle:	This is the winbatch variable(string) that will store the control handle value (window control only).

Style:		Additional control style (window control only) you can combine values with a logical or '|'.

Text:		Control text if any.

The script checks if control handle variables are in use, but it does not check window controls id. 
You can have a window control id and a box button id with the same value, or two window controls with the same id.
Buttons id are set by the script.

What You See Is What You Get, this means that size of controls are what you are seeing in the editor, control size plus the sizing border.

The script produces a file with the extension you choose containing the box, if you use windows controls the file 'vbefunctions.wbt' must be used as an include. The boxes are unresizable and with the maximize button disabled.

REMARKS: 
The ComboBox control has always the CBS_NOINTEGRALHEIGHT(1024) style
due to a bug that appears when drawing the control.
DROPDOWN and DROPDOWNLIST combo boxes have a fixed height of 100 pixels 
you can change this in the final box, see ComboBox function.

If you don't specify a style in the control attributes dialogs, assumes
a 0 value, just to let you pass the dialog. This may not be a valid style, you should remove it from the generated script and set your own style.

Groupbox control is not supported by the editor, if you want to use it you have to manually draw it using the Button function.
Don't use the Button control for pushbuttons, use the BoxButton control instead.

IMPORTANT:
Boxes produced by VBE are unresizable and have a constant size in any resolution because windows controls are not resized when you resize the box. 

If you are going to use this boxes under different resolutions you should test how they look, especially under lower resolutions than the original. A box with a size bigger than a precedent resolution will not fit in that resolution and lowers. 
For example if you are under 800x600 and design a box bigger than 640x480 pixels that box will not fit in a 640x480 resolution or lower, but will fit in any resolution higher or equal to 800x600. 

The example boxes are designed under 800x600 and they are smaller than 640x480 pixels, so they should look the same in any resolution starting at 640x480.

A solution could be to desing a box under every resolution and let the script display the appropiate box according to the current resolution.

Another thing to have in mind is that when you move the cursor over a box somehow winbatch tracks the mouse movement and the process speed decreases, workarounds are:
exclusive(@on):	  reduces the effect
disable the box:  this gets rid of the problem, but you can't do anything while the box is disabled, see progress bar example.                     

----------------------------------------------------------------------

By:	Carlos LLuch
	05/2002

VisualBoxEditor, Copyright (c) 2002 Carlos LLuch a.k.a Guido

LICENSE:

  This program is provided 'as is', without warranty of any kind, 
  express or implied. The author shall not be liable for any damages 
  caused by the use of or inability to use this program. This means 
  that the user must assume the entire risk of using this program.

  Use of this program commercially without prior consent of the
  author is prohibited.

  This program may be freely distributed, but may not be sold.

  Modification of this program or any of it's documentation is
  prohibited. This program is freeware.

  Use of this program indicates you understand and agree to the 
  conditions of this license agreement.

LINKS:
	
http://msdn.microsoft.com/ to learn how to use the controls.

http://www.mvps.org/vb/    Download the file Win32Api.txt to have the api constants values.

VBE25.zip

Article ID:   W15693
File Created: 2017:08:29:11:58:56
Last Updated: 2017:08:29:11:58:56