File: w_main.srw
Size: 4308
Date: Sat, 09 Feb 2019 22:28:54 +0100
$PBExportHeader$w_main.srw
forward
global type w_main from window
end type
type cb_messagebeep from commandbutton within w_main
end type
type st_return2 from statictext within w_main
end type
type cb_1 from commandbutton within w_main
end type
type st_return1 from statictext within w_main
end type
type cb_messagebox from commandbutton within w_main
end type
type cb_cancel from commandbutton within w_main
end type
end forward

global type w_main from window
integer width = 1957
integer height = 724
boolean titlebar = true
string title = "MessageBox"
boolean controlmenu = true
windowtype windowtype = response!
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_messagebeep cb_messagebeep
st_return2 st_return2
cb_1 cb_1
st_return1 st_return1
cb_messagebox cb_messagebox
cb_cancel cb_cancel
end type
global w_main w_main

on w_main.create
this.cb_messagebeep=create cb_messagebeep
this.st_return2=create st_return2
this.cb_1=create cb_1
this.st_return1=create st_return1
this.cb_messagebox=create cb_messagebox
this.cb_cancel=create cb_cancel
this.Control[]={this.cb_messagebeep,&
this.st_return2,&
this.cb_1,&
this.st_return1,&
this.cb_messagebox,&
this.cb_cancel}
end on

on w_main.destroy
destroy(this.cb_messagebeep)
destroy(this.st_return2)
destroy(this.cb_1)
destroy(this.st_return1)
destroy(this.cb_messagebox)
destroy(this.cb_cancel)
end on

type cb_messagebeep from commandbutton within w_main
integer x = 73
integer y = 448
integer width = 443
integer height = 132
integer taborder = 30
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
string text = "MessageBeep"
end type

event clicked;n_msgbox ln_msgbox

ln_msgbox.of_MessageBeep(StopSign!)

end event

type st_return2 from statictext within w_main
integer x = 585
integer y = 288
integer width = 1285
integer height = 68
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
long textcolor = 33554432
long backcolor = 67108864
boolean focusrectangle = false
end type

type cb_1 from commandbutton within w_main
integer x = 73
integer y = 256
integer width = 443
integer height = 132
integer taborder = 20
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
string text = "MessageBox"
end type

event clicked;n_msgbox ln_msgbox
Integer li_rc

li_rc = ln_msgbox.of_MessageBoxTimeout("MessageBoxTimeout", &
                     "Message will timeout in 3 seconds!", &
                     Exclamation!, OK!, 3)

st_return2.text = "Return: " + String(li_rc)

end event

type st_return1 from statictext within w_main
integer x = 585
integer y = 96
integer width = 1285
integer height = 68
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
long textcolor = 33554432
long backcolor = 67108864
boolean focusrectangle = false
end type

type cb_messagebox from commandbutton within w_main
integer x = 73
integer y = 64
integer width = 443
integer height = 132
integer taborder = 10
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
string text = "MessageBox"
end type

event clicked;n_msgbox ln_msgbox
Integer li_rc

li_rc = ln_msgbox.of_MessageBox("MessageBox", &
                     "MessageBox using API function!", &
                     Exclamation!, OK!)

st_return1.text = "Return: " + String(li_rc)

end event

type cb_cancel from commandbutton within w_main
integer x = 1522
integer y = 472
integer width = 357
integer height = 108
integer taborder = 10
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
string text = "Cancel"
boolean cancel = true
end type

event clicked;Close(Parent)

end event