﻿Version=6.90
NumberOfForms=2
Form1=Form2
Form2=Form1
FormWidth=238
FormHeight=268
IconFile=
NumberOfDesktopIncludes=1
DesktopInclude1=ControlsExDeviceDummy.dll
NumberOfDeviceIncludes=1
DeviceInclude1=ControlsExDevice.dll
NumberOfObjects=7
Object1=dtp:DateTimePicker
Object2=notifier:Notification
Object3=calendar:MonthCalendar
Object4=ipbox:InputBox
Object5=iconlist1:IconList
Object6=display:Display
Object7=sbar:StatusBar
NumberOfModules=0
Sub designer
addform(Form2,"Form2","",220,220,220)@
addbutton(form2,btnBack,80,220,75,23,"Back",212,208,200,0,0,0,True,True,9)@
addform(Form1,"Form1","",220,220,220)@
addbutton(form1,btnDegs270,180,195,60,23,"270",212,208,200,0,0,0,True,True,9)@
addbutton(form1,btnDegs180,120,195,60,23,"180",212,208,200,0,0,0,True,True,9)@
addbutton(form1,btnDegs90,60,195,60,23,"90",212,208,200,0,0,0,True,True,9)@
addbutton(form1,btnDegs0,0,195,60,23,"0",212,208,200,0,0,0,True,True,9)@
addbutton(form1,btnMonthCalendar,60,103,110,20,"MonthCalendar",212,208,200,0,0,0,True,True,9)@
addlabel(form1,Label2,5,220,230,25,"Label2",220,220,220,0,0,0,True,True,9,False)@
addlabel(form1,Label1,15,10,205,20,"",220,220,220,0,0,0,True,True,9,False)@
addbutton(form1,btnNotifierOff,135,65,75,23,"Notifier off",212,208,200,0,0,0,True,True,9)@
addbutton(form1,btnNotifierOn,20,65,75,23,"Notifier on",212,208,200,0,0,0,True,True,9)@
addtextbox(form1,TextBox1,20,135,195,22,"",255,255,255,0,0,0,True,True,False,9)@
addbutton(form1,btnInputBox,70,160,75,20,"InputBox",212,208,200,0,0,0,True,True,9)@
End Sub
@EndOfDesignText@
Sub Globals
	'Declare the global variables here.
	Dim Dates(7) As Double
End Sub

Sub App_Start
	Form1.Show
	Sbar.New1("Form1")
	Sbar.Text = "Try the InputBox control"
	Sbar.Visible = True
	Display.New1
	Label1.Text = "ControlsExDevice Dll - version " & Format(Sbar.DLLversion,"F1")
	Label2.Text = "Screen height is " & Display.Height & " width is " & Display.Width
	dtp.New1("Form1", 45, 40, 145, 200)
	dtp.ShowUpDown = False '  alternate style of datetimepicker
	IpBox.New1
	notifier.New1
	IconList1.New1
	FileOpen(stream, AppPath & "\ico_news.ico", cRandom)
	IconList1.Add(stream)
	FileClose(stream)
	Calendar.New1("Form2",30,45)
	For i = 0 To ArrayLen(Dates()) - 1
		Dates(i) = Now + (i+1)*cTicksPerDay
	Next
	Calendar.BoldedDates = Dates()
	Calendar.MaxSelectionCount = 14
	
	Calendar.SelectionStart = Now
	'calendar.SelectionEnd = cTicksPerDay * 7
	
End Sub


Sub btnInputBox_Click
	Sbar.Visible = False
	TextBox1.Text = IpBox.Show("Multiline prompt" & CRLF & "Enter some data please", "InputBox title", "Default data", -1, -1)
	' set either x or y to -1 to automatically approximately centre the box on that axis
End Sub

Sub dtp_ValueChanged
	DateFormat = "dddd dd mmmm yyyy" ' for us Europeans!
	TextBox1.Text = Date(dtp.Value)
End Sub

Sub notifier_BalloonChanged
	Textbox1.Text = notifier.text
End Sub

Sub notifier_ResponseSubmitted
	Msgbox(notifier.Response)
End Sub


Sub btnNotifierOn_Click
	notifier.Icon = IconList1.Item(0)
	notifier.Caption = "Caption"
	notifier.Text = HtmStr & "You can <a href=" & Chr(34) & "clicked" & Chr(34) & ">click</a> here"
	notifier.InitialDuration = 3
	'notifier.Critical = true	' display a critical notification
	notifier.Visible = True
	Alert = True
End Sub

Sub btnNotifierOff_Click
	' remove the notification by user action
	Alert = False
	notifier.Visible = False
End Sub

Sub btnMonthCalendar_Click
	Form2.Show
End Sub

Sub btnBack_Click
	Form2.Close
End Sub

Sub btnDegs0_Click
	Display.Orientation = 0
	Msgbox(Display.Orientation & " Degrees")
End Sub

Sub btnDegs90_Click
	Display.Orientation = 90
	Msgbox(Display.Orientation & " Degrees")
End Sub
Sub btnDegs180_Click
	Display.Orientation = 180
	Msgbox(Display.Orientation & " Degrees")
End Sub
Sub btnDegs270_Click
	Display.Orientation = 270
	Msgbox(Display.Orientation & " Degrees")
End Sub

