Ebook Lập trình web với visual basic

Một ứng dụng Internet là một ứng dụng tươngtác, một ứng dụng đã được dịch có

thể truy xuất qua Internet. Ưng dụng Internet có thể thi hành những công việc phức

tạp trên cả client hay trên server. Trong một ứng dụng Internet server – based, nó

dùng giao thức Internet HTTP để lấy lại nhữngyêu cầu từ một client, đặc biệt là một

Web browser, xử lý mã kết hợp với nó, và gửi trả dữ liệu về cho browser.

Trong lập trình Internet Visual Basic, ta có thể thêm nội dung động vào những

trang Web dễ dàng. Ưng dụng Internet Visual Basic liên kết mã Visual Basic đến một

hoặc nhiều trang HTML và quản lý sự kiện phát sinh trong những trang này bởi việc

tương tác với chương trình trên cả client hay trên server. Giao tiếp với người dùng

trong một ứng dụng Internet Visual Basic có thể là một chuỗi các trang HTML(Hyper

Text Markup Language), hay là một sự trộn lẫn của trang HTML và Visual Basic

form. Tuy nhiên, với loại giao diện nào thì ứng dụng cũng quản lý sự kiện, gọi những

phương thức, thiết lập và lấy lại những thuộc tính cơ bản trên những thành phần trong

trang HTML đó.

