Visual Basic 2008 學習檔案

Size: px
Start display at page:

Download "Visual Basic 2008 學習檔案"

Transcription

1 Visual Basic 2008 學習檔案 指導老師 : 張銘棋 學 生 : 賴芊樺 - 1 -

2 { 目錄 } 第 4 章 _ 表單的程式設計 7 攝氏華氏溫度..7 設定邊框..8 設定方形..9 背景選擇 10 溫度轉換 11 切換國旗與背景圖案 12 第 5 章 _ 使用資料..14 顯示日期與時間 14 顯示編碼 14 簡易計算機 15 第 6 章 _ 流程控制 - 選擇性執行程式..18 金額折扣 18 猜數字 19 字型展示 21 數字比大小 22 餐廳點餐 23 第 7 章 _ 流程控制 - 重複執行同一段程式

3 數字沙漏圖型 25 蟑螂進行曲 26 電子時鐘 27 統計成績 28 數字金字塔 29 第 8 章 _ 陣列..30 成績資料 30 輸入資料 31 陣列元素排大小 32 查詢成績 33 計算綜合所得稅 34 字型設定 35 資料互換 36 字型設定 37 歌唱大賽成績排名 38 選項順序移動 40 餐廳排隊給號系統 41 第 9 章 _ 程序與函式..44 計算階層 44 計算速度公式

4 整數陣列加倍 45 亂數函式開獎 46 遞迴 47 河內塔公式 48 擲骰子 49 自由落體 50 第 10 章 _ 事件驅動程式設計 51 大寫字母 千分位 背景顏色 51 第 11 章 _ 繪圖與多媒體 53 直線 圓形繪圖..53 多種顏色 大小圓形.54 隨意調整圖片 55 製作圓形 56 音樂播放器 58 第 11-1 章 _ 繪圖與多媒體 60 製作多邊形 60 第 12 章 _ 視窗介面進階 62 功能表設計 62 功能表單位換算 65 第 13 章 _ 檔案存取

5 文字檔案編碼 68 編輯文字檔案 71 菜單點餐系統 73 成績編輯系統 76 第 13-1 章 _ 檔案存取...79 檔案總管 79 第 14 章 _ 設計資料庫程式.82 書籍資料庫 82 成衣資料庫 83 書籍資料庫 (2)...84 書籍資料庫 (3)...85 書籍資料庫 (4)...86 成衣資料庫 (2)...87 書籍資料庫 (5)...87 EXAM_ 兩數加減乘除 89 購買清單 90 EXAM_ 費率換算 92 計算薪資

6 EXAM_ 輾轉相除法 95 擲骰子比大小 96 EXAM_4.97 英文小寫 97 圓形 97 音樂播放器 98 EXAM_5 100 螢幕保護程式..100 簡易檔案總管..102 便利貼..105 EXAM_6.107 互質數 直角三角形 文數字 身份字號

7 第 4 章 _ 表單的程式設計 攝氏華氏溫度 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim c, f, r As Integer c = Val(InputBox(" 請輸入攝氏溫度 ", " 攝氏轉華氏 ")) f = c * 9 / r = MsgBox(" 攝氏 " & c & " 度 = 華氏 " & f & " 度 ", , " 轉換結果 ") 'MsgBox(r) If r = 1 Then MsgBox(" 哈 ") Else End - 7 -

8 設定邊框 Public Class Form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.BorderStyle = BorderStyle.Fixed3D Label1.Text = " 立體邊框 " Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Label1.BorderStyle = BorderStyle.FixedSingle Label1.Text = " 單線邊框 " Private Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click Label1.BorderStyle = BorderStyle.None Label1.Text = " 無邊框 " - 8 -

9 設定方形 Public Class Form3 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Location = New Point(Label1.Location.X - 30, Label1.Location.Y) Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Label1.Location = New Point(Label1.Location.X + 30, Label1.Location.Y) Private Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click Label1.Size = New Size(Label1.Size.Width + 10, Label1.Size.Height + 10) Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click Label1.Size = New Size(Label1.Size.Width - 10, Label1.Size.Height - 10) Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Label1.BackColor = Color.Pink Private Sub Button6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button6.Click Label1.BackColor = Color.Black Private Sub Button7_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button7.Click Label1.BackColor = Color.SkyBlue - 9 -

10 背景選擇 Public Class Form4 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.BackgroundImage = New Bitmap("D:\ch4\ 財源廣進.gif") Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Me.BackgroundImage = New Bitmap("D:\ch4\ 闔家平安.gif") Private Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click Me.BackgroundImage = New Bitmap("D:\ch4\ 考試順利.gif") Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click

11 溫度轉換 Public Class EX1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim temp% temp = Val(TextBox1.Text) * 9 / Label2.Text = " 攝氏 " & Val(TextBox1.Text) & " 度 = 華氏 " & temp & " 度 " Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim temp! temp = (Val(TextBox1.Text) - 32) * 5 / 9 Label2.Text = " 華氏 " & Val(TextBox1.Text) & " 度 = 攝氏 " & Math.Round(temp, 2) & " 度 "

12 切換國旗與背景圖案 Public Class EX2 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.BackgroundImage = New Bitmap("..\..\fbg1.gif") Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton4.Click Me.BackgroundImage = New Bitmap("..\..\fbg2.gif") Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton5.Click Me.BackgroundImage = New Bitmap("..\..\fbg3.gif") Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton6.Click PictureBox1.Image = New Bitmap("..\..\fusa2.gif") Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton7.Click PictureBox1.Image = New Bitmap("..\..\fcanada2.gif") Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

13 Button8.Click PictureBox1.Image = New Bitmap("..\..\ffrance2.gif") Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click PictureBox1.Image = New Bitmap("..\..\fjapan2.gif") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click PictureBox1.Size = New Size(PictureBox1.Size.Width + 6, PictureBox1.Size.Height + 6) PictureBox1.Location = New Point(PictureBox1.Location.X - 3, PictureBox1.Location.Y - 3) Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click PictureBox1.Size = New Size(PictureBox1.Size.Width - 6, PictureBox1.Size.Height - 6) PictureBox1.Location = New Point(PictureBox1.Location.X + 3, PictureBox1.Location.Y + 3)

14 第 5 章 _ 使用資料 顯示日期與時間 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = " 按鈕時間為 " & Now 顯示編碼

15 Public Class Form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a a = AscW(TextBox1.Text & ChrW(0)) Label1.Text = "Unicode : " & a & " ( 十六進位 : " & Hex(a) & ")" 簡易計算機 Public Class EX1 Dim a# Dim last_op$ Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click TextBox1.Text = TextBox1.Text & "0" Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

16 TextBox1.Text = TextBox1.Text & "1" Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = TextBox1.Text & "2" Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Text = TextBox1.Text & "3" Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click TextBox1.Text = TextBox1.Text & "4" Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click TextBox1.Text = TextBox1.Text & "5" Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click TextBox1.Text = TextBox1.Text & "6" Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click TextBox1.Text = TextBox1.Text & "7" Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click TextBox1.Text = TextBox1.Text & "8" Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click TextBox1.Text = TextBox1.Text & "9" Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click TextBox1.Text = TextBox1.Text & "." Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click a = Val(TextBox1.Text) TextBox1.Text = "" last_op = "devide" Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

17 Button15.Click a = Val(TextBox1.Text) TextBox1.Text = "" last_op = "multiply" Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click a = Val(TextBox1.Text) TextBox1.Text = "" last_op = "subtract" Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click a = Val(TextBox1.Text) TextBox1.Text = "" last_op = "add" Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click Select Case last_op Case "devide" TextBox1.Text = a / TextBox1.Text Case "multiply" TextBox1.Text = a * TextBox1.Text Case "subtract" TextBox1.Text = a - TextBox1.Text Case "add" TextBox1.Text = a + TextBox1.Text End Select last_op = "" a = Val(TextBox1.Text)

18 第 6 章 _ 流程控制 - 選擇性執行程式 金額折扣 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim buy As Integer, pay As Integer Dim msg As String buy = Val(TextBox1.Text) If buy > 1000 Then pay = buy * 0.8 If buy > 2000 Then msg = " 超過 2000 元, 先打 8 折再減 100 元 " pay = pay Else msg = " 超過 1000 元, 先打 8 折再減 50 元 " pay = pay - 50 Else If buy > 500 Then msg = " 金額超過 500 元打 9 折 " pay = buy * 0.9 Else

19 msg = " 金額未超過 500 元打 95 折 " pay = buy * 0.95 TextBox2.Text = pay Label3.Text = msg TextBox1.Focus() TextBox1.SelectAll() 猜數字 Public Class Form2 Dim min, max, ans, guess, conut As Byte Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load min = 1 max = 100 Label1.Text = " 請猜一個介於 " & min & " 到 " & max & " 之間的整數 " Randomize() ans = CInt(Rnd() * 100) + 1 MsgBox(ans)

20 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Or Val(TextBox1.Text) > 100 Then MsgBox(" 請輸入一個 1 到 100 的整數 ", , " 錯誤 ") Else guess = Val(TextBox1.Text) If guess = ans Then conut += 1 MsgBox(" 恭喜您猜對了, 共猜了 " & conut & " 次 ",, " 恭喜 ") End Else If guess < ans Then min = guess Label1.Text = " 請猜一個介於 " & min & " 到 " & max & " 之間的整數 " conut += 1 Label2.Text = " 您目前已經猜了 " & conut & " 次 " Else max = guess Label1.Text = " 請猜一個介於 " & min & " 到 " & max & " 之間的整數 " conut += 1 Label2.Text = " 您目前已經猜了 " & conut & " 次 " TextBox1.Focus() TextBox1.SelectAll()

21 字型展示 Public Class Form3 Dim fname As String, fsize As Integer, fstyle As FontStyle Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles Button1.Click, RadioButton1.Click, RadioButton2.Click, _ RadioButton3.Click, RadioButton4.Click, RadioButton5.Click, RadioButton6.Click, _ CheckBox1.Click, CheckBox2.Click, CheckBox3.Click, CheckBox4.Click fname = If(RadioButton1.Checked, " 新細明體 ", " 標楷體 ") If RadioButton3.Checked Then fsize = 9 ElseIf RadioButton4.Checked Then fsize = 10 ElseIf RadioButton5.Checked Then fsize = 11 ElseIf RadioButton6.Checked Then fsize = 12 If sender.equals(button1) Then CheckBox1.Checked = False CheckBox2.Checked = False CheckBox3.Checked = False CheckBox4.Checked = False

22 fstyle = FontStyle.Regular Else fstyle = If(CheckBox1.Checked, FontStyle.Bold, 0) Or _ If(CheckBox2.Checked, FontStyle.Italic, 0) Or _ If(CheckBox3.Checked, FontStyle.Strikeout, 0) Or _ If(CheckBox4.Checked, FontStyle.Underline, 0) If sender.equals(button1) Then fsize = 12 RadioButton6.Checked = True ElseIf sender.equals(button1) Then fname = RadioButton1.Font.Name RadioButton1.Checked = True Label1.Font = New Font(fName, fsize, fstyle) 數字比大小

23 Public Class EX1 Dim a, b, c As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click a = Val(TextBox1.Text) b = Val(TextBox2.Text) c = Val(TextBox3.Text) If a > b Then If a > c Then Label2.Text = a ElseIf b > a Then If b > c Then Label2.Text = b ElseIf c > a Then If c > b Then Label2.Text = c 餐廳點餐

24 Public Class EX2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b, c, d, total As Integer Dim state As String a = Val(TextBox1.Text) b = Val(TextBox2.Text) c = Val(TextBox3.Text) d = Val(TextBox4.Text) total = 30 * a + 70 * b + 65 * c + 99 * d state = "= 總價 " & total & " 元 " If CheckBox1.Checked Then total *= 0.9 state = state & "+ 會員 9 折 " If CheckBox2.Checked Then total *= 0.8 state = state & "+ 折扣券 8 折 " If RadioButton2.Checked Then If total < 300 Then total += 30 state = state & "+ 運費 30 元 " ' 優待後總價高於 300 才有免費外送, 運費不能打折才合理 TextBox5.Text = total Label10.Text = state Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" TextBox4.Text = "" TextBox5.Text = "" Label10.Text = "" CheckBox1.Checked = False CheckBox2.Checked = False

25 第 7 章 _ 流程控制 - 重複執行同一段程式 數字沙漏圖型 Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim i As Integer For i = 25 To 1 Step -4 Label1.Text = Label1.Text & vbcrlf & StrDup(i, CStr(i \ 4 + 1)) Next For i = 5 To 25 Step 4 Label1.Text = Label1.Text & vbcrlf & StrDup(i, CStr(i \ 4 + 1)) Next

26 蟑螂進行曲 Public Class Form2 Private Sub Play_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Play.Click Play.Visible = False roach.left = 0 - roach.size.width roach.visible = True Do roach.left = roach.left + 1 If roach.left Mod 10 = 0 Then roach.top = roach.top + CInt(Int(7 * Rnd())) - 3 System.Threading.Thread.Sleep(1) Application.DoEvents() Loop Until (roach.left > Me.ClientSize.Width) Play.Visible = True roach.visible = False Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Randomize()

27 電子時鐘 Public Class Form3 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.Text = Format(Now(), _ If(CheckBox1.Checked, "hh:mm:ss", "HH:mm:ss")) Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label1.Text = Format(Now(), "HH:mm:ss") Label2.Text = Format(Now(), "yyyy/mm/dd") Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged Timer1.Enabled = Not CheckBox2.Checked

28 統計成績 Public Class EX1 Dim n, pass, fail, total As Integer 這裡的變數叫做全域變數 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Val(TextBox1.Text) > 100 Or Val(TextBox1.Text) < -2 Then MsgBox(" 請輸入 0~100 之間的分數, 未輸入表示 0 分, 輸入 -1 表示結束 ") TextBox1.Text = "" Else If Val(TextBox1.Text) = -1 Then MsgBox(" 共 " & n & " 人," & pass & " 人及格," & fail & " 人不及格, 平均 " & Format(total/ n, "#.#") & " 分 ", , " 結果 ") End Else If Val(TextBox1.Text) < 60 Then fail += 1 Else pass += 1 total = total + Val(TextBox1.Text) n = n + 1 TextBox1.Text = "" Label3.Text = n + 1 TextBox1.Focus()

