for free use with GFA Basic 32
Objects gb32 example 3
Here is the code for 2 other GB32 Objects:
This is the objects pasteable to editor code listing:
Click here to begin downloading objects_g32.zip
listing 1: The Gfa basic Slider control. Place a slider control using the form editior first.
Name the control Slider1 and place on to a new form in the form editor or download the code.
'Slider Control
LoadForm frm1
AutoRedraw = True
frm1.Refresh
Global sli_val = 0 'slider percent chance value
@Slider1_default_properties
Do : Sleep : Until Me Is Nothing
Procedure Slider1_default_properties
'VB only 1 to 10 Range of ticks/tickmarks
'Slider1.Appearance = '0 or 1
'Slider1.AutoRedraw = 'True or False
'*Slider1.BackColor = &H8000000F 'Unsupported in vb code
'*Slider1.Caption = "Slider Caption" 'Unsupported in vb code
Slider1.BorderStyle = 1
'Slider1.BorderStyle=ccNone
Slider1.Enabled = True
'Note: tooltiptext at value
'Slider1.Text = "SLIDER"
'Slider1.GetNumTicks
'Slider1.Height=
'Slider1.Width=
'note change values with this
'ms control
'are only in the range 0 to 10
Slider1.LargeChange = 5
Slider1.SmallChange = 1
Slider1.Orientation = 0
Slider1.SelStart = 2
Slider1.SelLength = 0
Slider1.Min = 0 'range
Slider1.Max = 10
'Slider1.TickStyle=sldBoth
'Slider1.TickStyle=sldNoTicks
'Slider1.TickStyle=sldTopLeft
Slider1.TickFrequency = 1
Slider1.ToolTipText = 20
Slider1.Value = 2
'Slider1.Width=
'Slider1.Height=
'Slider1.Top=
End Proc
Sub Slider1_Change
sli_val = Str(Slider1.Value * 10)
lblSliVal.Caption = "Dynamic caption change here percent=" + Str(sli_val)
Slider1.ToolTipText = "Dynamic settings in range of percent scale " & Str(Slider1.Min * 10) & "-" & (Slider1.Max * 10)
EndSub
listing 2: The Gfa basic Progress Bar control. Place a progress control using the form editior first.
Name the control ProgressBar1 and place on to a new form in the form editor or download the code.
'Progressbar
LoadForm frm1
AutoRedraw = True
frm1.Refresh
Global ProgBarVal As Integer
@ProgressBar1_default_properties 'initialize object
'Progress Bar action now!
ProgressBar1.Visible = True
For ProgBarVal = 0 To 100
lblprogbrVal.Caption = "Dynamic caption change here percent=" + Str(ProgBarVal)
ProgressBar1.ToolTipText = "Dynamic settings in range of percent scale " & Str(ProgressBar1.Min) & "-" & ProgressBar1.Max
ProgressBar1.Value = ProgBarVal
Pause 1
Next ProgBarVal
Procedure ProgressBar1_default_properties()
ProgressBar1.BorderStyle = 1
'ProgressBar1.BorderStyle=ccNone
ProgressBar1.Enabled = True
'ProgressBar1.Align = vbAlignBottom 'for alignment in form
ProgressBar1.Enabled = True
ProgressBar1.Visible = True
ProgressBar1.Orientation = 0 'Orientation Horizontal
'ProgressBar1.Orientation = 0 'OrientationVertical
ProgressBar1.ToolTipText = "Progress bar"
'ProgressBar1.Index = 0
ProgressBar1.Min = 0
ProgressBar1.Max = 100
ProgressBar1.Value = 0
'ProgressBar1.Width=
'ProgressBar1.Height=
'ProgressBar1.Top=
End Proc