pdf232 trang | Chia sẻ: maiphuongdc | Lượt xem: 1716 | Lượt tải: 1download
Bạn đang xem trước 20 trang tài liệu Ebook Lập trình web với visual basic, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Boolean 'bien co khi lam viec voi muc Phone Book Static accessory As Boolean 'bien co trong menu Accessory Static network As Boolean 'bien co trong menu Network Static features As Boolean 'bien co trong menu CAll related features Static message1 As Boolean Static callnumberfixed As Boolean Static sending As Boolean 'bien co de biet co gui tin nhan di khong Static voice As Boolean 'co khi vao trong muc voice mail number Static service As Boolean 'co khi vao trong muc service centre Static expiry As Boolean 'co khi vao trong muc expiry period Static setting As Boolean 'co khi vao trong message setting va nhan cancle Static send As Boolean 'de nhan biet trong muc send message Static callnumber As Boolean Dim networks As netselect Static showlist As Boolean 'danh sach preferred network Static manualsearch As Boolean 'bien co trong muc Manual Search Mode Static addnetwork As Boolean 'bien co trong muc Add Network to List Dim cd As Integer Static timthay As Boolean 'tim duoc muc trong Fixed dial Dim chuoitam As String If tbnhap.Text = "Locked" Then tbnhap.Text = "Unlock Code" & vbCrLf danhso = True cancle = True Exit Sub End If If showtime = True Then tbnhap.Text = "Menu" showtime = False Trang 88 Exit Sub End If If tbnhap.Text = "Menu" Then If Index >= 0 And Index < 10 Then tbnhap.Text = "" danhso = True cancle = True End If End If 'khi nguoi su dung nhan so de lam cuoc goi If (danhso = True) Or Left(tbnhap.Text, 11) = "Unlock Code" Then Select Case Index Case 0 tbnhap.Text = tbnhap.Text & "0" Case 1 tbnhap.Text = tbnhap.Text & "1" Case 2 tbnhap.Text = tbnhap.Text & "2" Case 3 tbnhap.Text = tbnhap.Text & "3" Case 4 tbnhap.Text = tbnhap.Text & "4" Case 5 tbnhap.Text = tbnhap.Text & "5" Case 6 tbnhap.Text = tbnhap.Text & "6" Case 7 tbnhap.Text = tbnhap.Text & "7" Case 8 tbnhap.Text = tbnhap.Text & "8" Case 9 tbnhap.Text = tbnhap.Text & "9" End Select End If 'truong hop cho phep user dung ban phim de nhap ky tu If cancle = False Then Select Case Index Lập Trình Web Với Visual Basic Trang 89 '********** phim so 0 ***************** Case 0 'user dung phim so trong menu message If quickaccess = True Then Exit Sub End If If messagelist = True Then tbnhap.Text = "Invalid Msg Number" messagelist = False Exit Sub End If 'user dung phim so de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & "+" i = i + 1 Case 1 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "-" i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "0" i = i + 1 Case 3 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "=" i = i + 1 Case 4 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "*" i = i + 1 Case 5 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "/" 'i = 0 End Select '**************phim so 1***************** Case 1 Trang 90 'user dung phim so trong menu quick access If quickaccess = True Then luumuc = clickquickaccess(1) orderinquick = 1 Exit Sub End If 'user dung phim so trong menu message If messagelist = True Then Call clickmessage(1) Exit Sub End If 'user dung phim de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & " " i = i + 1 Case 1 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "." i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "1" i = i + 1 Case 3 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "?" i = i + 1 Case 4 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "!" i = i + 1 Case 5 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & ":" 'i = 0 End Select '**************phim so 2****************** Lập Trình Web Với Visual Basic Trang 91 Case 2 'user dung phim so trong menu quick access If quickaccess = True Then luumuc = clickquickaccess(2) orderinquick = 2 Exit Sub End If 'user dung phim so trong menu message If messagelist = True Then Call clickmessage(2) Exit Sub End If 'user dung phim so de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & "A" i = i + 1 Case 1 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "B" i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "C" i = i + 1 Case 3 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "2" 'i = 0 End Select '****************phim so 3*************** Case 3 'user dung phim so trong menu quick access If quickaccess = True Then luumuc = clickquickaccess(3) orderinquick = 3 Exit Sub End If Trang 92 'user dung phim so trong menu message If messagelist = True Then Call clickmessage(3) Exit Sub End If 'user dung phim so de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & "D" i = i + 1 Case 1 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "E" i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "F" i = i + 1 Case 3 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "3" 'i = 0 End Select '***************phim so 4**************** Case 4 'user dung phim so trong menu quick access If quickaccess = True Then luumuc = clickquickaccess(4) orderinquick = 4 Exit Sub End If 'user dung phim so trong menu message If messagelist = True Then Call clickmessage(4) Exit Sub End If Lập Trình Web Với Visual Basic Trang 93 'user dung phim so de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & "G" i = i + 1 Case 1 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "H" i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "I" i = i + 1 Case 3 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "4" 'i = 0 End Select '************** phim so 5 *************** Case 5 'user dung phim so trong menu quick access If quickaccess = True Then luumuc = clickquickaccess(5) 'menuaccess.thutu orderinquick = 5 Exit Sub End If 'user dung phim so trong menu message If messagelist = True Then Call clickmessage(5) Exit Sub End If 'user dung phim so de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & "J" i = i + 1 Case 1 n = Len(tbnhap.Text) Trang 94 tbnhap.Text = Left(tbnhap.Text, n - 1) & "K" i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "L" i = i + 1 Case 3 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "5" 'i = 0 End Select '*************** phim so 6 *************** Case 6 'user dung phim so trong menu quick access If quickaccess = True Then luumuc = clickquickaccess(6) 'menuaccess.thutu orderinquick = 6 Exit Sub End If 'user dung phim so trong menu message If messagelist = True Then Call clickmessage(6) Exit Sub End If 'user dung phim so de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & "M" i = i + 1 Case 1 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "N" i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "O" i = i + 1 Case 3 Lập Trình Web Với Visual Basic Trang 95 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "6" 'i = 0 End Select '**************** phim so 7 ************** Case 7 'user dung phim so trong menu quick access If quickaccess = True Then luumuc = clickquickaccess(7) orderinquick = 7 Exit Sub End If 'user dung phim so trong menu message If messagelist = True Then Call clickmessage(7) Exit Sub End If 'user dung phim so de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & "P" i = i + 1 Case 1 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "Q" i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "R" i = i + 1 Case 3 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "S" i = i + 1 Case 4 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "7" 'i = 0 Trang 96 End Select '*********** phim so 8 ******************* Case 8 'user dung phim so trong menu quick access If quickaccess = True Then luumuc = clickquickaccess(8) orderinquick = 8 Exit Sub End If 'user dung phim so trong menu message If messagelist = True Then Call clickmessage(8) Exit Sub End If 'user dung phim so de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & "T" i = i + 1 Case 1 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "U" i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "V" i = i + 1 Case 3 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "8" 'i = 0 End Select '************* phim so 9 ***************** Case 9 'user dung phim so trong menu quick access If quickaccess = True Then luumuc = clickquickaccess(9) Lập Trình Web Với Visual Basic Trang 97 orderinquick = 9 Exit Sub End If 'user dung phim so trong menu message If messagelist = True Then Call clickmessage(9) Exit Sub End If 'user dung phim so de nhap ky tu Select Case i Case 0 tbnhap.Text = tbnhap.Text & "W" i = i + 1 Case 1 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "X" i = i + 1 Case 2 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "Y" i = i + 1 Case 3 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "Z" i = i + 1 Case 4 n = Len(tbnhap.Text) tbnhap.Text = Left(tbnhap.Text, n - 1) & "9" 'i = 0 End Select End Select End If '********** phim cancle ****************** Select Case Index Case 10 If volume.Visible = True Then Exit Sub End If Trang 98 If locked = True Or autolocked = True Then Exit Sub End If If callnumberfixed = True Then callnumberfixed = False End If If listdial = True Then listdial = False 'Exit Sub End If If callnumber = True Then tbnhap.Text = "Menu" callnumber = False 'Exit Sub End If If found = True Then 'And setup = False Then tbnhap.Text = "Phone Book" found = False flag = False menucon = False Exit Sub End If If phonebook = True Then tbnhap.Text = "Phone Book" phonebook = False send = False Exit Sub End If 'se thoat ra muc Phone Setup khi dang lam viec voi menu con cua no If setup = True Then tbnhap.Text = "Phone Setup" setup = False Exit Sub End If Lập Trình Web Với Visual Basic Trang 99 'neu dang nam trong menu quick access then If quickaccess = True Then tbnhap.Text = "Menu" quickaccess = False danhso = True Exit Sub End If If longpress = True Then tbnhap.Text = "Menu" longpress = False danhso = True Exit Sub End If If tbnhap.Text = "Overwritten?" Then tbnhap.Text = "Enter Location!" & vbCrLf Exit Sub End If If accessory = True Then tbnhap.Text = "Accessory Setup" accessory = False Exit Sub End If If network = True Then tbnhap.Text = "Network Selection" network = False showlist = False Exit Sub End If If features = True Then tbnhap.Text = "Call Related Features" features = False Exit Sub End If If message1 = True Then Trang 100 tbnhap.Text = "Messages" message1 = False messagelist = False Exit Sub End If If tbnhap.Text = "Phone Book" Or tbnhap.Text = "Messages" Or tbnhap.Text = "Phone Setup" Then tbnhap.Text = "Menu" Exit Sub End If If tbnhap.Text = "Call Related Features" Or tbnhap.Text = "Network Selection" Or tbnhap.Text = "Accessory Setup" Then tbnhap.Text = "Menu" Exit Sub End If If tbnhap.Text = "Are you sure?" Then tbnhap.Text = "Network Selection" network = False showlist = False Exit Sub End If If availablenetwork = True Or addnetwork = True Then tbnhap.Text = "Network Selection" availablenetwork = False addnetwork = False Exit Sub End If If editentrylist = True Or eraseentrylist = True Or addentrylist = True Then editentrylist = False addentrylist = False eraseentrylist = False Exit Sub End If If danhso = False And cancle = True Then tbnhap.Text = "Menu" Lập Trình Web Với Visual Basic Trang 101 danhso = True Exit Sub End If If danhso = True Or cancle = False Then If editor = True Then n = Len(tbnhap.Text) If n = 0 Then tbnhap.Text = "Messages" editor = False danhso = False cancle = True Exit Sub Else tbnhap.Text = Left(tbnhap.Text, n - 1) Exit Sub End If End If If setting = True Then n = Len(tbnhap.Text) If n = 0 Then tbnhap.Text = "Messages" danhso = False cancle = True setting = False Else tbnhap.Text = Left(tbnhap.Text, n - 1) End If Exit Sub End If k = InStr(tbnhap.Text, vbCr) n = Len(tbnhap.Text) If n = 0 Then tbnhap.Text = "Menu" Exit Sub End If If n = k + 1 Then 'Beep tbnhap.Text = "Phone Book" '"Personal Number" cancle = True Trang 102 danhso = False changecase = False 'Exit Sub Else If tbnhap.Text = "Menu" Then Beep Else tbnhap.Text = Left(tbnhap.Text, n - 1) Exit Sub End If End If End If '************ Phim menu-up *************** Case 11 If tbnhap.Text = "Network Selection" Then tbnhap.Text = "Phone Setup" Exit Sub End If If tbnhap.Text = "Phone Setup" Then tbnhap.Text = "Messages" Exit Sub End If If tbnhap.Text = "Messages" Then tbnhap.Text = "Call Related Features" Exit Sub End If If tbnhap.Text = "Call Related Features" Then tbnhap.Text = "Phone Book" Exit Sub End If If tbnhap.Text = "Phone Book" Then tbnhap.Text = "Accessory Setup" Exit Sub End If If tbnhap.Text = "Accessory Setup" Then Lập Trình Web Với Visual Basic Trang 103 tbnhap.Text = "Network Selection" Exit Sub End If 'menu con cua muc Phone Book If tbnhap.Text = "One-Touch Dial Setting" Then tbnhap.Text = "Fixed Dialling" Exit Sub End If If Trim(tbnhap.Text) = "Fixed Dialling" Then tbnhap.Text = "Personal Number" Exit Sub End If If tbnhap.Text = "Personal Number" Then tbnhap.Text = "One-Touch Dial Setting" Exit Sub End If 'vao menu con cua muc Personal Number If tbnhap.Text = "Prevent Access" Then tbnhap.Text = "Check Capacity" Exit Sub End If If tbnhap.Text = "Check Capacity" Then tbnhap.Text = "Add Entry" Exit Sub End If If tbnhap.Text = "Add Entry" Then tbnhap.Text = "Find Entry by Location" Exit Sub End If If tbnhap.Text = "Find Entry by Location" Then tbnhap.Text = "Find Entry by Name" Exit Sub End If Trang 104 If tbnhap.Text = "Find Entry by Name" Then tbnhap.Text = "Prevent Access" Exit Sub End If 'vao menu con cua muc Check Capacity If tbnhap.Text = "Check SIM Capacity" Then tbnhap.Text = "Check Phone Capacity" Exit Sub End If If tbnhap.Text = "Check Phone Capacity" Then tbnhap.Text = "Check SIM Capacity" Exit Sub End If 'vao menu con cua muc Find Entry If tbnhap.Text = "Erase Name and Number" Then tbnhap.Text = "Modify Name or Number" Exit Sub End If If tbnhap.Text = "Modify Name or Number" Then tbnhap.Text = "Call Number" Exit Sub End If If tbnhap.Text = "Call Number" Then tbnhap.Text = "Erase Name and Number" Exit Sub End If 'menu con cua muc Prevent Access If tbnhap.Text = "To Phone & SIM Memory" Then tbnhap.Text = "To Phone Memory" Exit Sub End If If tbnhap.Text = "To Phone Memory" Then tbnhap.Text = "To SIM Card Memory" Exit Sub Lập Trình Web Với Visual Basic Trang 105 End If If tbnhap.Text = "To SIM Card Memory" Then tbnhap.Text = "No Memory Restrictions" Exit Sub End If If tbnhap.Text = "No Memory Restrictions" Then tbnhap.Text = "To Phone & SIM Memory" Exit Sub End If 'menu con cua muc Add Entry If tbnhap.Text = "Add To SIM Card Memory" Then tbnhap.Text = "Add To Phone Memory" Exit Sub End If If tbnhap.Text = "Add To Phone Memory" Then tbnhap.Text = "Add To SIM Card Memory" Exit Sub End If 'xu ly cua muc Fixed Dialling If tbnhap.Text = "Setup Fixed Dialling" Then tbnhap.Text = "View Fixed Dial List" Exit Sub End If If tbnhap.Text = "View Fixed Dial List" Then tbnhap.Text = "Setup Fixed Dialling" Exit Sub End If 'xu ly cua muc Setup Fixed Dialling If tbnhap.Text = "Off." Then tbnhap.Text = "On." Exit Sub End If If tbnhap.Text = "Erase Entry" Then Trang 106 tbnhap.Text = " Add Entry" Exit Sub End If If tbnhap.Text = " Add Entry" Then tbnhap.Text = "Edit Entry" Exit Sub End If If tbnhap.Text = "Edit Entry" Then tbnhap.Text = "Off." Exit Sub End If If tbnhap.Text = "On." Then tbnhap.Text = "Erase Entry" Exit Sub End If 'phan xu ly khi vao menu con cua muc One-Touch Dial Setting If tbnhap.Text = " To SIM Memory" Then tbnhap.Text = " To Phone Memory" Exit Sub End If If tbnhap.Text = " To Phone Memory" Then tbnhap.Text = " To Fixed Dial List" Exit Sub End If If tbnhap.Text = " To Fixed Dial List" Then tbnhap.Text = " To SIM Memory" Exit Sub End If 'phan xu ly cua menu Call Related Features If tbnhap.Text = "Key Answer Only" Then tbnhap.Text = "Call Barring" Exit Sub End If Lập Trình Web Với Visual Basic Trang 107 If tbnhap.Text = "Call Barring" Then tbnhap.Text = "Call Waiting" Exit Sub End If If tbnhap.Text = "Call Waiting" Then tbnhap.Text = "Talk and Fax" Exit Sub End If If tbnhap.Text = "Talk and Fax" Then tbnhap.Text = "Call Diverting" Exit Sub End If If tbnhap.Text = "Call Diverting" Then tbnhap.Text = "Restrict My Phone Number" Exit Sub End If If tbnhap.Text = "Restrict My Phone Number" Then tbnhap.Text = "Show Battery Meter" Exit Sub End If If tbnhap.Text = "Show Battery Meter" Then tbnhap.Text = "Key Answer Only" Exit Sub End If 'vao menu con cua muc Restrict My Phone Number If tbnhap.Text = "Show ID On Next Call" Then tbnhap.Text = "Restrict ID On Next Call" Exit Sub End If If tbnhap.Text = "Restrict ID On Next Call" Then tbnhap.Text = "Show ID On Next Call" Exit Sub End If Trang 108 'vao menu con cua muc Call Diverting If tbnhap.Text = "Divert Voice Calls" Then tbnhap.Text = "Cancel All Diverting" Exit Sub End If If tbnhap.Text = "Cancel All Diverting" Then tbnhap.Text = "Divert Data Calls" Exit Sub End If If tbnhap.Text = "Divert Data Calls" Then tbnhap.Text = "Divert Fax Calls" Exit Sub End If If tbnhap.Text = "Divert Fax Calls" Then tbnhap.Text = "Divert Voice Calls" Exit Sub End If 'vao menu con cua muc Divert Voice Calls If tbnhap.Text = "Divert When Unavailable" Then tbnhap.Text = "Detailed Diverting" Exit Sub End If If tbnhap.Text = "Detailed Diverting" Then tbnhap.Text = "Divert All Voice Calls" Exit Sub End If If tbnhap.Text = "Divert All Voice Calls" Then tbnhap.Text = "Divert When Unavailable" Exit Sub End If 'vao menu con cua muc Detailed Diverting If tbnhap.Text = "If No Answer" Then tbnhap.Text = "If Not Reachable" Exit Sub Lập Trình Web Với Visual Basic Trang 109 End If If tbnhap.Text = "If Not Reachable" Then tbnhap.Text = "If Busy" Exit Sub End If If tbnhap.Text = "If Busy" Then tbnhap.Text = "If No Answer" Exit Sub End If 'vao menu con cua muc Call Barring If tbnhap.Text = "Change Bar Password" Then tbnhap.Text = "Cancel All Barring" Exit Sub End If If tbnhap.Text = "Cancel All Barring" Then tbnhap.Text = "Bar Incoming Calls" Exit Sub End If If tbnhap.Text = "Bar Incoming Calls" Then tbnhap.Text = "Bar Outgoing Calls" Exit Sub End If If tbnhap.Text = "Bar Outgoing Calls" Then tbnhap.Text = "Change Bar Password" Exit Sub End If 'vao menu con cua muc Bar Outgoing Calls If tbnhap.Text = "Off?" Then tbnhap.Text = "All Calls" Exit Sub End If If tbnhap.Text = "All Calls" Then tbnhap.Text = "Int'l Calls Expect Home" Trang 110 Exit Sub End If If tbnhap.Text = "Int'l Calls Expect Home" Then tbnhap.Text = "Int'l Calls" Exit Sub End If If tbnhap.Text = "Int'l Calls" Then tbnhap.Text = "Off?" Exit Sub End If 'vao menu con cua muc Bar Incoming Call If tbnhap.Text = "Off? " Then tbnhap.Text = " All Calls" Exit Sub End If If tbnhap.Text = " All Calls" Then tbnhap.Text = "When Roaming" Exit Sub End If If tbnhap.Text = "When Roaming" Then tbnhap.Text = "Off? " Exit Sub End If 'phan xu ly cua menu Message If tbnhap.Text = "Outgoing Messages" Then tbnhap.Text = "Call Voicemail" Exit Sub End If If tbnhap.Text = "Message Editor" Then tbnhap.Text = "Outgoing Messages" Exit Sub End If If tbnhap.Text = "Cell Broadcast" Then Lập Trình Web Với Visual Basic Trang 111 tbnhap.Text = "Message Editor" Exit Sub End If If tbnhap.Text = "Message Settings" Then tbnhap.Text = "Cell Broadcast" Exit Sub End If If tbnhap.Text = "Call Voicemail" Then tbnhap.Text = "Message Settings" Exit Sub End If 'vao menu con cua muc Outgoing Message If tbnhap.Text = "Edit Message" Then tbnhap.Text = "Send Message" Exit Sub End If If tbnhap.Text = "Delete Message" Then tbnhap.Text = "Edit Message" Exit Sub End If If tbnhap.Text = "Go to Next Message" Then tbnhap.Text = "Delete Message" Exit Sub End If If tbnhap.Text = "Send Message" Then tbnhap.Text = "Go to Next Message" Exit Sub End If 'vao menu con cua muc Edit Message If tbnhap.Text = " Send Message" Then tbnhap.Text = "Store Message" Exit Sub End If Trang 112 If tbnhap.Text = "Store Message" Then tbnhap.Text = " Send Message" Exit Sub End If 'vao menu con cua muc Send Message If tbnhap.Text = " Find Entry by Location" Then tbnhap.Text = " Find Entry by Name" Exit Sub End If If tbnhap.Text = " Find Entry by Name" Then tbnhap.Text = " Enter Number" Exit Sub End If If tbnhap.Text = " Enter Number" Then tbnhap.Text = " Find Entry by Location" Exit Sub End If 'vao menu con cua muc Message Setting If tbnhap.Text = "Service Centre" Then tbnhap.Text = "Voicemail Number" Exit Sub End If If tbnhap.Text = "Expiry Period" Then tbnhap.Text = "Service Centre" Exit Sub End If If tbnhap.Text = "Outgoing Message Type" Then tbnhap.Text = "Expiry Period" Exit Sub End If If tbnhap.Text = "Voicemail Number" Then tbnhap.Text = "Outgoing Message Type" Exit Sub End If Lập Trình Web Với Visual Basic Trang 113 'vao menu con cua muc Outgoing Message Type If tbnhap.Text = "Fax" Then tbnhap.Text = "Text" Exit Sub End If If tbnhap.Text = "X400" Then tbnhap.Text = "Fax" Exit Sub End If If tbnhap.Text = "Paging" Then tbnhap.Text = "X400" Exit Sub End If If tbnhap.Text = "Email" Then tbnhap.Text = "Paging" Exit Sub End If If tbnhap.Text = "ERMES" Then tbnhap.Text = "Email" Exit Sub End If If tbnhap.Text = "Voice" Then tbnhap.Text = "ERMES" Exit Sub End If If tbnhap.Text = "Text" Then tbnhap.Text = "Voice" Exit Sub End If 'phan xu ly khi dung phim menu de di chuyen giua nhung tin nhan If messagelist = True Then Open filename4 For Random As #1 Len = Len(message) banghi = LOF(1) \ Len(message) Trang 114 If messagenumber = 1 Then Get #1, banghi, message tbnhap.Text = Trim(message.tin) messagenumber = banghi Else messagenumber = messagenumber - 1 Get #1, messagenumber, message tbnhap.Text = Trim(message.tin) End If Close #1 Exit Sub End If 'nhung muc con cua Phone Setup If tbnhap.Text = "Adjust Ring Volume" Then tbnhap.Text = "Select Phone Line" Exit Sub End If If tbnhap.Text = "Ring or Vibrate" Then tbnhap.Text = "Adjust Ring Volume" Exit Sub End If If tbnhap.Text = "Set Ringer To

Các file đính kèm theo tài liệu này:

  • pdfLaptrinhWebbangvisualbasic.pdf
Tài liệu liên quan