29 數字金字塔 Public Class EX2 Private Sub EX2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For i = 1 To 15 For j = 1 To i If j >= 10 Then Label1.Text = Label1.Text & j - 10 Else Label1.Text = Label1.Text & j Next For k = i - 1 To 1 Step -1 If k >= 10 Then Label1.Text = Label1.Text & k - 10 Else Label1.Text = Label1.Text & k Next Label1.Text = Label1.Text & vbcrlf Next

30 第 8 章 _ 陣列 成績資料 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim 總分 As Double Dim 成績陣列 () As String = Split(TextBox1.Text, ",") Dim 筆數 = UBound( 成績陣列 ) + 1 For Each s In 成績陣列 Next 總分 = 總分 + Val(s) MsgBox(" 成績筆數 :" & 筆數 & vbcrlf & _ " 總成績為 :" & 總分 & vbcrlf & _ " 平均成績 :" & Math.Round( 總分 / 筆數, 2)) 輸入資料

31 Module Form2 Sub Main() Dim 資料, 陣列 (0) As String Dim 筆數 As Integer = 0 ' 不斷讓使用者輸入資料並儲存, 直到輸入空字串為止 Do Console.Write(" 請輸入資料 :") 資料 = Console.ReadLine() If 資料 = "" Then Exit Do ReDim Preserve 陣列 ( 筆數 ) 陣列 ( 筆數 ) = 資料筆數 = 筆數 + 1 Loop Array.Sort( 陣列 ) For i = 0 To 筆數 Console.WriteLine( 陣列 (i)) Next Console.WriteLine(" 您一共輸入了 " & 筆數 & " 筆資料 ") Console.ReadLine() ' 相當於 Pause End Module 陣列元素排大小

32 Module Form3 Sub Main() Dim X(4), i As Integer For i = 0 To 4 Console.Write(" 請輸入數值資料 :") X(i) = Val(Console.ReadLine) Next Array.Sort(X) ' 將陣列元素從小排到大 For i = 0 To 4 Console.WriteLine("X(" & i & ") = " & X(i)) Next Console.ReadLine() End Module 查詢成績

33 Public Class Form4 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim 姓名 () = {" 陳桶一 ", " 黃光權 ", " 胡生妙 ", " 王為全 ", _ " 李日正 ", " 劉德菖 ", " 方正一 ", " 劉康寶 ", _ " 謝掬花 ", " 王美蘭 ", " 徐小噹 ", " 葉小毛 "} Dim 數學 () = {99, 58, 41, 100, 59, 28, 100, 0, 100, 41, 91, 0} Dim 國文 () = {76, 77, 14, 97, 66, 11, 98, 0, 74, 46, 99, 10} Dim 英文 () = {98, 75, 33, 87, 57, 33, 100, 10, 89, 49, 84, 0} ' 尋找輸入的名字, 若沒找到則傳回負數 Dim 索引 = Array.IndexOf( 姓名, TextBox1.Text) If 索引 < 0 Then Label5.Text = " 查無此人!" Label6.Text = "" Label7.Text = "" Else Label5.Text = 數學 ( 索引 ) Label6.Text = 國文 ( 索引 ) Label7.Text = 英文 ( 索引 ) Dim math100$, name$, i% i = Array.IndexOf( 數學, 100)

34 While i > 0 name = 姓名 (i) math100 = math100 + " " + name i = Array.IndexOf( 數學, 100, i + 1) End While MsgBox(math100,, " 數學 100") 計算綜合所得稅 Public Class Form5 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim 稅率 (,) As Integer = _ {{410000, 6, 0}, _ { , 13, 28700}, _ { , 21, }, _ { , 30, }, _ { , 40, }} Dim 所得淨額 As Integer = Val(TextBox1.Text) ' 將輸入字串轉為數值 Dim i As Integer ' 尋找適用的稅率, 找到即跳出迴圈

35 For i = 0 To UBound( 稅率, 1) - 1 If 所得淨額 <= 稅率 (i, 0) Then Exit For Next ' 依照 i ( 迴圈計數器 ) 的值來計算 應納稅額 Label3.Text = 所得淨額 & " * " & 稅率 (i, 1) & " % " & " - " & 稅率 (i, 2) & " = " & ( 所得淨額 * 稅率 (i, 1) * 稅率 (i, 2)) 字型設定 Public Class Form6 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If ListBox1.SelectedIndex = -1 Then ListBox1.SelectedIndex = Label1.Font.Name If ListBox2.SelectedIndex = -1 Then ListBox2.SelectedIndex = 0 If ListBox3.SelectedIndex = -1 Then ListBox3.SelectedIndex = "12" Dim 字型名稱 As String = ListBox1.SelectedItem Dim 字型樣式 As FontStyle Dim 字型大小 As Integer = Val(ListBox3.SelectedItem)

36 Select Case ListBox2.SelectedItem Case " 標準 " 字型樣式 = FontStyle.Regular Case " 粗體 " 字型樣式 = FontStyle.Bold Case " 斜體 " 字型樣式 = FontStyle.Italic Case " 粗斜體 " 字型樣式 = FontStyle.Bold Or FontStyle.Italic End Select Label1.Font = New Font( 字型名稱, 字型大小, 字型樣式 ) 資料互換 Public Class Form7 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i As Integer ' 逐一將 ListBox1 被選取的選項加到 ListBox2 中

37 For i = 0 To ListBox1.SelectedItems.Count - 1 ListBox2.Items.Add(ListBox1.SelectedItems(i)) Next ' 由後往前逐一刪除 ListBox1 被選取的選項 For i = ListBox1.SelectedIndices.Count - 1 To 0 Step -1 ListBox1.Items.RemoveAt(ListBox1.SelectedIndices(i)) Next Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim i As Integer ' 逐一將 ListBox1 被選取的選項加到 ListBox2 中 For i = 0 To ListBox2.SelectedItems.Count - 1 ListBox1.Items.Add(ListBox2.SelectedItems(i)) Next ' 由後往前逐一刪除 ListBox1 被選取的選項 For i = ListBox2.SelectedIndices.Count - 1 To 0 Step -1 ListBox2.Items.RemoveAt(ListBox2.SelectedIndices(i)) Next 字型設定

38 Public Class Form8 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If ComboBox1.Text = "" Then ComboBox1.Text = Label1.Font.Name() If ComboBox2.Text = "" Then ComboBox2.SelectedIndex = 0 If ComboBox3.Text = "" Then ComboBox3.Text = "12" Dim 字型名稱 As String = ComboBox1.Text Dim 字型樣式 As FontStyle Dim 字型大小 As Integer = Val(ComboBox3.Text) Select Case ComboBox2.Text Case " 標準 " 字型樣式 = FontStyle.Regular Case " 粗體 " 字型樣式 = FontStyle.Bold Case " 斜體 " 字型樣式 = FontStyle.Italic Case " 粗斜體 " 字型樣式 = FontStyle.Bold + FontStyle.Italic End Select Label1.Font = New Font( 字型名稱, 字型大小, 字型樣式 ) 歌唱大賽成績排名歌唱成績排行, 要先扣除最高分和最低分再求平均, 若有同分, 為方便程式寫作起見, 最高 分和最低分各扣除一筆即可

39 Public Class EX1 Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click Dim 姓名 () = {" 吳國民 ", " 李得勝 ", " 蔡可申 ", " 陳夢嬌 ", " 方十全 "} Dim 評分 (,) = {{77, 78, 78, 84, 84, 79, 77, 76, 76, 81}, _ {89, 89, 92, 88, 91, 87, 86, 90, 85, 89}, _ {89, 82, 87, 83, 82, 89, 86, 86, 84, 80}, _ {86, 86, 90, 89, 81, 86, 90, 85, 87, 86}, _ {89, 88, 87, 88, 86, 84, 86, 93, 84, 87}} Dim a As Integer = UBound( 姓名 ), c As Integer Dim 平均 (a), d, f As Double For i = 0 To a d = 評分 (i, 0) f = 評分 (i, 0) c = UBound( 評分, 2) For j = 0 To c If d > 評分 (i, j) Then d = 評分 (i, j) If f < 評分 (i, j) Then f = 評分 (i, j) 平均 (i) += 評分 (i, j) Next Next 平均 (i) = Math.Round(( 平均 (i) - d - f) / (c - 1), 2) Array.Sort( 平均, 姓名 ) Dim m As String = "" For i = a To 0 Step -1 m &= (a - i + 1) & ": " & 姓名 (i) & " " & 平均 (i) & vbcrlf Next MsgBox(m) End 選項順序移動

40 Public Class EX2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i% If ListBox1.SelectedIndex = 0 Then ' 已經移到最上面了 ( 第 0 筆 ) ListBox1.Items.Insert(ListBox1.Items.Count, ListBox1.Items(0)) ' 新增在最後一筆 ListBox1.Items.RemoveAt(0) ' 刪掉第一筆 Else ListBox1.SelectedIndex = ListBox1.Items.Count - 1 i = ListBox1.SelectedIndex If i = -1 Then MsgBox(" 尚未選取資料項目!",, " 注意 ") Else ListBox1.Items.Insert(i - 1, ListBox1.SelectedItem) ListBox1.Items.RemoveAt(ListBox1.SelectedIndex()) ListBox1.SelectedIndex = i - 1 Label1.Text = ListBox1.SelectedIndex Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

41 Dim i% If ListBox1.SelectedIndex = ListBox1.Items.Count - 1 Then ' 已經移到最下面了 ( 第 n-1 筆 ) ListBox1.Items.Insert(0, ListBox1.Items(ListBox1.Items.Count - 1)) ' 新增在最前面 ListBox1.Items.RemoveAt(ListBox1.Items.Count - 1) ' 刪掉最後一筆 ListBox1.SelectedIndex = 0 Else i = ListBox1.SelectedIndex If i = -1 Then MsgBox(" 尚未選取資料項目!",, " 注意 ") Else ListBox1.Items.Insert(i + 2, ListBox1.SelectedItem) ListBox1.Items.RemoveAt(ListBox1.SelectedIndex()) ListBox1.SelectedIndex = i + 1 Label1.Text = ListBox1.SelectedIndex Private Sub ListBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.Click Label1.Text = ListBox1.SelectedIndex 餐廳排隊給號系統 Public Class EX3 Dim count%

42 Private Sub EX3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TextBox1.Focus() Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' 加入項目, 直接加在末端即可 If TextBox1.Text = "" Then MsgBox(" 尚未輸入資料 ", , " 錯誤 ") Else count += 1 ListBox1.Items.Add(Format(count, "00#") & "-" & TextBox1.Text) Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ' 修改項目, 亦即插入一筆在指定位置之前, 再刪除該指定位置之資料 If ListBox1.SelectedIndex = -1 Then MsgBox(" 尚未選取清單方塊任何一個項目 ", , " 錯誤 ") Else ListBox1.Items.Insert(ListBox1.SelectedIndex(), Mid(ListBox1.SelectedItem, 1, 3) & "-" & TextBox1.Text) ListBox1.Items.RemoveAt(ListBox1.SelectedIndex()) Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim i As Integer ' 逐一將 ListBox1 被選取的選項加入於 ListBox2 For i = 0 To ListBox1.SelectedItems.Count - 1 ListBox2.Items.Add(ListBox1.SelectedItems(i)) Next ' 逐一刪除 ListBox1 被選取的選項 For i = ListBox1.SelectedIndices.Count - 1 To 0 Step -1 ListBox1.Items.RemoveAt(ListBox1.SelectedIndices(i)) Next

43 Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim i As Integer ' 逐一將 ListBox2 被選取的選項加入於 ListBox1 For i = 0 To ListBox2.SelectedItems.Count - 1 ListBox1.Items.Add(ListBox2.SelectedItems(i)) Next ' 逐一刪除 ListBox2 被選取的選項 For i = ListBox2.SelectedIndices.Count - 1 To 0 Step -1 ListBox2.Items.RemoveAt(ListBox2.SelectedIndices(i)) Next Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click ListBox2.Items.Clear()

44 第 9 章 _ 程序與函式 計算階層 Module Module1 Sub main() Dim i% Console.WriteLine(" 請輸入一個整數 ") i = Console.ReadLine() fact(i) Sub fact(byval n As Integer) Dim total As Double = 1 Dim i% For i = 2 To n total *= i Next Console.WriteLine(n & "! 的值為 " & total) End Module 計算速度公式

45 Module Module2 Sub main() finalv(10, 15, 3) Console.WriteLine(" ") finalv(10, 20) Console.WriteLine(" ") finalv(10) Sub finalv(byval seconds As Single, Optional ByVal V0 As Single = 0, Optional ByVal accelaration As Single= 9.8) Console.WriteLine(" 初速 " & V0 & ", 加速度 " & accelaration & ", 經 " & seconds & " 秒後,") ' 速度計算公式 V=V0+at Dim velocity = V0 + accelaration * seconds Console.WriteLine(" 速度為 " & velocity) End Module 整數陣列加倍

46 Module Module3 Sub Main() Dim a() As Integer = {1, 2, 3, 4} doublearrayvalue(a) For i = 0 To a.length - 1 Console.WriteLine(a(i)) Next Sub doublearrayvalue(byval b() As Integer) For i = 0 To b.length - 1 b(i) *= 2 Next End Module 亂數函式開獎

47 Public Class Form4 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Draw(4) As Integer Dim Lucky As Integer Randomize() For i = 0 To 4 While Draw(i) = 0 Lucky = CInt(Int(Rnd() * 39) + 1) If Array.IndexOf(Draw, Lucky) = -1 Then Draw(i) = Lucky End While Next Label1.Text = Draw(0) Label2.Text = Draw(1) Label3.Text = Draw(2) Label4.Text = Draw(3) Label5.Text = Draw(4) Button1.Text = " 再試一次 " 遞迴

