Objective
Nowadays, smartphones are becoming more and more close to our life, more and more teachers and friends, students and friends will use smart phones, because they are fully functional, running on the mobile software Everything, QQ, online games, music film and television ...
For college friends, the vast number of teachers friends, can be in their own mobile phone has a dynamic timetable procedures, one can reasonably arrange free time, and then will not miss the time to study work, is a very good thing. This article, with Microsoft's mobile phone
Platform WindowsMobile2003, simple to implement the timetable program on the phone.
The program was tested on the WindowsMobile2003 dopod818 phone. When the program is running, the main interface is as shown
Program Download to http://nihg.org/blogview.asp?logID=403
Development platform and tools:
MS Windows XP components are based on the. NET Framework 1.1
BASIC4PPC 5.8 (available to http://www.basic4ppc.cn/download)
Idea and code:
Basic language is a lot of program beginners to start the language, the development of mobile phone programs, we can also use her, the use of no basic friends can also see. The main ideas of the program are as follows:
One, according to the date of the week, and then read the corresponding day schedule.
Day timetable for convenience and beauty, directly made BMP picture files, the following is a blank timetable and according to their own curriculum has completed the timetable, in order to facilitate the program call, directly to save the file as 1.bmp 2.bmp ... for the Monday Tuesday schedule, and so on.
Blank Table 1.bmp 2.bmp
The main interface of the program is as follows, visible, we in order to minimize the dynamic loading of the timetable volume, only the interface center part of the timetable as a BMP file, the entire background directly in the program.
The code to achieve the reading timetable is as follows:
我们在窗体上用一个 timer组件来实现
Sub Timer4_Tick ' 用来检测当前日期并且读取相应课表值得注意的是 else
' then 语句 换行很重 then 必须另起一行
If label32.Text ="Monday" Then
image3.LoadPicture("class1.bmp")
Else If label32.Text ="Tuesday" Then
image3.LoadPicture("class2.bmp")
Else If label32.Text ="Wednesday" Then
image3.LoadPicture("class3.bmp")
Else If label32.Text ="Thursday" Then
image3.LoadPicture("class4.bmp")
Else If label32.Text ="Friday" Then
image3.LoadPicture("class5.bmp")
Else
End If
End Sub
Where LABEL32 displays the current week value and gets the value from the Timer3 component below.