File: w_main.srw
Size: 4308
Date: Mon, 31 Dec 2018 21:14:38 +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 = 1942
integer height = 989
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 = 59
integer y = 410
integer width = 329
integer height = 106
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 = 439
integer y = 256
integer width = 1115
integer height = 54
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 = 59
integer y = 230
integer width = 325
integer height = 106
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 = 439
integer y = 77
integer width = 1115
integer height = 54
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 = 59
integer y = 51
integer width = 325
integer height = 106
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 = 1521
integer y = 768
integer width = 355
integer height = 106
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