48 Public Class Form5 Function fac(byval i As Integer) As Long If i <= 1 Then Return 1 Else Return (i - 1) End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a% a = Val(TextBox1.Text) Label2.Text = fac(a) 河內塔公式 Module Module6 Dim number As Integer Sub Main() Dim n As Integer = 0 number =

49 Console.Write(" 圓盤的張數 = ") n = Console.ReadLine() aa(n, "A", "B", "C") Console.ReadLine() Sub aa(byval n, ByVal a, ByVal b, ByVal c) If n > 0 Then aa(n - 1, a, c, b) number += 1 Console.WriteLine("{0} : {1} --> {2}", number, a, c) aa(n - 1, b, a, c) End Module 擲骰子 Public Class EX1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Randomize() ' 這很重要, 以時間來當作亂數種子, 否則每次亂數產生的數列都會一樣 Label1.Text = Int(Rnd() * 6)

50 Label2.Text = Int(Rnd() * 6) + 1 PictureBox1.Image = New Bitmap("..\..\" & Label1.Text & ".gif") PictureBox2.Image = New Bitmap("..\..\" & Label2.Text & ".gif") 自由落體 Public Class ex2 Function freefall(byval t) As Single Return 1 / 2 * 9.8 * t ^ 2 End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click Label3.Text = " 自由落體掉落距離 " & freefall(val(textbox1.text)) & " 米 "

51 第 10 章 _ 事件驅動程式設計 大寫字母 千分位 背景顏色 Public Class Form1 Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress Select Case e.keychar Case "a" To "z" TextBox1.AppendText(Chr(Asc(e.KeyChar) - 32)) e.handled = True End Select Private Sub Form1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter Me.BackColor = Color.White Private Sub Form1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave Me.BackColor = SystemColors.Control Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

52 Dim a$, c$, i% a = TextBox2.Text If Len(a) > 3 Then If Len(a) Mod 3 <> 0 Then c = Mid(a, 1, Len(a) Mod 3) For i = Len(a) Mod To Len(a) Step 3 c = c + "," + Mid(a, i, 3) Next Else TextBox2.Text = c

53 第 11 章 _ 繪圖與多媒體 直線 圓形繪圖 Public Class Form1 Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim g = e.graphics g.drawrectangle(pens.darkblue, 10, 10, 40, 60) Dim BigPen = New Pen(Color.Tan, 3) g.drawrectangle(bigpen, 60, 10, 40, 60) Dim BiggerPen = New Pen(Color.YellowGreen, 9) g.drawrectangle(biggerpen, 110, 10, 40, 60) g.fillellipse(brushes.yellow, 100, 100, 150, 100) g.drawline(bigpen, 0, 100, 100, 200) g.drawline(biggerpen, 100, 100, 0, 200) Dim p1 = New Point(200, 0) Dim p2 = New Point(160, 30) Dim p3 = New Point(170, 70) Dim p4 = New Point(230, 70) Dim p5 = New Point(240, 30) g.drawline(pens.darkblue, p1, p2)

54 g.drawline(pens.darkblue, p2, p3) g.drawline(pens.darkblue, p3, p4) g.drawline(pens.darkblue, p4, p5) g.drawline(pens.darkblue, p5, p1) 多種顏色 大小圓形 Public Class Form2 Private Sub Form2_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim width = Me.ClientSize.Width / 10 Dim height = Me.ClientSize.Height / 10 Dim MyBrushes() = {Brushes.Red, Brushes.Orange, Brushes.Yellow, Brushes.Green, Brushes.Blue, Brushes.Indigo, Brushes.Purple, Brushes.White} Randomize() For i = 0 To 9 For j = 0 To 9 Dim index = Fix(Rnd() * 8) Dim size = Fix(Rnd() * width) + 1 Dim rect = New Rectangle(i * width + index, j * height + index, size, size)

55 e.graphics.fillellipse(mybrushes(index), rect) Next Next Private Sub Form2_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged Me.Invalidate() 隨意調整圖片 Public Class Form3 Dim img As Image Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try img = Image.FromFile("..\..\sample.jpg") Catch ex As Exception MsgBox(ex.Message) End

56 End Try Private Sub Form3_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick If e.button = Windows.Forms.MouseButtons.Left Then img.rotateflip(rotatefliptype.rotate270flipnone) ElseIf e.button = Windows.Forms.MouseButtons.Right Then img.rotateflip(rotatefliptype.rotate90flipnone) Me.Invalidate() Private Sub Form3_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint e.graphics.drawimage(img, 0, 0, Me.ClientSize.Width, Me.ClientSize.Height) Private Sub Form3_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged Me.Invalidate() 製作圓形

57 Public Class EX1 Private Sub EX1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim g = e.graphics g.fillrectangle(brushes.white, 5, 5, 100, 100) g.drawrectangle(pens.black, 6, 6, 99, 99) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i As Integer i = Val(TextBox1.Text) Dim g = Me.CreateGraphics g.clear(me.backcolor) g.fillellipse(brushes.yellow, 110, 5, i, i) Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged Dim i As Integer i = Val(TextBox1.Text) Dim g = Me.CreateGraphics g.clear(me.backcolor) g.fillellipse(brushes.yellow, 110, 5, i, i) Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged Dim i As Integer i = Val(TextBox1.Text) Dim g = Me.CreateGraphics g.clear(me.backcolor) g.fillellipse(brushes.green, 110, 5, i, i) Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged Dim i As Integer i = Val(TextBox1.Text) Dim g = Me.CreateGraphics g.clear(me.backcolor) g.fillellipse(brushes.red, 110, 5, i, i) Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As

58 System.EventArgs) Handles RadioButton4.CheckedChanged Dim i As Integer i = Val(TextBox1.Text) Dim g = Me.CreateGraphics g.clear(me.backcolor) g.fillellipse(brushes.blue, 110, 5, i, i) 音樂播放器 Public Class EX2 Private Sub EX2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxWindowsMediaPlayer1.settings.autoStart = False AxWindowsMediaPlayer1.URL = "\CH11\music.wma"

59 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AxWindowsMediaPlayer1.Ctlcontrols.play() Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click AxWindowsMediaPlayer1.Ctlcontrols.pause() Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click AxWindowsMediaPlayer1.Ctlcontrols.stop() Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click AxWindowsMediaPlayer1.Ctlcontrols.fastReverse() Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click AxWindowsMediaPlayer1.Ctlcontrols.fastForward() Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then AxWindowsMediaPlayer1.URL = OpenFileDialog1.FileName Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click AxWindowsMediaPlayer1.fullScreen = True

60 第 11-1 章 _ 繪圖與多媒體 製作多邊形 Public Class Form1 Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged, ComboBox2.SelectedIndexChanged If ComboBox2.SelectedIndex = -1 Then MsgBox(" 請記得選擇大小 ",, "") Else Refresh() Dim g As Graphics = Me.CreateGraphics Dim size% = ComboBox2.SelectedItem Dim pointx(9), pointy(9) As Integer Dim i, j, x, y As Integer x = Me.ClientSize.Width / 2 y = Me.ClientSize.Height /

61 For i = 0 To ComboBox1.SelectedItem - 1 pointx(i) = x + size * Math.Sin((360 / ComboBox1.SelectedItem) * i * Math.PI / 180) pointy(i) = y + size * Math.Cos((360 / ComboBox1.SelectedItem) * i * Math.PI / 180) Next For i = 0 To ComboBox1.SelectedItem - 1 For j = 0 To ComboBox1.SelectedItem - 1 g.drawline(pens.black, pointx(i), pointy(i), pointx(j), pointy(j)) Next Next

62 第 12 章 _ 視窗介面進階 功能表設計 Public Class Form1 Dim x% Private Sub 放大 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 放大 ToolStripMenuItem.Click Me.Width *= 1.2 Me.Height *= 1.2 Private Sub 縮小 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 縮小 ToolStripMenuItem.Click Me.Width *= 0.8 Me.Height *= 0.8 Private Sub 還原 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 還原 ToolStripMenuItem.Click Me.Width = 300 Me.Height = 300 Private Sub ToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem3.Click

63 x = 200 Me.Invalidate() ToolStripMenuItem4.Checked = False ToolStripMenuItem5.Checked = False Private Sub ToolStripMenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem4.Click x = 300 Me.Invalidate() ToolStripMenuItem3.Checked = False ToolStripMenuItem5.Checked = False Private Sub ToolStripMenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem5.Click x = 400 Me.Invalidate() ToolStripMenuItem3.Checked = False ToolStripMenuItem4.Checked = False Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim g = e.graphics g.clear(me.backcolor) g.fillellipse(brushes.black, 10, 60, x, x) Private Sub RedToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RedToolStripMenuItem.Click Me.BackColor = Color.Red Private Sub GreenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GreenToolStripMenuItem.Click Me.BackColor = Color.Green Private Sub BlueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BlueToolStripMenuItem.Click Me.BackColor = Color.Blue Private Sub 一般 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 一般 ToolStripMenuItem.Click Label1.Font = New Font(Label1.Font, FontStyle.Regular)

64 Private Sub 粗體 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 粗體 ToolStripMenuItem.Click Label1.Font = New Font(Label1.Font, FontStyle.Bold) Private Sub 斜體 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 斜體 ToolStripMenuItem.Click Label1.Font = New Font(Label1.Font, FontStyle.Italic) Private Sub 粗斜體 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 粗斜體 ToolStripMenuItem.Click Label1.Font = New Font(Label1.Font, FontStyle.Bold Or FontStyle.Italic) Private Sub ToolStripMenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem7.Click Label1.Font = New Font(Label1.Font.Name, 14, Label1.Font.Style) Private Sub ToolStripMenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem8.Click Label1.Font = New Font(Label1.Font.Name, 18, Label1.Font.Style) Private Sub ToolStripMenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem9.Click Label1.Font = New Font(Label1.Font.Name, 22, Label1.Font.Style) Private Sub 標楷體 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 標楷體 ToolStripMenuItem.Click Label1.Font = New Font(" 標楷體 ", Label1.Font.Size, Label1.Font.Style) Private Sub 新細明體 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 新細明體 ToolStripMenuItem.Click Label1.Font = New Font(" 新細明體 ", Label1.Font.Size, Label1.Font.Style) Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click Label1.ForeColor = Color.Cyan Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click Label1.ForeColor = Color.Gray

65 Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click Label1.ForeColor = Color.DeepPink Private Sub ToolStripLabel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripLabel1.Click Shell("c:\windows\notepad.exe", AppWinStyle.NormalFocus) Private Sub ToolStripLabel2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripLabel2.Click Shell("c:\windows\system32\calc.exe",AppWinStyle.NormalFocus) 功能表單位換算 Public Class EX1 Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click Label1.ForeColor = Color.Orange Label2.ForeColor = Color.Orange

66 Label3.ForeColor = Color.Orange Label4.ForeColor = Color.Orange Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click Label1.ForeColor = Color.Gray Label2.ForeColor = Color.Gray Label3.ForeColor = Color.Gray Label4.ForeColor = Color.Gray Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click Label1.ForeColor = Color.Teal Label2.ForeColor = Color.Teal Label3.ForeColor = Color.Teal Label4.ForeColor = Color.Teal Private Sub OrangeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OrangeToolStripMenuItem.Click Label1.Font = New Font(Label1.Font.Name, 14, Label1.Font.Style) Label2.Font = New Font(Label1.Font.Name, 14, Label1.Font.Style) Label3.Font = New Font(Label1.Font.Name, 14, Label1.Font.Style) Label4.Font = New Font(Label1.Font.Name, 14, Label1.Font.Style) ToolStripStatusLabel1.Text = " 字型大小 :14pt" Private Sub GrayToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GrayToolStripMenuItem.Click Label1.Font = New Font(Label1.Font.Name, 18, Label1.Font.Style) Label2.Font = New Font(Label1.Font.Name, 18, Label1.Font.Style) Label3.Font = New Font(Label1.Font.Name, 18, Label1.Font.Style) Label4.Font = New Font(Label1.Font.Name, 18, Label1.Font.Style) ToolStripStatusLabel1.Text = " 字型大小 :18pt" Private Sub TealToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TealToolStripMenuItem.Click Label1.Font = New Font(Label1.Font.Name, 22, Label1.Font.Style) Label2.Font = New Font(Label1.Font.Name, 22, Label1.Font.Style) Label3.Font = New Font(Label1.Font.Name, 22, Label1.Font.Style) Label4.Font = New Font(Label1.Font.Name, 22, Label1.Font.Style) ToolStripStatusLabel1.Text = " 字型大小 :22pt"

67 Private Sub 公尺英尺 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 公尺英尺 ToolStripMenuItem.Click Dim a, b As String a = Val(TextBox1.Text) b = a * TextBox2.Text = b Private Sub 英尺公尺 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 公斤英鎊 ToolStripMenuItem.Click Dim a, b As String b = Val(TextBox2.Text) a = b / TextBox1.Text = a Private Sub 公斤英磅 ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 公斤英鎊 ToolStripMenuItem1.Click Dim a, b As String a = Val(TextBox3.Text) b = a * TextBox4.Text = b Private Sub 英磅公斤 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 英磅公斤 ToolStripMenuItem.Click Dim a, b As String b = Val(TextBox4.Text) a = b / TextBox3.Text = a

68 第 13 章 _ 檔案存取 文字檔案編碼 Public Class Form1 Dim filechanged As Boolean = False Private Sub 開啟舊檔 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 開啟舊檔 ToolStripMenuItem.Click If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then Try TextBox1.Text = My.Computer.FileSystem.ReadAllText(OpenFileDialog1.FileName) Me.Text = OpenFileDialog1.SafeFileName filechanged = False Catch ex As Exception

