Creating your first project

The basics

With version 0.3.5, command rules are no longer irregular, learning these layouts makes it easy to use.

Creating a project

Keeping simplicity at the forefront is our goal, so writing a simple screen is simple.

window
FirstProject.BH
set $windowName (window):
"Title": "Hello World",
"Width": "335",
"Height": "150"
;

show $windowName;
Output

Creating GUI

If you don't have Bat.Bat in same folder or system environment variables can give error.

GetInfo.BH

//Made with BH

set $windowName (window):
"Title": "Clock",
"Width": "480",
"Height": "320",
"ResizeMode": "NoResize",
"Loaded": "Window_Loaded"
;

com new method -> $windowName as cs:
"name": "Window_Loaded",
"args": "sender, e",
"code": "
	Icon = new BitmapImage(new Uri(\"$srcpath\\\\clean.ico\"));
".
;

com new method -> $windowName as cs:
"name": "Btn_Clicked",
"args": "sender, e",
"code": "
	Detail.Content = Batch.Input(\"bat detail 17\").Stdout.ToString();
".
;

app new comp -> $windowName as (Button):
"inner": "Get Info For Gecho",
"Name": "Getbtn",
"VerticalAlignment": "Top",
"Click": "Btn_Clicked",
"Margin": "62,10,62,0".
;

app new comp -> $windowName as (Label):
"Name": "Detail",
"Margin": "0,30,0,0".
;

show $windowName;
Before Click
After Click

Last updated