Robosize.Net Licensed Version available!!
Robosize.Net resize's columns width of DataGrid and ListView,and keep user changes.
Buy Now
Click here to download the evaluation of Robosize.Net
Robosize Ocx for VB5 and VB6 and Robosize.Net For Dot.Net adapts the size of forms and controls so they will appear the same for all screen resolution. Robosize can resizing size and font size, columns width of DBGrid, MsFlexGrid and vsFlexGrid.
How to use RoboSize OCX?
When you finish the design form, you simply put an instance of the control onto a form (it is invisible
at runtime). Robosize gets your screen sizes. If the user screens
have different sizes Robosize will resize the form. At runtime you
can get the resize factor :ResizeFactor = Robosize.Factor.
Depedency on screen settings:
During the process of application design, the size and placement of the form's fonts
and objects are defined. For practical purposes, we set the number of dots
on screen which will be taken up by each of these values. If all users worked
with the same screen settings, there would be no problem in the consistency
of the proportions as designated initially. In reality, different users work
with different settings. The screen setting is an expression of the number
of dots across the width and length of the screen. For example, if the screen
is set for 800x600 small fonts, then the width of the screen in Twips- the
unit in which the size of objects is measured- will be 12,000. If the font
size is then changed to "large" , the screen width will be only 9,600 Twips.
An object of width of 10,000 which has been placed at the 1,000 dot from
the left will be centered on the screen in the first example above; on the
screen with the large fonts, the right1,400 Twips will disappear from the
screen. This same problem obviously exists with height.
The solution is to create a sequence of form patterns against which the screen
setting will be checked each time the form is loaded, and which will change
the height, width, and placement of objects, as well as font size, to the
original settings of the form design as necessary.
Robosize accomplishes this task. When dragged into the form, it reads the screen settings
and assimilates the information. When a form is loaded (while running the
application) Robosize checks the user's screen settings. If the setting is
identical to the original design settings, Robosize remains in the background.
If the setting is different, Robosize will change all of the form size settings
and commands so that all objects will looks as they would have under the original
design settings, independent of the screen settings. Robosize will not react
to any changes made after the form has been loaded, and is invisible during
run-time.
Possible problems and suggested solutions for enhanced utilization of Robosize:
Fonts: The font default size in Visual Basic is 8 (smallest), and the
default font is usually Ms Sans Serif. This font cannot accept a size value
less than 8 so Label, for example, will change the font size but not the
font itself, and a situation may be created in which the text does not change
size because it is impossible to reduce Ms Sans Serif lower than a value
of 8 and the text, consequently, will not appear in its entirety. There are
two possible solutions to this problem:
1.Work with a font which is slightly larger than the minimum. The higher the designated setting is, the higher
the font size should be. When working with a setting of 800x600 and the Ms
Sans Serif font, a value of 12 should be used in order adapt to a screen
width of 9600 and also to a screen width of 7200.
2.Work with a font which can accept a size value below 8, e.g., Tahoma, Arial,
Times New Roman, etc. The best solution is a combination of the above solutions.
Using Arial 10 would work nicely , but such choices should be determined
by personal preference.
Pictures: If there are pictures in PictureBox, the object will be reduced but the picture
will not (this command will not shrink the picture). The solution is to only
use Image Control for displaying pictures, and set the attribute Stretch=True.
At times, size settings must be changed subsequent to form loading. For example,
if the column width is set in MSFlexGrid, the Factor attribute of Robosize
restores the proportions of the change.
The line MSFlexGrid1.ColWidth(1)=2000*Robosize1Factorb will adapt the width of
column 1 of MSFlexGrid1 to the user's screen settings.
Robosize.Zoom Property add zoom
abilities to your forms!
Copy and paste this code in your MDI form.
Private Sub Combo1_Click()
Static ErrorEv As Boolean
If ErrorEv Then
ErrorEv = False
Exit Sub
End If
On Error GoTo NotRobosize
ActiveForm.RoboSize1.Zoom = Val(Right(Combo1.Text, Len(Combo1.Text) - 1))
Exit Sub
NotRobosize:
MsgBox "Robosize Not installed in the Form " + ActiveForm.Name
ErrorEv = True
Combo1.ListIndex = 0
End Sub