69 MsgBox(ex.Message) End Try Label2.Text = OpenFileDialog1.FileName Private Sub 儲存檔案 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 儲存檔案 ToolStripMenuItem.Click If BIG5ToolStripMenuItem.Checked Then My.Computer.FileSystem.WriteAllText(OpenFileDialog1.FileName, TextBox1.Text, False, System.Text.Encoding.GetEncoding(950)) Else My.Computer.FileSystem.WriteAllText(OpenFileDialog1.FileName, TextBox1.Text, False) Me.Text = SaveFileDialog1.FileName filechanged = False Private Sub 離開 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 離開 ToolStripMenuItem.Click End Private Sub 另存新檔 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 另存新檔 ToolStripMenuItem.Click If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then Try My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, TextBox1.Text, False) Catch ex As Exception MsgBox(ex.Message) End Try filechanged = False Me.Text = SaveFileDialog1.FileName Private Sub 關閉檔案 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 關閉檔案 ToolStripMenuItem.Click If (filechanged = False) Then filechanged = True Me.Text &= "*" Me.Text = " 未命名 "

70 TextBox1.Text = "" filechanged = False Label2.Text = "" Private Sub BIG5ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BIG5ToolStripMenuItem.Click UTF8ToolStripMenuItem.Checked = False UTF16ToolStripMenuItem.Checked = False Private Sub UTF8ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UTF8ToolStripMenuItem.Click BIG5ToolStripMenuItem.Checked = False UTF16ToolStripMenuItem.Checked = False Private Sub UTF16ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UTF16ToolStripMenuItem.Click BIG5ToolStripMenuItem.Checked = False UTF8ToolStripMenuItem.Checked = False Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If (filechanged = False) Then filechanged = True Me.Text &= "*" Private Sub savefile() If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then Try My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, TextBox1.Text, False) Catch ex As Exception MsgBox(ex.Message) End Try Private Sub asksave() If filechanged = True Then If MsgBox(" 是否要儲存檔案?", MsgBoxStyle.YesNo) = _ MsgBoxResult.Yes Then

71 savefile() 編輯文字檔案 Public Class Form2 Dim writer As System.IO.StreamWriter Sub logging(byval message As String) Writer.writeline(Now & ", " & message) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then

72 Dim Linenum As Integer = 1 Try Dim reader = My.Computer.FileSystem.OpenTextFileReader(OpenFileDialog1.FileName) While reader.endofstream = False Dim singleline = reader.readline() TextBox1.Text &= Linenum.ToString("D3") & " " & singleline & vbcrlf Linenum += 1 End While reader.close() Catch ex As Exception MsgBox(ex.Message) End Try Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then Try My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, TextBox1.Text, False) Logging(" 儲存檔案 :" & SaveFileDialog1.FileName) Catch ex As Exception MsgBox(ex.Message) End Try Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing If Not (writer Is Nothing) Then logging(" 程式啟動 ") writer.close() Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try writer = My.Computer.FileSystem.OpenTextFileWriter("d:\LogFile.log", True) logging(" 程式啟動 ")

73 Catch ex As Exception MsgBox(" 無法開啟記錄檔," & ex.message) Me.Close() End Try 菜單點餐系統 Public Class Form3 Dim menufilepath = "..\..\Menu.csv" Dim menuitems As New ArrayList() Dim orderdetail As New ArrayList() Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try Dim menureader = My.Computer.FileSystem.OpenTextFieldParser(menufilepath, ",") While Not menureader.endofdata Dim onerow() = menureader.readfields()

74 menuitems.add(onerow) ListBox1.Items.Add(onerow(0) & "-" & onerow(1) & " 元 ") End While menureader.close() Catch ex As Exception MsgBox(ex.Message) End Try Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Dim index = ListBox1.SelectedIndex If index >= 0 Then TextBox1.Text = menuitems(index)(0) TextBox2.Text = menuitems(index)(1) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click menuitems.removeat(listbox1.selectedindex) ListBox1.Items.RemoveAt(ListBox1.SelectedIndex) Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If TextBox2.Text <> "" And Val(TextBox2.Text) > 0 Then Dim newitem() = {TextBox1.Text, TextBox2.Text} menuitems.add(newitem) ListBox1.Items.Add(TextBox1.Text & " - " & TextBox2.Text & " 元 ") Else MsgBox(" 輸入錯誤!") Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim index = ListBox1.SelectedIndex If index > 0 Then menuitems(index)(0) = TextBox1.Text menuitems(index)(1) = TextBox2.Text ListBox1.Items(index) = menuitems(index)(0) & " - " & menuitems(index)(1) & " 元 "

75 Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Try Dim menuwriter = My.Computer.FileSystem.OpenTextFileWriter(menufilepath, False) For Each item In menuitems menuwriter.writeline(item(0) & "," & item(1)) Next menuwriter.close() MsgBox(" 儲存成功 ") Catch ex As Exception MsgBox(ex.Message) End Try Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Dim index = ListBox1.SelectedIndex If index >= 0 And Val(TextBox3.Text) > 0 Then Dim entry() = {menuitems(index)(0), TextBox3.Text, TextBox3.Text * menuitems(index)(1)} orderdetail.add(entry) ListBox2.Items.Add(menuitems(index)(0) & "," & TextBox3.Text & " 份, " & Val(TextBox3.Text) * menuitems(index)(1) & " 元 ") Else MsgBox(" 需選取菜色且數量大於 0") Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Dim index = ListBox2.SelectedIndex If index >= 0 Then ListBox2.Items.RemoveAt(index) orderdetail.removeat(index) Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If ListBox2.Items.Count > 0 Then Dim orderwriter = My.Computer.FileSystem.OpenTextFileWriter("..\..\orders.csv", True) Dim msg As String = " 你點了 :" & vbcrlf

76 Dim subtotal As Integer = 0 For i = 0 To orderdetail.count - 1 orderwriter.writeline(now & orderdetail(i)(0) & "," & orderdetail(i)(1) & "," & orderdetail(i)(2)) msg &= ListBox2.Items(i) & vbcrlf subtotal += orderdetail(i)(2) Next orderwriter.close() ListBox2.Items.Clear() orderdetail.clear() MsgBox(msg & vbcrlf & " 共 " & subtotal & " 元 ") Else MsgBox(" 你還沒點菜 ") 成績編輯系統

77 Public Class EX1 Dim menufilepath = "..\..\Score.csv" Dim menuitems As New ArrayList Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click menuitems.removeat(listbox1.selectedindex) ListBox1.Items.RemoveAt(ListBox1.SelectedIndex) Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If TextBox2.Text <> "" And Val(TextBox2.Text) > 0 Then Dim newitem() = {TextBox1.Text, TextBox2.Text, TextBox3.Text} menuitems.add(newitem) ListBox1.Items.Add(TextBox1.Text & " : 數學 " & TextBox2.Text & ", 英文 " & TextBox3.Text & " 分 ") Else MsgBox(" 輸入錯誤!") Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim index = ListBox1.SelectedIndex If index >= 0 Then menuitems(index)(0) = TextBox1.Text menuitems(index)(1) = TextBox2.Text menuitems(index)(2) = TextBox3.Text ListBox1.Items(index) = menuitems(index)(0) & " : 數學 " & menuitems(index)(1) & ", 英文 " & menuitems(index)(2) & " 分 " Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Try Dim menuwriter = My.Computer.FileSystem.OpenTextFileWriter(menufilepath, False) For Each item In menuitems menuwriter.writeline(item(0) & "," & item(1) & "," & item(2)) Next

78 menuwriter.close() Catch ex As Exception MsgBox(ex.Message) End Try Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Dim index = ListBox1.SelectedIndex If index >= 0 Then TextBox1.Text = menuitems(index)(0) TextBox2.Text = menuitems(index)(1) TextBox3.Text = menuitems(index)(2) Private Sub EX1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try Dim menureader = My.Computer.FileSystem.OpenTextFieldParser(menufilepath, ",") While Not menureader.endofdata Dim onerow() = menureader.readfields() menuitems.add(onerow) ListBox1.Items.Add(onerow(0) & " : 數學 " & onerow(1) & ", 英文 " & onerow(2) & " 分 ") End While menureader.close() Catch ex As Exception MsgBox(ex.Message) End Try

79 第 13-1 章 _ 檔案存取 檔案總管 Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TextBox1.Text = CurDir() TextBox1.SelectionStart = Len(TextBox1.Text) Function formatdir(byval strdir As String) If Microsoft.VisualBasic.Right(strDir, 1) <> "\" Then strdir &= "\" Return strdir End Function

80 Sub display() ChDir(TextBox1.Text) Dim stritem$ ListBox1.Items.Clear() ListBox2.Items.Clear() stritem = Dir("*.*", 18) Do Until stritem = "" If (GetAttr(strItem) And vbdirectory) = 16 Then ListBox1.Items.Add(strItem) Else ListBox2.Items.Add(strItem) stritem = Dir() Loop Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click display() Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ChDir("..") TextBox1.Text = CurDir() Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Text = formatdir(textbox1.text) Try MkDir(TextBox1.Text) Catch ex As Exception MsgBox(" 該目錄已經存在!", , "") End Try display() Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click TextBox1.Text = formatdir(textbox1.text) Dim curdir$ curdir = TextBox1.Text & ListBox1.SelectedItem Try

81 My.Computer.FileSystem.DeleteDirectory(curDIR, FileIO.DeleteDirectoryOption.DeleteAllContents) Catch ex As Exception MsgBox(" 該目錄已經不存在!", , "") End Try display() Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click TextBox1.Text = formatdir(textbox1.text) Dim curfile$ curfile = TextBox1.Text & ListBox2.SelectedItem Try My.Computer.FileSystem.DeleteFile(curfile) Catch ex As Exception MsgBox(" 該檔案已經不存在!", , "") End Try display()

82 第 14 章 _ 設計資料庫程式 書籍資料庫 Public Class Form1 Private Sub 書籍 BindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 書籍 BindingNavigatorSaveItem.Click Me.Validate() Me. 書籍 BindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me. 產品 DataSet) Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: 這行程式碼會將資料載入 ' 產品 DataSet. 書籍 ' 資料表 您可以視需要進行移動或移除 Me. 書籍 TableAdapter.Fill(Me. 產品 DataSet. 書籍 ) 成衣資料庫

83 Public Class Form2 Private Sub TshirtBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TshirtBindingNavigatorSaveItem.Click Me.Validate() Me.TshirtBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me. 成衣 DataSet) Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: 這行程式碼會將資料載入 ' 成衣 DataSet.Tshirt' 資料表 您可以視需要進行移動或移除 Me.TshirtTableAdapter.Fill(Me. 成衣 DataSet.Tshirt) 書籍資料庫 (2)

84 Public Class Form3 Private Sub 書籍 BindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 書籍 BindingNavigatorSaveItem.Click Me.Validate() Me. 書籍 BindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me. 產品 DataSet1) Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: 這行程式碼會將資料載入 ' 產品 DataSet1. 書籍 ' 資料表 您可以視需要進行移動或移除 Me. 書籍 TableAdapter.Fill(Me. 產品 DataSet1. 書籍 ) 書籍資料庫 (3)

85 Public Class Form4 Private Sub Form4_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing DataGridView1.EndEdit() 書籍 TableAdapter.Update( 產品 DataSet. 書籍 ) Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: 這行程式碼會將資料載入 ' 產品 DataSet. 書籍 ' 資料表 您可以視需要進行移動或移除 Me. 書籍 TableAdapter.Fill(Me. 產品 DataSet. 書籍 ) 書籍資料庫 (4)

86 Public Class Form5 Private Sub 書籍 BindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 書籍 BindingNavigatorSaveItem.Click Me.Validate() Me. 書籍 BindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me. 產品 DataSet1) Private Sub Form5_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing DataGridView1.EndEdit() 書籍 TableAdapter.Update( 產品 DataSet1. 書籍 ) Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load 'TODO: 這行程式碼會將資料載入 ' 產品 DataSet1. 書籍 ' 資料表 您可以視需要進行移動或移除 Me. 書籍 TableAdapter.Fill(Me. 產品 DataSet1. 書籍 ) 成衣資料庫 (2)

87 Public Class Form6 Private Sub TshirtBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TshirtBindingNavigatorSaveItem.Click Me.Validate() Me.TshirtBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me. 成衣 DataSet1) Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: 這行程式碼會將資料載入 ' 成衣 DataSet1.Tshirt' 資料表 您可以視需要進行移動或移除 Me.TshirtTableAdapter.Fill(Me. 成衣 DataSet1.Tshirt) 書籍資料庫 (5)

88 Public Class Form7 Private Sub 書籍 BindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 書籍 BindingNavigatorSaveItem.Click Me.Validate() Me. 書籍 BindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me. 產品 DataSet1) Private Sub Form7_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: 這行程式碼會將資料載入 ' 產品 DataSet1. 類別 ' 資料表 您可以視需要進行移動或移除 Me. 類別 TableAdapter.Fill(Me. 產品 DataSet1. 類別 ) 'TODO: 這行程式碼會將資料載入 ' 產品 DataSet1. 書籍 ' 資料表 您可以視需要進行移動或移除 Me. 書籍 TableAdapter.Fill(Me. 產品 DataSet1. 書籍 ) Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click OpenFileDialog1.Filter = " 圖檔 *.jpg;*.gif;*.jpeg;*.png;*.tif 所有檔案 *.*" If OpenFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then 圖片 PictureBox.Image = New Bitmap(OpenFileDialog1.FileName) Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click 圖片 PictureBox.Image = Nothing

89 EXAM_1 兩數加減乘除 Public Class Form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text) Label5.Text = "+" Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox3.Text = Val(TextBox1.Text) - Val(TextBox2.Text) Label5.Text = "-" Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox3.Text = Val(TextBox1.Text) * Val(TextBox2.Text) Label5.Text = " " Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text) Label5.Text = " "

90 購買清單 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 清除鍵 TextBox5.Text = "" TextBox5.Text = " 購買清單 " & Now() & vbcrlf & " 品名 " & vbtab & " 單價 " & vbtab & " 數量 " & vbtab & " 金額 " Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 輸入鍵 TextBox5.Text += vbcrlf & TextBox1.Text & vbtab & TextBox2.Text & vbtab & TextBox3.Text & vbtab & TextBox4.Text Private Sub Form1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated TextBox5.Text = " 購買清單 " & Now() & vbcrlf & " 品名 " & vbtab & " 單價 " & vbtab & " 數量 " & vbtab & " 金額 " Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged

