Control Reference
Complete reference for all 25 controls available in WebVB Studio. Each control includes properties, methods, events, and code examples.
Quick Navigation
Form & Window
Form
The main application window container. Every WebVB project starts with a Form.
Properties
| Property | Type | Description |
|---|---|---|
| Caption | String | The title displayed in the form's title bar |
| BackColor | Color | Background color of the form |
| Width | Integer | Width of the form in pixels |
| Height | Integer | Height of the form in pixels |
| StartUpPosition | Integer | Initial position (0=Manual, 1=CenterOwner, 2=CenterScreen) |
| WindowState | Integer | Window state (0=Normal, 1=Minimized, 2=Maximized) |
Events
Load Unload Resize Click DblClick KeyPress KeyDown KeyUp Example
Sub Form1_Load()
Me.Caption = "My Application"
Me.BackColor = "#ffffff"
End Sub Input Controls
CommandButton
A clickable button that triggers actions when pressed.
Properties
| Property | Type | Description |
|---|---|---|
| Caption | String | Text displayed on the button |
| Enabled | Boolean | Whether the button can be clicked |
| Visible | Boolean | Whether the button is visible |
| BackColor | Color | Background color |
| ForeColor | Color | Text color |
| FontSize | Integer | Font size in points |
Events
Click MouseEnter MouseLeave Example
Sub cmdSubmit_Click()
MsgBox "Button clicked!"
End Sub TextBox
Single or multi-line text input field.
Properties
| Property | Type | Description |
|---|---|---|
| Text | String | The text content |
| MultiLine | Boolean | Enable multi-line input |
| PasswordChar | String | Character to mask input (e.g., "*") |
| MaxLength | Integer | Maximum character limit |
| ReadOnly | Boolean | Prevent user editing |
| Placeholder | String | Placeholder text when empty |
Events
Change KeyPress KeyDown KeyUp GotFocus LostFocus Example
Sub txtName_Change()
lblPreview.Caption = "Hello, " & txtName.Text
End Sub Label
Displays static or dynamic text.
Properties
| Property | Type | Description |
|---|---|---|
| Caption | String | The displayed text |
| Alignment | Integer | Text alignment (0=Left, 1=Right, 2=Center) |
| WordWrap | Boolean | Enable text wrapping |
| ForeColor | Color | Text color |
| FontSize | Integer | Font size |
| FontBold | Boolean | Bold text |
Events
Click DblClick Example
lblStatus.Caption = "Ready"
lblStatus.ForeColor = "#00ff00" CheckBox
A toggle control for boolean values.
Properties
| Property | Type | Description |
|---|---|---|
| Caption | String | Label text |
| Value | Integer | 0=Unchecked, 1=Checked, 2=Grayed |
| Enabled | Boolean | Whether interactive |
Events
Click Change Example
Sub chkAgree_Click()
cmdSubmit.Enabled = (chkAgree.Value = 1)
End Sub OptionButton
Radio button for mutually exclusive options within a group.
Properties
| Property | Type | Description |
|---|---|---|
| Caption | String | Label text |
| Value | Boolean | Selected state |
| GroupName | String | Group identifier |
Events
Click Change Example
Sub optLarge_Click()
If optLarge.Value = True Then
lblSize.Caption = "Large selected"
End If
End Sub ComboBox
Dropdown list with optional text entry.
Properties
| Property | Type | Description |
|---|---|---|
| Text | String | Current text/selection |
| ListIndex | Integer | Selected item index (-1 if none) |
| ListCount | Integer | Number of items (read-only) |
| Style | Integer | 0=Dropdown Combo, 1=Simple, 2=Dropdown List |
Methods
AddItem(item) RemoveItem(index) Clear() Events
Click Change Example
Sub Form1_Load()
cboCountry.AddItem "USA"
cboCountry.AddItem "Canada"
cboCountry.AddItem "UK"
cboCountry.ListIndex = 0
End Sub ListBox
Scrollable list of selectable items.
Properties
| Property | Type | Description |
|---|---|---|
| ListIndex | Integer | Selected item index |
| ListCount | Integer | Total item count |
| MultiSelect | Integer | 0=None, 1=Simple, 2=Extended |
| Selected(index) | Boolean | Selection state of item |
Methods
AddItem(item) RemoveItem(index) Clear() List(index) Events
Click DblClick Change Example
Sub cmdAdd_Click()
lstItems.AddItem txtNew.Text
txtNew.Text = ""
End Sub Containers
Frame
Groups related controls together with an optional caption.
Properties
| Property | Type | Description |
|---|---|---|
| Caption | String | Group title |
| BorderStyle | Integer | 0=None, 1=Fixed Single |
Events
Click Example
' Place OptionButtons inside a Frame
' to create a radio button group TabContainer
Tabbed panel container for organizing content.
Properties
| Property | Type | Description |
|---|---|---|
| SelectedTab | Integer | Currently active tab index |
| TabCount | Integer | Number of tabs |
Methods
AddTab(title) RemoveTab(index) Events
TabChange Example
Sub TabContainer1_TabChange()
lblStatus.Caption = "Tab " & TabContainer1.SelectedTab
End Sub Data & Tables
Table
Display and edit tabular data.
Properties
| Property | Type | Description |
|---|---|---|
| Rows | Integer | Number of rows |
| Cols | Integer | Number of columns |
| RowSel | Integer | Selected row |
| ColSel | Integer | Selected column |
Methods
SetCell(row, col, value) GetCell(row, col) AddRow() DeleteRow(index) Clear() Events
Click DblClick CellChange Example
Sub Form1_Load()
Table1.Cols = 3
Table1.SetCell 0, 0, "Name"
Table1.SetCell 0, 1, "Age"
Table1.SetCell 0, 2, "City"
End Sub DataGrid
Advanced data grid with Pandas DataFrame support (Python).
Properties
| Property | Type | Description |
|---|---|---|
| DataFrame | Object | Pandas DataFrame (Python only) |
| DataSource | Object | Data binding source |
| AllowEdit | Boolean | Enable cell editing |
| AllowSort | Boolean | Enable column sorting |
Methods
Refresh() GetSelectedRow() ExportCSV(filename) Events
CellClick CellDblClick SelectionChange Example
# Python with Pandas
import pandas as pd
def Form_Load():
df = pd.read_csv("data.csv")
DataGrid1.DataFrame = df Chart
Data visualization with multiple chart types.
Properties
| Property | Type | Description |
|---|---|---|
| ChartType | String | line, bar, pie, scatter, area |
| Title | String | Chart title |
| XLabel | String | X-axis label |
| YLabel | String | Y-axis label |
Methods
Plot(x, y) AddSeries(name, data) Clear() Histogram(data, bins) Events
Click Example
# Python with Matplotlib
def btnPlot_Click():
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
Chart1.plot(x, y)
Chart1.title = "Sample Chart" Database
Data persistence with multiple backend modes.
Properties
| Property | Type | Description |
|---|---|---|
| ConnectionString | String | Connection string (memory:, sqlite:, rest:) |
| Mode | String | memory, sqlite, rest |
| RecordCount | Integer | Number of records |
Methods
Execute(sql) Open() Close() MoveNext() MovePrevious() AddNew() Update() Delete() Events
Complete Error Example
Sub Form1_Load()
Database1.ConnectionString = "sqlite:myapp.db"
Database1.Execute "CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT)"
End Sub Media & Graphics
Image
Display images from URLs or local files.
Properties
| Property | Type | Description |
|---|---|---|
| Picture | String | Image URL or path |
| Stretch | Boolean | Stretch to fit |
| SizeMode | String | contain, cover, fill, none |
Events
Click DblClick Load Error Example
Image1.Picture = "https://example.com/photo.jpg"
Image1.Stretch = True Canvas
HTML5 Canvas for graphics and game development.
Properties
| Property | Type | Description |
|---|---|---|
| Width | Integer | Canvas width |
| Height | Integer | Canvas height |
Methods
Clear() DrawRect(x, y, w, h, color) FillRect(x, y, w, h, color) DrawCircle(x, y, r, color) FillCircle(x, y, r, color) DrawLine(x1, y1, x2, y2, color) DrawText(text, x, y, color, size) DrawImage(img, x, y) SetPixel(x, y, color) GetPixel(x, y) Events
Click MouseMove MouseDown MouseUp KeyDown KeyUp Example
Sub Form1_Load()
Canvas1.Clear
Canvas1.FillRect 10, 10, 100, 50, "#ff0000"
Canvas1.DrawCircle 150, 75, 30, "#0000ff"
End Sub Shape
Draw basic geometric shapes.
Properties
| Property | Type | Description |
|---|---|---|
| Shape | Integer | 0=Rectangle, 1=Square, 2=Oval, 3=Circle, 4=Rounded Rectangle |
| FillColor | Color | Fill color |
| BorderColor | Color | Border color |
| BorderWidth | Integer | Border thickness |
Events
Click Example
Shape1.Shape = 3 ' Circle
Shape1.FillColor = "#ff6600"
Shape1.BorderColor = "#000000" Networking
WebBrowser
Embedded web browser control.
Properties
| Property | Type | Description |
|---|---|---|
| URL | String | Current URL |
| DocumentText | String | HTML content |
Methods
Navigate(url) GoBack() GoForward() Refresh() Stop() Events
DocumentComplete NavigateError BeforeNavigate Example
Sub cmdGo_Click()
WebBrowser1.Navigate txtURL.Text
End Sub Inet
HTTP client for API calls and web services.
Properties
| Property | Type | Description |
|---|---|---|
| URL | String | Request URL |
| Method | String | GET, POST, PUT, DELETE |
| RequestBody | String | Request body (JSON) |
| ResponseText | String | Response body |
| ResponseJSON | Object | Parsed JSON response |
| StatusCode | Integer | HTTP status code |
Methods
Execute() SetHeader(name, value) OpenWebSocket(url) SendWebSocket(data) CloseWebSocket() Events
Complete Error WebSocketMessage WebSocketOpen WebSocketClose Example
Sub btnFetch_Click()
Inet1.URL = "https://api.example.com/users"
Inet1.Method = "GET"
Inet1.Execute
End Sub
Sub Inet1_Complete()
DataGrid1.DataSource = Inet1.ResponseJSON
End Sub Utilities
Timer
Triggers events at specified intervals.
Properties
| Property | Type | Description |
|---|---|---|
| Interval | Integer | Interval in milliseconds |
| Enabled | Boolean | Whether timer is running |
Events
Timer Example
Sub Form1_Load()
Timer1.Interval = 1000 ' 1 second
Timer1.Enabled = True
End Sub
Sub Timer1_Timer()
lblClock.Caption = Time
End Sub Rolodex
Card-based contact/record browser.
Properties
| Property | Type | Description |
|---|---|---|
| RecordIndex | Integer | Current record index |
| RecordCount | Integer | Total records |
| Fields | Array | Field definitions |
Methods
AddRecord() DeleteRecord() MoveNext() MovePrevious() MoveFirst() MoveLast() Find(field, value) Events
RecordChange BeforeDelete Example
Sub Form1_Load()
Rolodex1.AddRecord
Rolodex1.SetField "Name", "John Doe"
Rolodex1.SetField "Phone", "555-1234"
End Sub UserControl
Create custom reusable controls.
Properties
| Property | Type | Description |
|---|---|---|
| (Custom) | Various | Define your own properties |
Methods
(Custom methods you define) Events
(Custom events you define) Example
' Create a LoginBox UserControl with
' properties: Username, Password
' methods: Clear(), Validate()
' events: LoginClicked, CancelClicked