91 Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged TextBox4.Text = Val(TextBox2.Text) * Val(TextBox3.Text) Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged TextBox4.Text = Val(TextBox2.Text) * Val(TextBox3.Text)

92 EXAM_2 費率換算 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b, i As Integer For i = 1 To b Next If TextBox1.Text = a Then b = (a \ 7) Label2.Text = i * 7 計算薪資

93 Public Class Form2 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim year%, salary% TextBox1.Focus() year = Val(TextBox1.Text) If year < 0 Then MsgBox(" 年資須大於零 ",, " 注意 ") Else If year >= 10 Then salary = Else If year >= 5 Then salary = Else salary = If RadioButton1.Checked Then salary += Else If RadioButton2.Checked Then salary +=

94 Else salary += 3000 If CheckBox1.Checked Then salary -= 1000 If CheckBox2.Checked Then salary -= 600 If year = 0 Then salary = 0 TextBox2.Text = salary

95 EXAM_3 輾轉相除法 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button1.Click Dim a, b As Integer a = Val(TextBox1.Text) b = Val(TextBox2.Text) TextBox3.Text = gcd(a, b) TextBox4.Text = a * b / gcd(a, b) Function gcd(byval a, ByVal b) As ULong ' 遞迴解法 If b = 0 Then Return a Else Return gcd(b, a Mod b) End Function

96 擲骰子比大小 Public Class Form2 If (a + b < 7 And RadioButton1.Checked = True) Or (a + b > 6 And RadioButton2.Checked = True) Then win += 1 MsgBox(" 你贏了, 共贏了 " & win & " 次, 輸了 " & lost & " 次 ", , "^_^") Else lost += 1 MsgBox(" 你輸了, 共贏了 " & win & " 次, 輸了 " & lost & " 次 ", , ">_<")

97 EXAM_4 英文小寫 Public Class Form1 Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress Select Case e.keychar Case "A" To "Z" TextBox1.AppendText(Chr((AscW(e.KeyChar) + 32))) e.handled = True ' 讓控制項不再出現大寫字母 End Select 圓形

98 Public Class Form2 Private Sub Form2_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs)Handles Me.Paint Dim k = e.graphics k.fillellipse(brushes.black, 0, 0, Me.ClientSize.Width, Me.ClientSize.Height) k.fillellipse(brushes.white, 2, 2, Me.ClientSize.Width - 4, Me.ClientSize.Height - 4) 'k.drawellipse(pens.black, f, g, h) Dim a = New Point(ClientSize.Width / 2, 0) Dim b = New Point(ClientSize.Width / 2, ClientSize.Height) Dim c = New Point(0, ClientSize.Height / 2) Dim d = New Point(ClientSize.Width, ClientSize.Height / 2) k.drawline(pens.black, a, b) k.drawline(pens.black, c, d) Private Sub Form2_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged Me.Invalidate() 音樂播放器

99 Public Class Form3 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Select Case ListBox1.SelectedIndex Case 0 AxWindowsMediaPlayer1.URL = "c:\exam4\1.mp3" AxWindowsMediaPlayer1.Ctlcontrols.play() Case 1 AxWindowsMediaPlayer1.URL = "c:\exam4\2.mp3" AxWindowsMediaPlayer1.Ctlcontrols.play() Case 2 AxWindowsMediaPlayer1.URL = "c:\exam4\3.mp3" AxWindowsMediaPlayer1.Ctlcontrols.play() Case Else MsgBox(" 未選取檔案!", , " 注意 ") End Select Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click AxWindowsMediaPlayer1.Ctlcontrols.stop() Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.Text = AxWindowsMediaPlayer1.Ctlcontrols.currentPositionString

100 EXAM_5 螢幕保護程式 Dim x%, y%, xd%, yd% Dim g As Graphics Dim brush As SolidBrush Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim font As Font = New Font(" 標楷體 ", 22) g = Me.CreateGraphics Randomize() Select Case Int(Rnd() * 10) Case 0 g.clear(color.lightskyblue) Case 1 g.clear(color.lightgreen) Case 2 g.clear(color.cyan) Case 3 g.clear(color.chocolate) Case 4 g.clear(color.plum) Case 5 g.clear(color.pink) Case 6 g.clear(color.aqua) Case 7 g.clear(color.darkorange)

101 Case 8 g.clear(color.azure) Case 9 g.clear(color.beige) End Select Select Case Int(Rnd() * 10) Case 0 brush = New SolidBrush(Color.LightSalmon) Case 1 brush = New SolidBrush(Color.Purple) Case 2 brush = New SolidBrush(Color.Red) Case 3 brush = New SolidBrush(Color.PeachPuff) Case 4 brush = New SolidBrush(Color.DarkGreen) Case 5 brush = New SolidBrush(Color.DarkBlue) Case 6 brush = New SolidBrush(Color.Brown) Case 7 brush = New SolidBrush(Color.Turquoise) Case 8 brush = New SolidBrush(Color.PaleVioletRed) Case 9 brush = New SolidBrush(Color.Teal) End Select g.drawstring(" 展現變化莫測的色彩 ", font, brush, x, y) If xd = 1 Then x -= 30 Else x += 30 If x > (Me.ClientSize.Width - 250) Then xd = 1 If x < 1 Then xd = 0 If yd = 1 Then

102 y -= 15 Else y += 15 If y > (Me.ClientSize.Height - 30) Then yd = 1 If y < 1 Then yd = 0 Private Sub Form1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick End 簡易檔案總管

103 Public Class Form2 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load TextBox1.Text = CurDir() ' 傳回當前路徑 TextBox1.SelectionStart = Len(TextBox1.Text) TextBox1.Focus() Function formatdir(byval strdir As String) If Microsoft.VisualBasic.Right(strDir, 1) <> "\" Then strdir &= "\" Return strdir End Function Sub Display() ChDir(TextBox1.Text) ' 先讀取路徑 Dim stritem$ ListBox1.Items.Clear() ListBox2.Items.Clear() stritem = Dir("*.*", 18) ' 連資料夾 (16) 和隱藏檔 (2) 都讀取 Do Until stritem = "" If (GetAttr(strItem) And vbdirectory) = 16 Then ListBox1.Items.Add(strItem) Else ListBox2.Items.Add(strItem) stritem = Dir() Loop Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Display() Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Try MkDir(TextBox1.Text) Catch ex As Exception MsgBox(" 該目錄已存在!", , "") End Try

104 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ChDir("..") TextBox1.Text = CurDir() Display() Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click TextBox1.Text = formatdir(textbox1.text) Dim CurDir$ CurDir = TextBox1.Text & ListBox1.SelectedItem My.Computer.FileSystem.DeleteDirectory(CurDir, FileIO.DeleteDirectoryOption.DeleteAllContents) Display() Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click TextBox1.Text = formatdir(textbox1.text) Dim CurFile$ CurFile = TextBox1.Text & ListBox2.SelectedItem Try My.Computer.FileSystem.DeleteFile(CurFile) Catch ex As Exception MsgBox(" 錯誤 : 檔案已不存在或無法刪除!", , "") End Try Display() Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick TextBox1.Text = formatdir(textbox1.text) TextBox1.Text = TextBox1.Text & ListBox1.SelectedItem Display() Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged TextBox1.Text = formatdir(textbox1.text) ToolStripStatusLabel1.Text = " 檔案大小 :" & FileLen(TextBox1.Text & ListBox2.SelectedItem) & " Bytes " ToolStripStatusLabel2.Text = " 修改日期 :" & FileDateTime(TextBox1.Text & ListBox2.SelectedItem)

105 Select Case GetAttr(TextBox1.Text & ListBox2.SelectedItem) Case 39 Label4.Text = " 檔案屬性 : 一般 系統 隱藏 唯讀 " Case 36 Label4.Text = " 檔案屬性 : 一般 系統 " Case 35 Label4.Text = " 檔案屬性 : 一般 隱藏 唯讀 " Case 34 Label4.Text = " 檔案屬性 : 一般 隱藏 " Case 32 Label4.Text = " 檔案屬性 : 一般 " Case 7 Label4.Text = " 檔案屬性 : 系統 隱藏 唯讀 " Case 6 Label4.Text = " 檔案屬性 : 系統 隱藏 " Case 5 Label4.Text = " 檔案屬性 : 系統 唯讀 " Case 4 Label4.Text = " 檔案屬性 : 系統 " Case 3 Label4.Text = " 檔案屬性 : 隱藏 唯讀 " Case 2 Label4.Text = " 檔案屬性 : 隱藏 " Case 1 Label4.Text = " 檔案屬性 : 唯讀 " End Select 便利貼

106 Public Class Form3 Dim filename As String = "note.txt" Private Sub Form3_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing FileOpen(1, filename, OpenMode.Binary) FilePut(1, TextBox1.Text) ' 回存記事內容 FileClose(1) Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim len% FileOpen(1, filename, OpenMode.Binary) len = LOF(1) Dim content As New String("", len) ' 建立長度為 len 的空字串 FileGet(1, content) ' 讀取整個檔案的內容, 放到 content 裡 FileClose(1) TextBox1.Text = content TextBox1.SelectionStart = len ' 指定游標停駐點 TextBox1.SelectionLength = 0 My.Computer.FileSystem.DeleteFile(filename) ' 這是重點, 否則舊的東西還會在 Private Sub 字型 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 字型 ToolStripMenuItem.Click FontDialog1.ShowColor = True If FontDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then TextBox1.Font = FontDialog1.Font TextBox1.ForeColor = FontDialog1.Color Private Sub 背景顏色 ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 背景顏色 ToolStripMenuItem.Click ColorDialog1.AllowFullOpen = False ColorDialog1.ShowHelp = False If ColorDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then TextBox1.BackColor = ColorDialog1.Color

107 EXAM_6 互質數 直角三角形 文數字 身份字號 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i%, n% Label5.Text = "" n = Val(TextBox1.Text) For i = 2 To n - 1 If (gcd(i, n) = 1) Then Label5.Text &= i & " " Next Function gcd(byval a, ByVal b) As ULong ' 遞迴解法 If b = 0 Then

PC Link Mode. Terminate PC Link? Esc. [GO]/[Esc] - - [GO]/[Esc] 轉接座未放滿. Make auto accord with socket mounted? [GO]/[Esc] Copy to SSD E0000

PC Link Mode. Terminate PC Link? Esc. [GO]/[Esc] - - [GO]/[Esc] 轉接座未放滿. Make auto accord with socket mounted? [GO]/[Esc] Copy to SSD E0000 Start SU-6808 EMMC Programmer V.0bd7 [ ]Link PC / [ ]Menu [ ] >.Select project.make new project.engineer mode.reset counter 5.Link to PC [ ] PC disconnected PC connected Select project SEM0G9C_A.prj Terminate

More information

VB 拼圖應用 圖形式按鈕屬性 資科系 林偉川

VB 拼圖應用 圖形式按鈕屬性 資科系 林偉川 VB 拼圖應用 資科系 林偉川 圖形式按鈕屬性 Style 屬性 0 ( 標準外觀 ),1( 圖片外觀 ) Picture 屬性 圖形檔案 (VB6) image 屬性 圖形檔案 (VB.NET) Left=Top=0 Width=2052,Height=2052 共有九張圖 1.jpg 9.jpg Form1 執行時視窗為最大化 Windowstate 設為 2 2 1 執行結果 3 path$

More information

SSL VPN User Manual (SSL VPN 連線使用手冊 )

SSL VPN User Manual (SSL VPN 連線使用手冊 ) SSL VPN User Manual (SSL VPN 連線使用手冊 ) 目錄 前言 (Preface) 1. ACMICPC 2018 VPN 連線說明 -- Pulse Secure for Windows ( 中文版 ):... 2 2. ACMICPC 2018 VPN 連線說明 -- Pulse Secure for Linux ( 中文版 )... 7 3. ACMICPC 2018

More information

Oxford isolution. 下載及安裝指南 Download and Installation Guide

Oxford isolution. 下載及安裝指南 Download and Installation Guide Oxford isolution 下載及安裝指南 Download and Installation Guide 系統要求 個人電腦 Microsoft Windows 10 (Mobile 除外 ) Microsoft Windows 8 (RT 除外 ) 或 Microsoft Windows 7 (SP1 或更新版本 ) ( 網上下載 : http://eresources.oupchina.com.hk/oxfordisolution/download/index.html)

More information

港專單一登入系統 (SSO) 讓本校的同學, 全日制及兼職老師只要一個登入帳戶, 便可同時使用由本校提供的網上系統及服務, 包括 Blackboard 網上學習平台, 港專電郵服務, 圖書館電子資料庫及其他教學行政系統.

港專單一登入系統 (SSO) 讓本校的同學, 全日制及兼職老師只要一個登入帳戶, 便可同時使用由本校提供的網上系統及服務, 包括 Blackboard 網上學習平台, 港專電郵服務, 圖書館電子資料庫及其他教學行政系統. 港專單一登入系統 (SSO) 讓本校的同學, 全日制及兼職老師只要一個登入帳戶, 便可同時使用由本校提供的網上系統及服務, 包括 Blackboard 網上學習平台, 港專電郵服務, 圖書館電子資料庫及其他教學行政系統. 港專單一登入網站網址 http://portal.hkct.edu.hk (HKCT 之教職員, 學生 ) http://portal.ctihe.edu.hk (CTIHE 之教職員,

More information

桌上電腦及筆記本電腦安裝 Acrobat Reader 應用程式

桌上電腦及筆記本電腦安裝 Acrobat Reader 應用程式 On a desktop or notebook computer Installing Acrobat Reader to read the course materials The Course Guide, study units and other course materials are provided in PDF format, but to read them you need a

More information

Figure 1 Microsoft Visio

Figure 1 Microsoft Visio Pattern-Oriented Software Design (Fall 2013) Homework #1 (Due: 09/25/2013) 1. Introduction Entity relation (ER) diagrams are graphical representations of data models of relation databases. In the Unified

More information

外薦交換生線上申請系統操作說明 Instruction on Exchange Student Online Application System. [ 中文版 ] [English Version]

外薦交換生線上申請系統操作說明 Instruction on Exchange Student Online Application System. [ 中文版 ] [English Version] 外薦交換生線上申請系統操作說明 Instruction on Exchange Student Online Application System [ 中文版 ] [English Version] 線上申請流程說明 申請系統網址 : http://schwebap.nccu.edu.tw/zeweb/exgstdapply/ 1. 建立新帳號 : 請輸入姓名 生日 email 做為未來登入系統用

More information

一般來說, 安裝 Ubuntu 到 USB 上, 不外乎兩種方式 : 1) 將電腦上的硬碟排線先予以排除, 將 USB 隨身碟插入主機, 以一般光碟安裝方式, 將 Ubuntu 安裝到 USB

一般來說, 安裝 Ubuntu 到 USB 上, 不外乎兩種方式 : 1) 將電腦上的硬碟排線先予以排除, 將 USB 隨身碟插入主機, 以一般光碟安裝方式, 將 Ubuntu 安裝到 USB Ubuntu 是新一代的 Linux 作業系統, 最重要的是, 它完全免費, 不光是作業系統, 連用軟體都不必錢 為什麼要裝在 USB 隨身碟上? 因為, 你可以把所有的軟體帶著走, 不必在每一台電腦上重新來一次, 不必每一套軟體裝在每一台電腦上都要再一次合法授權 以下安裝方式寫的是安裝完整的 Ubuntu- 企業雲端版本 V. 11.10 的安裝過程, 若是要安裝 Desktop 版本, 由於牽涉到

More information

購票流程說明 How To purchase The Ticket?

購票流程說明 How To purchase The Ticket? 購票流程說明 How To purchase The Ticket? 步驟 1: 點選 登入 Click 登入 Login (You have to login before purchasing.) 步驟 2: 若已是會員請填寫會員帳號 密碼, 點選 登入 若非會員請點選 註冊 If you are the member of PB+, Please login. If not, please register.

More information

CLAD 考前準備 與 LabVIEW 小技巧

CLAD 考前準備 與 LabVIEW 小技巧 CLAD 考前準備 與 LabVIEW 小技巧 NI 技術行銷工程師 柯璟銘 (Jimmy Ko) jimmy.ko@ni.com LabVIEW 認證 Certified LabVIEW Associate Developer (LabVIEW 基礎認證 ) Certified LabVIEW Associate Developer LabVIEW 全球認證 40 題 (37 題單選,3 題複選

More information

RENESAS BLE 實作課程 Jack Chen Victron Technology CO., LTD 2015 Renesas Electronics Corporation. All rights reserved.

RENESAS BLE 實作課程 Jack Chen Victron Technology CO., LTD 2015 Renesas Electronics Corporation. All rights reserved. RENESAS BLE 實作課程 2016-01-21 Jack Chen Jack.chen@victron.com.tw Victron Technology CO., LTD AGENDA CS+ & Renesas Flash Programmer 安裝 3 Renesas Flash Programmer 燒錄介紹 6 CS+ 介面介紹 11 CS+ 開啟 Project & 使用教學 14

More information

購票流程說明 How To purchase The Ticket?

購票流程說明 How To purchase The Ticket? 購票流程說明 How To purchase The Ticket? 步驟 1: 已是會員請點選 登入, 選擇 2016 WTA 臺灣公開賽 Taiwan Open tickets Step1:If You are the member, please Click 登入 Click to the column: 2016 WTA 臺灣公開賽 Taiwan Open tickets Click 登入

More information

UAK1-C01 USB Interface Data Encryption Lock USB 資料加密鎖. Specifications for Approval

UAK1-C01 USB Interface Data Encryption Lock USB 資料加密鎖. Specifications for Approval Product Definition C-MING Product Semi-finished Product OEM/ODM Product Component USB Interface Data Encryption Lock USB 資料加密鎖 Specifications for Approval Approval Manager Issued By Revision History Revision

More information

2009 OB Workshop: Structural Equation Modeling. Changya Hu, Ph.D. NCCU 2009/07/ /07/03

2009 OB Workshop: Structural Equation Modeling. Changya Hu, Ph.D. NCCU 2009/07/ /07/03 Amos Introduction 2009 OB Workshop: Structural Equation Modeling Changya Hu, Ph.D. NCCU 2009/07/02- 2 Contents Amos Basic Functions Observed Variable Path Analysis Confirmatory Factor Analysis Full Model

More information

Preamble Ethernet packet Data FCS

Preamble Ethernet packet Data FCS Preamble Ethernet. packet Data FCS Destination Address Source Address EtherType Data ::: Preamble. bytes. Destination Address. bytes. The address(es) are specified for a unicast, multicast (subgroup),

More information

Twin API Guide. How to use Twin

Twin API Guide. How to use Twin Twin API Guide How to use Twin 1 目錄 一 Cycle Job------------------------------------------------------------------------------------P3 二 Twin Action Table-----------------------------------------------------------------------P4-5

More information

Chapter 7. Digital Arithmetic and Arithmetic Circuits. Signed/Unsigned Binary Numbers

Chapter 7. Digital Arithmetic and Arithmetic Circuits. Signed/Unsigned Binary Numbers Chapter 7 Digital Arithmetic and Arithmetic Circuits Signed/Unsigned Binary Numbers Signed Binary Number: A binary number of fixed length whose sign (+/ ) is represented by one bit (usually MSB) and its

More information

第九章結構化查詢語言 SQL - 資料定義語言 (DDL) 資料庫系統設計理論李紹綸著

第九章結構化查詢語言 SQL - 資料定義語言 (DDL) 資料庫系統設計理論李紹綸著 第九章結構化查詢語言 SQL - 資料定義語言 (DDL) 資料庫系統設計理論李紹綸著 SQL 的資料定義語言 本章內容 建立資料表 修改資料表 刪除資料表 FOREIGN KEY 外鍵條件約束與資料表關聯性 2 資料定義語言可分為下列三種 : SQL 的資料定義語言 CREATE TABLE 指令 : 用來建立一個基底關聯表, 和設定關聯表相關的完整性限制 CREATE VIEW 指令 : 用來建立一個視界,

More information

全面強化電路設計與模擬驗證. Addi Lin / Graser 2 / Sep / 2016

全面強化電路設計與模擬驗證. Addi Lin / Graser 2 / Sep / 2016 全面強化電路設計與模擬驗證 Addi Lin / Graser 2 / Sep / 2016 Agenda OrCAD Design Solution OrCAD Capture 功能應用 OrCAD Capture CIS 介紹 OrCAD PSpice 模擬與驗證 OrCAD Design Solution Powerful and Widely Used Design Solution Front-to-Back

More information

C B A B B C C C C A B B A B C D A D D A A B D C C D D A B D A D C D B D A C A B

C B A B B C C C C A B B A B C D A D D A A B D C C D D A B D A D C D B D A C A B 高雄市立右昌國中 106 學年度第二學期第二次段考三年級考科答案 國文科 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. C B D C A C B A D B 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. D C B A D C A B D B 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. C B D C B B C

More information

Version Control with Subversion

Version Control with Subversion Version Control with Subversion 指導教授郭忠義 邱茂森 95598051 1 Table of contents (1) Basic concepts of subversion (1)What is Subversion (2)Version Control System (3)Branching and tagging (4) Repository and Working

More information

The notice regarding Participation Ways of our global distributor video conference on Feb. 5.

The notice regarding Participation Ways of our global distributor video conference on Feb. 5. The notice regarding Participation Ways of our global distributor video conference on Feb. 5. On Feb.5, 2010 Los Angeles time, between 5:00 PM - 7:00 PM, we will convene an important global distributor

More information

Operating Systems 作業系統

Operating Systems 作業系統 Chapter 7 Operating Systems 作業系統 7.1 Source: Foundations of Computer Science Cengage Learning Objectives 學習目標 After studying this chapter, students should be able to: 7.2 Understand the role of the operating

More information

Chapter 4 (Part IV) The Processor: Datapath and Control (Parallelism and ILP)

Chapter 4 (Part IV) The Processor: Datapath and Control (Parallelism and ILP) Chapter 4 (Part IV) The Processor: Datapath and Control (Parallelism and ILP) 陳瑞奇 (J.C. Chen) 亞洲大學資訊工程學系 Adapted from class notes by Prof. M.J. Irwin, PSU and Prof. D. Patterson, UCB 4.10 Instruction-Level

More information

Digital imaging & free fall of immersed sphere with wall effects

Digital imaging & free fall of immersed sphere with wall effects 量測原理與機工實驗 ( 下 ) 熱流實驗 ( 一 ) Digital imaging & free fall of immersed sphere with wall effects May 14-18, 2012 Objective: This week s lab work has two parts: (1) how to record digital video and convert it

More information

Increase Productivity and Quality by New Layout Flow

Increase Productivity and Quality by New Layout Flow Increase Productivity and Quality by New Layout Flow Jonathan / Graser 16 / Oct / 2015 Design Process Introduction CONSTRAINTS PLACEMENT FANOUT BREAKOUT ROUTING DELAY (ATE) NET-GROUP Topology & Delay Physical

More information

Chapter 7. Signed/Unsigned Binary Numbers. Digital Arithmetic and Arithmetic Circuits. Unsigned Binary Arithmetic. Basic Rules (Unsigned)

Chapter 7. Signed/Unsigned Binary Numbers. Digital Arithmetic and Arithmetic Circuits. Unsigned Binary Arithmetic. Basic Rules (Unsigned) Chapter 7 Digital rithmetic and rithmetic Circuits igned/unsigned inary Numbers igned inary Number: binary number of fixed length whose sign (+/ ) is represented by one bit (usually M) and its magnitude

More information

InTANK ir2771-s3 ir2772-s3. User Manual

InTANK ir2771-s3 ir2772-s3. User Manual InTANK ir2771-s3 ir2772-s3 User Manual » InTANK...1» InTANK ir2771-s3 & ir2772-s3 產品使用說明... 10 V1.1 Introduction Thank you for purchasing RAIDON products. This manual will introduce the InTANK ir2771-s3

More information

Quick Installation Guide for Connectivity Adapter Cable CA-42

Quick Installation Guide for Connectivity Adapter Cable CA-42 9235663_CA42_1_en.fm Page 1 Monday, September 13, 2004 11:26 AM Quick Installation Guide for Connectivity Adapter Cable CA-42 9235645 Issue 1 Nokia, Nokia Connecting People and Pop-Port are registered

More information

4Affirma Analog Artist Design Flow

4Affirma Analog Artist Design Flow 4Affirma Analog Artist Design Flow Getting Started 1. 登入工作站 : Username : trainaxx Password : train0xx 其中 XX 代表工作站名字的號碼, 例如工作站名字叫做 traina01 的話,XX 就是 01 2. 先確定是否進入 Solaris 作業系統的 Common Desktop Environment(CDE)

More information

David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation

David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Six: Transforming Data Models into Database Designs 6-1 Chapter Objectives To understand how to transform

More information

JAVA Programming Language Homework V: Overall Review

JAVA Programming Language Homework V: Overall Review JAVA Programming Language Homework V: Overall Review ID: Name: 1. Given the following Java code: [5 points] 1. public class SimpleCalc { 2. public int value; 3. public void calculate(){ value = value +

More information

UNIX Basics + shell commands. Michael Tsai 2017/03/06

UNIX Basics + shell commands. Michael Tsai 2017/03/06 UNIX Basics + shell commands Michael Tsai 2017/03/06 Reading: http://www.faqs.org/docs/artu/ch02s01.html Where UNIX started Ken Thompson & Dennis Ritchie Multics OS project (1960s) @ Bell Labs UNIX on

More information

資工導論 Digital Data Processing 李哲榮

資工導論 Digital Data Processing 李哲榮 資工導論 Digital Data Processing 李哲榮 What is digitalization? Digitization is the representation of an object, image, sound, document or signal (usually an analog signal) by generating a series of numbers that

More information

Allegro SPB V16 Advance

Allegro SPB V16 Advance Allegro SPB V16 Advance Allegro SPB 16.2 Advance Import Logic Back Annotate Netlist Compare Advanced Placement Constraint Management Differential Pair Import Logic Other Cadence Import Logic Other 利用 Other

More information

步驟 1: 首頁以 facebook 或 google 帳號登入, 並點選節目 Step 1:Log in with your facebook/google account, then click the show banner.

步驟 1: 首頁以 facebook 或 google 帳號登入, 並點選節目 Step 1:Log in with your facebook/google account, then click the show banner. 步驟 1: 首頁以 facebook 或 google 帳號登入, 並點選節目 Step 1:Log in with your facebook/google account, then click the show banner. 步驟 2: 填寫會員資料 Step 2:Fill out the membership form. Name ID No. Male/female Foreigner

More information

Java 程式設計基礎班 (7) 劉根豪台大電機所網路資料庫研究室. Java I/O. Class 7 1. Class 7

Java 程式設計基礎班 (7) 劉根豪台大電機所網路資料庫研究室. Java I/O.   Class 7 1. Class 7 Java 程式設計基礎班 (7) 劉根豪台大電機所網路資料庫研究室 Email: kenliu@arbor.ee.ntu.edu.tw 1 回顧 Java I/O 2 1 Java Data Structure 動態資料結構 執行的時候可以動態變大或縮小 類型 Linked lists Stacks Queues Binary trees 3 自我參考類別 (self-referential classes)

More information

使用 TensorFlow 設計矩陣乘法計算並轉移執行在 Android 上 建國科技大學資管系 饒瑞佶 2017/8

使用 TensorFlow 設計矩陣乘法計算並轉移執行在 Android 上 建國科技大學資管系 饒瑞佶 2017/8 使用 TensorFlow 設計矩陣乘法計算並轉移執行在 Android 上 建國科技大學資管系 饒瑞佶 2017/8 Python 設計 Model import tensorflow as tf from tensorflow.python.tools import freeze_graph from tensorflow.python.tools import optimize_for_inference_lib

More information

Protech RMA Request Form

Protech RMA Request Form Applied Company: Contact Person: E-mail: DOA NO. (BY PROTECH BU): Serial Warrant No. Model Number y Status 1 2 3 4 5 6 7 Protech RMA Request Form *Defect Description Date: Page:1 of 1 DOA Regular RMA Environmen

More information

English G H. Package Contents. Hardware Requirements. Technical Specifications. Device Overview. MSI DS502 GAMING HEADSET User Guide

English G H. Package Contents. Hardware Requirements. Technical Specifications. Device Overview. MSI DS502 GAMING HEADSET User Guide Package Contents MSI DS502 GAMING HEADSET User Guide Hardware Requirements PC with USB port Windows 8.1/8/7/XP English Technical Specifications Headphones * Drivers : Ø40mm * Sensitivity (S.P.L) : 105

More information

Frame Relay 訊框中繼 FRSW S0/0 S0/1

Frame Relay 訊框中繼 FRSW S0/0 S0/1 Frame Relay 訊框中繼 將路由器設定為訊框中繼交換器以進行 frame relay 實驗 : 首先練習設定兩個埠的 frame relay switch FRSW S0/0 S0/1 介面 S0/0 介面 S0/1 102 201 DLI 102 DLI 201 Router(config)# hostname FRSW FRSW(config)# frame-relay switching

More information

Java 程式設計基礎班 (7) 莊坤達台大電信所網路資料庫研究室. Java I/O. Class 7 1. Class 7 2

Java 程式設計基礎班 (7) 莊坤達台大電信所網路資料庫研究室. Java I/O.   Class 7 1. Class 7 2 Java 程式設計基礎班 (7) 莊坤達台大電信所網路資料庫研究室 Email: doug@arbor.ee.ntu.edu.tw Class 7 1 回顧 Java I/O Class 7 2 Java Data Structure 動態資料結構 Grow and shrink at execution time Several types Linked lists Stacks Queues Binary

More information

BTC, EMPREX Wireless Keybaord +Mouse + USB dongle. 6309URF III Quick Installation Guide

BTC, EMPREX Wireless Keybaord +Mouse + USB dongle. 6309URF III Quick Installation Guide BTC, EMPREX 6309URF III Quick Installation Guide Hardware Installation 1. Plug the dongle receiver connector into your available USB port on PC. 2. Make sure the batteries of the keyboard and mouse are

More information

Chapter 7 Pointers ( 指標 )

Chapter 7 Pointers ( 指標 ) Chapter Pointers ( 指標 ) Outline.1 Introduction.2 Pointer Variable Definitions and Initialization.3 Pointer Operators.4 Calling Functions by Reference.5 Using the const Qualifier with Pointers.6 Bubble

More information

What is a Better Program?

What is a Better Program? 軟體的特性 What is a Better Program? 軟體之所謂軟 因為沒有 硬性 不可變 不可挑戰的規則 好處 : 彈性很大, 山不轉路轉, 沒有標準答案, 正常運作就好 C++ Object Oriented Programming 壞處 : 很多小問題合在一起不斷放大, 到處藏污納垢, 沒有標準答案, 不知道到底對了沒有 解決方法 Pei-yih Ting Coding styles

More information

MH-3621-U3 Clone Dual SATA HDD Docking System

MH-3621-U3 Clone Dual SATA HDD Docking System MH-3621-U3 Clone CONTENTS ABOUT THE DOCKING SYSTEM... 2 HARD DRIVE INSTALLATION GUIDE... 5 CLONE OPERATION GUIDE... 6 NOTE... 8 LIMITED WARRANTY... 10 1 Thank you for purchasing MH-3621-U3 from archgon.

More information

SPI 功能使用方法 Application Note

SPI 功能使用方法 Application Note 1 適用產品 :SM59R16A2 / SM59R08A2 2 SPI 使用概述 : SPI 通信使用 4 個引腳, 分別為 SPI_: 當 master 時資料輸出 ; 當 slave 時資料輸入 SPI_: 當 master 時資料輸入 ; 當 slave 時資料輸出 SPI_SCK: SPI 的時脈信號由 master 主控產生 ; 資料 ( 輸出及輸入 ) 和時脈同步 SPI_SS: 此引腳功能唯有當作

More information

多元化資料中心 的保護策略 技術顧問 陳力維

多元化資料中心 的保護策略 技術顧問 陳力維 多元化資料中心 的保護策略 技術顧問 陳力維 現代化的資料保護架構 使用者自助服務 任何儲存設備 影響低 多種還原點選擇 (RPO) Application Server 完整全面的雲端整合 Network Disk Target 容易操作與深入各層的報表能力 管理快照與複製能力 Primary Storage 快速 可靠的還原 (RTO) 完整的磁帶 & 複製管理 單一整合的解決方案 企業級的擴充性

More information

EdConnect and EdDATA

EdConnect and EdDATA www.hkedcity.net Tryout Programme of Standardised Data Format for e-textbook and e-learning Platform EdConnect and EdDATA 5 December 2018 Agenda Introduction and background Try-out Programme Q&A 電子課本統一數據格式

More information

3.1 Animation. Rotating Square

3.1 Animation. Rotating Square 3.1 Animation 動畫 1 Rotating Square Consider the four points 圖 3.1 Animate display by rerendering with different values of θ 2 1 事件 (Event) 之種類 Window: resize, expose, iconify Mouse: click one or more buttons

More information

InTANK ir2622 User Manual

InTANK ir2622 User Manual InTANK ir2622 User Manual » InTANK...1» InTANK ir2622 產品使用說明... 12 V1.2 » InTANK Introduction Thank you for purchasing RAIDON products. This manual will introduce the InTANK ir2622 Series. Before using

More information

游家德 Jade Freeman 群智信息 / 敦群數位資深架構顧問

游家德 Jade Freeman 群智信息 / 敦群數位資深架構顧問 游家德 Jade Freeman 群智信息 / 敦群數位資深架構顧問 搜尋對企業的需求方案關係 微軟全面性的搜尋方案及應用價值 Enterprise Search 的基本架構 Microsoft Search Solution 物件模型與客製開發 Microsoft Search Solution 應用與案例 Q&A 每人每天會花 10 分鐘在找企業所需文件, 且還可能找不到! 整合的資料大都雜亂無章,

More information

場次 : C3. 公司名稱 : Radware. 主題 : ADC & Security for SDDC. 主講人 : Sam Lin ( 職稱 ) 總經理

場次 : C3. 公司名稱 : Radware. 主題 : ADC & Security for SDDC. 主講人 : Sam Lin ( 職稱 ) 總經理 場次 : C3 公司名稱 : Radware 主題 : ADC & Security for SDDC 主講人 : Sam Lin ( 職稱 ) 總經理 L4-L7 ADC (appliance or NFV) and Security service (appliance or NFV ) for (Software Define) Data Center Sam Lin Radware Taiwan

More information

微算機原理與實驗 Principle of Microcomputer(UEE 2301/1071 )

微算機原理與實驗 Principle of Microcomputer(UEE 2301/1071 ) 微算機原理與實驗 (UEE 2301/1071 ) Chap 6. MCS-51 Instruction sets 宋開泰 Office:EE709 Phone:5731865( 校內分機 :31865) E-mail:ktsong@mail.nctu.edu.tw URL:http://isci.cn.nctu.edu.tw 1 Lab#3 5 x 7 單色點矩陣 LED(Dot Matrix)

More information

Multimedia Service Support and Session Management 鍾國麟

Multimedia Service Support and Session Management 鍾國麟 Multimedia Service Support and Session Management 鍾國麟 2003-9-31 1 1 Agenda Introduction What is Session? Definition Functions Why need Session Management 2G,Internet,3G SIP Basic Operation User Location

More information

InTANK ir2623-s3 User Manual

InTANK ir2623-s3 User Manual InTANK ir2623-s3 User Manual » InTANK...1» InTANK ir2623-s3 產品使用說明...12 V1.0 » InTANK Introduction Thank you for purchasing RAIDON products. This manual will introduce the IR2623-S3 Series. Before using

More information

描述性資料採礦 Descriptive Data Mining

描述性資料採礦 Descriptive Data Mining 描述性資料採礦 Descriptive Data Mining 李御璽 (Yue-Shi Lee) 銘傳大學資訊工程學系 leeys@mail.mcu.edu.tw Agenda Cluster Analysis ( 集群分析 ) 找出資料間的內部結構 Association Rules ( 關聯規則 ) 找出那些事件常常一起出現 Sequence Clustering ( 時序群集 ) Clustering

More information

EZCast Docking Station

EZCast Docking Station EZCast Docking Station Quick Start Guide Rev. 2.00 Introduction Thanks for choosing EZCast! The EZCast Docking Station contains the cutting-edge EZCast technology, and firmware upgrade will be provided

More information

虛擬機 - 惡意程式攻防的新戰場. 講師簡介王大寶, 小時候大家叫他王小寶, 長大後就稱王大寶, 目前隸屬一神祕單位. 雖然佯稱興趣在看書與聽音樂, 但是其實晚上都在打 Game. 長期於系統最底層打滾, 熟悉 ASM,C/C++,

虛擬機 - 惡意程式攻防的新戰場. 講師簡介王大寶, 小時候大家叫他王小寶, 長大後就稱王大寶, 目前隸屬一神祕單位. 雖然佯稱興趣在看書與聽音樂, 但是其實晚上都在打 Game. 長期於系統最底層打滾, 熟悉 ASM,C/C++, 王大寶, PK 虛擬機 - 惡意程式攻防的新戰場 講師簡介王大寶, 小時候大家叫他王小寶, 長大後就稱王大寶, 目前隸屬一神祕單位. 雖然佯稱興趣在看書與聽音樂, 但是其實晚上都在打 Game. 長期於系統最底層打滾, 熟悉 ASM,C/C++, 對於資安毫無任何興趣, 也無經驗, 純粹是被某壞人騙上台, 可以說是不可多得的素人講師!! 議程大綱 : 現今的 CPU 都支援虛擬化專用指令集, 讓 VM

More information

微處理機系統 吳俊興高雄大學資訊工程學系. February 21, What are microprocessors (µp)? What are the topics of this course? Why to take this course?

微處理機系統 吳俊興高雄大學資訊工程學系. February 21, What are microprocessors (µp)? What are the topics of this course? Why to take this course? 微處理機系統 吳俊興高雄大學資訊工程學系 February 21, 2005 processor, central processing unit (CPU) A silicon chip which forms the core of a microcomputer The heart of the microprocessor-based computer system Concept of what

More information

Android + TIBBO + Socket 建國科技大學資管系 饒瑞佶

Android + TIBBO + Socket 建國科技大學資管系 饒瑞佶 Android + TIBBO + Socket 建國科技大學資管系 饒瑞佶 Socket Socket 開始前 TIBBO 需要設定 Socket on_sock_data_arrival() ' 接收外界來的 SOCKET 資訊 sub on_sock_data_arrival() Dim command_data as string ' 完整控制命令 command_data = "" ' 初始化控制命令

More information

EZCast Wire User s Manual

EZCast Wire User s Manual EZCast Wire User s Manual Rev. 2.01 Introduction Thanks for choosing EZCast! The EZCast Wire contains the cutting-edge EZCast technology, and firmware upgrade will be provided accordingly in order to compatible

More information

Software Architecture Case Study: Applying Layer in SyncFree

Software Architecture Case Study: Applying Layer in SyncFree Software Architecture Case Study: Applying Layer in SyncFree Chien-Tsun Chen Department of Computer Science and Information Engineering National Taipei University of Technology, Taipei 06, Taiwan ctchen@ctchen.idv.tw

More information

SOHOTANK PD3500+ User Manual

SOHOTANK PD3500+ User Manual SOHOTANK PD3500+ User Manual » SOHORAID SR2 Series User Manual.3» SOHORAID SR2 系列產品使 用說明.. 14 2 Introduction Thank you for purchasing STARDOM products. This manual will introduce the SOHOTANK PD3500+ Series.

More information

Registering ( 註冊新帳號 )

Registering ( 註冊新帳號 ) 證券市場發展季刊線上審稿系統註冊流程指南 Registering ( 註冊新帳號 ) Unregistered visitors to a journal can normally register as a Reader, Author, and/or Reviewer. Journal Managers are able to remove the ability for visitors to

More information

WriteAhead 遨遊雲端暨 行動學習應 用 研討會 雲端時代的資訊教育與語 言學習 介紹互動式寫作環境 張俊盛 清華 大學資訊 工程系及研究所 2015 年 4 月 21 日 ( 二 ) 上午 10:00 ~ 12:30 台北市 立 大同 高中 行政 大學 5 樓階梯教室

WriteAhead 遨遊雲端暨 行動學習應 用 研討會 雲端時代的資訊教育與語 言學習 介紹互動式寫作環境 張俊盛 清華 大學資訊 工程系及研究所 2015 年 4 月 21 日 ( 二 ) 上午 10:00 ~ 12:30 台北市 立 大同 高中 行政 大學 5 樓階梯教室 遨遊雲端暨 行動學習應 用 研討會 雲端時代的資訊教育與語 言學習 介紹互動式寫作環境 WriteAhead 張俊盛 清華 大學資訊 工程系及研究所 2015 年 4 月 21 日 ( 二 ) 上午 10:00 ~ 12:30 台北市 立 大同 高中 行政 大學 5 樓階梯教室 高中資訊教育 培養現代公 民的資訊素養 並不是如何使 用 生產 力軟體 也不只是寫程式 了解現在商業軟體並 非唯 一的選擇,

More information

EZCast Wire. User s Manual. Rev. 2.00

EZCast Wire. User s Manual. Rev. 2.00 EZCast Wire User s Manual Rev. 2.00 Introduction Thanks for choosing EZCast! The EZCast Wire contains the cutting-edge EZCast technology, and firmware upgrade will be provided accordingly in order to compatible

More information

Password Protection 此篇文章說明如何在程式中加入密碼保護的機制, 當程式開啟, 使用者必須先輸入使用者帳號及密碼, 若是合法使用者才能進入應用程式

Password Protection 此篇文章說明如何在程式中加入密碼保護的機制, 當程式開啟, 使用者必須先輸入使用者帳號及密碼, 若是合法使用者才能進入應用程式 Password Protection 此篇文章說明如何在程式中加入密碼保護的機制, 當程式開啟, 使用者必須先輸入使用者帳號及密碼, 若是合法使用者才能進入應用程式 Step 1. 使用 Visual C++ 6.0 產生一個 MFC Application 1) Project name: PasswordProtection 2) Project type: MFC AppWizard(exe)

More information

DVS-8504E-H 四路 H.264 數位影像編碼器

DVS-8504E-H 四路 H.264 數位影像編碼器 DVS-8504E-H 四路 H.264 數位影像編碼器 1 LEGAL The information in this publication has been carefully checked and is believed to be entirely accurate at the time of publication. CTC Union Technologies assumes no

More information

Quick Installation Guide

Quick Installation Guide WiPG-1500 Quick Installation Guide Version: 9.0 Date: Jul 11, 2013 1 1. Package Contents WiPG-1500 device Plug&Show USB token Power Adapter (DC +5V, 2.5A) Wi-Fi Antenna x 2 Wall-mount Kit (screw x4, bracket

More information

Operation Function Locations. Operations. Wireless Microphone Wireless Receiving Features. Wireless Transmission Audio Function Operations

Operation Function Locations. Operations. Wireless Microphone Wireless Receiving Features. Wireless Transmission Audio Function Operations D Table of Contents Operation Function Locations Operations Wireless Microphone Wireless Receiving Features Wireless Transmission Audio Function Operations 1 2 3 3 Transmitter ID Code Setting 3 Host ID

More information

WIN Semiconductors. Wireless Information Networking 穩懋半導體 2014 年第四季法人說明會. p.0

WIN Semiconductors. Wireless Information Networking 穩懋半導體 2014 年第四季法人說明會. p.0 WIN Semiconductors Wireless Information Networking 穩懋半導體 2014 年第四季法人說明會 2015 年 3 月 p.0 免責聲明 本資料可能包含對於未來展望的表述 該類表述是基於對現況的 預期, 但同時受限於已知或未知風險或不確定性的影響 因此實 際結果將可能明顯不同於表述內容 除法令要求外, 公司並無義務因應新資訊的產生或未來事件的發生主動更新對未來展望的表述

More information

Channel Python API Overview

Channel Python API Overview Channel Python API verview The Channel API creates a persistent connection between your application and Google servers, allowing your application to send messages to JavaScript clients in real time without

More information

DVS-8501E/DVS-8501E-H 單路 H.264 數位影像編碼器

DVS-8501E/DVS-8501E-H 單路 H.264 數位影像編碼器 DVS-8501E/DVS-8501E-H 單路 H.264 數位影像編碼器 1 LEGAL The information in this publication has been carefully checked and is believed to be entirely accurate at the time of publication. CTC Union Technologies

More information

Invitation to Computer Science 5 th Edition. Chapter 8 Information Security

Invitation to Computer Science 5 th Edition. Chapter 8 Information Security Invitation to Computer Science 5 th Edition Chapter 8 Information Security CIA Triad of Information Security Ensuring that data can be modified only by appropriate mechanisms Ensuring that data is protected

More information

報告人 / 主持人 : 林寶樹 Colleges of Computer Science & ECE National Chiao Tung University

報告人 / 主持人 : 林寶樹 Colleges of Computer Science & ECE National Chiao Tung University 行動寬頻尖端技術跨校教學聯盟 - 行動寬頻網路與應用 MiIoT ( Mobile intelligent Internet of Things) 報告人 / 主持人 : 林寶樹 Colleges of Computer Science & ECE National Chiao Tung University Aug 14, 2015 課程簡介 課程綱要 實作平台評估 2 背景說明 目前雲端與行動寬頻緊密結合,

More information

Briefing Session on 2013 HKDSE ICT Exam. 22/23 Nov 2013

Briefing Session on 2013 HKDSE ICT Exam. 22/23 Nov 2013 Briefing Session on 2013 HKDSE ICT Exam 22/23 Nov 2013 1 Breakdown of elective No. of candidates No. of schools 1 7,759 490 2A 862 55 2B 269 27 2C 5,607 367 2D 1,239 104 2 Options offered No. of options

More information

微軟商務用 Skype 雲端視訊會議及與所需頻寬介紹

微軟商務用 Skype 雲端視訊會議及與所需頻寬介紹 微軟商務用 Skype 雲端視訊會議及與所需頻寬介紹 傳統視訊會議 : 視訊會議解決方案 以硬體設備為主, 內建專屬視訊會議軟體, 要增加連線數量就必須加購昂貴的 MCU Server, 整套設備的價格多在數百萬之譜 軟體式視訊會議 : 在現有的基礎設備上, 強化整合通訊功能 (UC), 再結合視訊會議功能 (VC, Video Conference), 對於公司的網路系統或是通訊系統做更有效率的運用

More information

Citrix CloudGateway. aggregate control. all apps and data to any device, anywhere

Citrix CloudGateway. aggregate control. all apps and data to any device, anywhere Citrix CloudGateway aggregate control all apps and data to any device, anywhere Agenda 1. What s Cloud Gateway? 2. Cloud Gateway Overview 3. How it works? What s Cloud Gateway? It s all about the apps

More information

From Suffix Trie to Suffix Tree

From Suffix Trie to Suffix Tree Outline Exact String Matching Suffix tree an extremely powerful data structure for string algorithms Input: P and S. Output: All occurrences of P in S. Time: O( P + S ) Technique: Z values of PS. Z(i +

More information

利用數據與軟體瞭解 讀者行為使用分析與服務平台選項

利用數據與軟體瞭解 讀者行為使用分析與服務平台選項 By using the data and software analysis to study the user experience & the option for the service platform in library field. 利用數據與軟體瞭解 讀者行為使用分析與服務平台選項 周頡 Jeremy Chou EBSCO Information Services Sales Director

More information

SOHORAID ST8-TB3 User Manual

SOHORAID ST8-TB3 User Manual SOHORAID ST8-TB3 User Manual » ST8-TB3 User Manual...1 1. Environmental Requirements...1 2. Product Appearance and Packaging Content...1 3. Hardware Requirements and Precautions...2 4. Hardware Installation...3

More information

Concepts of Image & Video Coding

Concepts of Image & Video Coding Concepts of Image & Video Coding Applications of Digital Video Multimedia Digital TV, HDTV VCD (Video CD), DVD (Digital Versatile/Video Disc), Digital camcoder, Digital VCR,... Video on demand Videophone

More information

Scale of Fees (Applicable from 18 June 2017) Data Access Request consists of (i) Data Enquiry Request and (ii) Copy of Personal Medical Records

Scale of Fees (Applicable from 18 June 2017) Data Access Request consists of (i) Data Enquiry Request and (ii) Copy of Personal Medical Records Grantham Hospital Health Information & Records Office G/F, Main Block, 125 Wong Chuk Hang Road, Aberdeen, Hong Kong Tel.: 2518 2203 Fax: 2555 7319 Opening hours: Monday - Friday: 9 a.m. to 1 p.m. and 2:00

More information

Additional Information

Additional Information Additional Information Apple, ipad, iphone, ipod touch, Macintosh, Mac OS, OS X and Bonjour are trademarks of Apple Inc., registered in the U.S. and other countries. AirPrint and the AirPrint logo are

More information

The transformation relationship between defense enterprise architecture and C4ISR system architecture

The transformation relationship between defense enterprise architecture and C4ISR system architecture The transformation relationship between defense enterprise architecture and C4ISR system architecture Dr. Meng-chyi Harn 報告人 : 韓孟麒博士德明財經科技大學資訊科技系 C4ISR 研究中心 Introducing Takming Outline Introduction Fundamental

More information

AVG Anti-Virus User Manual. Document revision ( )

AVG Anti-Virus User Manual. Document revision ( ) AVG Anti-Virus 2012 User Manual Document revision 2012.01 (27.7.2011) Copyright AVG Technologies CZ, s.r.o. All rights reserved. All other trademarks are the property of their respective owners. This product

More information

臺北巿立大學 104 學年度研究所碩士班入學考試試題

臺北巿立大學 104 學年度研究所碩士班入學考試試題 臺北巿立大學 104 學年度研究所碩士班入學考試試題 班別 : 資訊科學系碩士班 ( 資訊科學組 ) 科目 : 計算機概論 ( 含程式設計 ) 考試時間 :90 分鐘 08:30-10:00 總分 :100 分 注意 : 不必抄題, 作答時請將試題題號及答案依照順序寫在答卷上 ; 限用藍色或黑色筆作答, 使用其他顏色或鉛筆作答者, 所考科目以零分計算 ( 於本試題紙上作答者, 不予計分 ) 一 單選題

More information

研華公司 H 營運成果與財務報告

研華公司 H 營運成果與財務報告 研華公司 2018 1H 營運成果與財務報告 2018 年 8 月 09 日綜合經營管理總經理陳清熙 Eric.chen@advantech.com.tw Safe Harbor Notice This presentation contains forward-looking statements and is subject to risks and uncertainties. Actual

More information

Business Networking Solution. Installation Guide. Auranet Wireless Controller AC500/AC50

Business Networking Solution. Installation Guide. Auranet Wireless Controller AC500/AC50 Business Networking Solution Installation Guide Auranet Wireless Controller AC500/AC50 About this Installation Guide This Installation Guide describes the hardware characteristics, installation methods

More information

Gigabyte and Giga-byte are trademarks of Giga-byte Technology Co., Ltd. Microsoft and Windows XP are trademarks of Microsoft Corporation.

Gigabyte and Giga-byte are trademarks of Giga-byte Technology Co., Ltd. Microsoft and Windows XP are trademarks of Microsoft Corporation. Copyright Feb, 2006 This publication, including all photographs, illustrations and software, is protected under international copyright laws, with all rights reserved. Neither this manual, nor any of the

More information

Thomson Innovation Training

Thomson Innovation Training Thomson Innovation Training NTHU Renee Guan Customer Relationship Manager Tina Chao SOLUTION CONSULTANT April 30, 2015 THOMSON REUTERS TODAY LARGEST PROVIDER OF INTELLIGENT INFORMATION Thomson Reuters

More information

// 範例 4-1: 連結資料庫 (connectdb.php) <?php mysql_connect("localhost", "student", "Asia2013"); mysql_select_db("student");?>

// 範例 4-1: 連結資料庫 (connectdb.php) <?php mysql_connect(localhost, student, Asia2013); mysql_select_db(student);?> // 範例 4-1: 連結資料庫 (connectdb.php) mysql_connect("localhost", "student", "Asia2013"); mysql_select_db("student"); // 範例 4-2: 以 PHP 建立資料表 (gbcreate.php) $aa=" create table gb ( gbprikey integer auto_increment

More information

Port GCC to a new architecture Case study: nds32

Port GCC to a new architecture Case study: nds32 HelloGCC 2013 Port GCC to a new architecture Case study: nds32 2013.11.16 Chung-Ju Wu ( 吳中如 ) www.andestech.com WWW.ANDESTECH.COM Overview of Andes Technology Corporate Highlights Founded in 2005 in Hsinchu

More information

MP3 Codec Design 吳炳飛教授. Chaotic Systems & Signal Processing Lab, CSSP Lab. CSSP Lab:

MP3 Codec Design 吳炳飛教授. Chaotic Systems & Signal Processing Lab, CSSP Lab. CSSP Lab: MP3 Codec Design 吳炳飛教授 國立交通大學 電機與控制工程學系 CSSP Lab: http://cssp.cn.nctu.edu.tw Chaotic Systems & Signal Processing Lab, CSSP Lab July 5, 2004 Chapter 1 Introduction to MP3 Chapter 1: Introduction to MP3

More information

私有雲公有雲的聯合出擊 領先的運算, 儲存與網路虛擬化技術 靈活的計費模式與經濟性 支援廣大的商業應用場景 涵蓋各類型雲服務 類標準的企業資料中心架構 全球規模與快速部署. 聯合設計的解決方案可為客戶提供最佳的 VMware 和 AWS

私有雲公有雲的聯合出擊 領先的運算, 儲存與網路虛擬化技術 靈活的計費模式與經濟性 支援廣大的商業應用場景 涵蓋各類型雲服務 類標準的企業資料中心架構 全球規模與快速部署. 聯合設計的解決方案可為客戶提供最佳的 VMware 和 AWS 私有雲公有雲的聯合出擊 領先的運算, 儲存與網路虛擬化技術 支援廣大的商業應用場景 類標準的企業資料中心架構 靈活的計費模式與經濟性 涵蓋各類型雲服務 全球規模與快速部署 聯合設計的解決方案可為客戶提供最佳的 VMware 和 AWS VMware Cloud on AWS 使用場景 A B C D 雲端遷移資料中心延伸災難備援次世代應用程式 Consolidate Migrate Maintain

More information

C A R I T A S M E D I C A L C E N T R E 明愛醫院 Rev. (A) (B) (C) (D) D A T A A C C E S S R E Q U E S T ( D A R ) 查閱資料要求申請須知

C A R I T A S M E D I C A L C E N T R E 明愛醫院 Rev. (A) (B) (C) (D) D A T A A C C E S S R E Q U E S T ( D A R ) 查閱資料要求申請須知 C A R I T A S M E D I C A L C E N T R E 明愛醫院 Rev. D A T A A C C E S S R E Q U E S T ( D A R ) 查閱資料要求申請須知 18 June 2017 (A) (B) (C) Under normal circumstances, the requested personal data will be sent to

More information