2019年4月28日 星期日

點餐系統Order



Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim total As Integer
        total = 120 * Val(TextBox1.Text) + 150 * Val(TextBox2.Text) + 180 * Val(TextBox3.Text)

        If RadioButton1.Checked Then
            total = total * 0.9
        ElseIf RadioButton2.Checked Then
            total = total * 0.85
        ElseIf RadioButton3.Checked Then
            total = total * 0.8
        End If

        Label6.Text = total

    End Sub

End Class

全域變數、區域變數

全域變數
是在所有作用域都可存取的變數,與之對應的是區域變數
通常,使用不必要的全域變數被認為是壞習慣,
這正是由於全域變數的非局部性:全域變數可能被從任何地方修改
(除非位於保護記憶體中),也可能被任何地方所依賴。
於是全域變數便擁有了建立相互依存關係的無限可能,
而互相依存關係的建立會使得複雜度增加。
PS:然而,在少數情況下是適合使用全域變數的。
  例如,可以通過全域變數的使用來避免
  常用變數在一系列函式間的頻繁傳遞。


Call by Value、Call by Adress(Call by Value of Pointer)、Call by Reference

傳值(Call By Value)
  參數以數值方式傳遞,複製一份參數值,
  到被呼叫的副程式予以使用。
PS:把參數值傳到另一個記憶體位置的值。



傳址 (Call By Adress)(Call by value of pointer)
  將參數以記憶體位置的方式傳到被呼叫的副程式,
  副程式需要有一個指標來指到這個參數的記憶體位置,
  但call by addres本質上也是call by value,
  只不過那個value剛好就是address而已。
PS:是把"記憶體位置"傳到 另一個"記憶體位置"的值
  ("Call By Adress")是不正統的說法,其實傳址也是傳值, 
  只是傳的是"記憶體位置"。



傳參考(Call By Reference)
  將參數以數值的方式傳遞到被呼叫的副程式,
  副程式需要有一個參考來接收這個參數。
  是把記憶體位置傳到另一個記憶體位置上 (可看作同一個物件)。
PS:因為call by address的內容為指向的位置,
  所以傳址的指標本身然仍然有記憶體位置。
  但是傳參考是不會有的,這也是和call by address之間的差別。

2019年4月22日 星期一

調色盤ColorV11



Public Class Form1

    Dim R As Integer
    Dim G As Integer
    Dim B As Integer
    Dim A As Integer

    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
        R = TrackBar1.Value
        Call SetColor()
    End Sub

    Private Sub TrackBar2_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar2.Scroll
        G = TrackBar2.Value
        Call SetColor()
    End Sub

    Private Sub TrackBar3_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar3.Scroll
        B = TrackBar3.Value
        Call SetColor()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        R = Val(InputBox("請輸入紅色", "紅", 128))
        G = Val(InputBox("請輸入綠色", "綠", 128))
        B = Val(InputBox("請輸入藍色", "藍", 128))
        Call SetColor()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        R = Val(TextBox1.Text)
        G = Val(TextBox2.Text)
        B = Val(TextBox3.Text)
        Call SetColor()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        A = MsgBox("您的色彩有" + "  紅色=" & R & "  綠色=" & G & "  藍色=" & B, MsgBoxStyle.YesNo + MsgBoxStyle.Information, "調色盤")
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        R = TrackBar1.Value + 10
        Call SetColor()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        R = TrackBar1.Value + 1
        Call SetColor()
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        R = TrackBar1.Value - 1
        Call SetColor()
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        R = TrackBar1.Value - 10
        Call SetColor()
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        G = TrackBar2.Value + 10
        Call SetColor()
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        G = TrackBar2.Value + 1
        Call SetColor()
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        G = TrackBar2.Value - 1
        Call SetColor()
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        G = TrackBar2.Value - 10
        Call SetColor()
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
        B = TrackBar3.Value + 10
        Call SetColor()
    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        B = TrackBar3.Value + 1
        Call SetColor()
    End Sub

    Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
        B = TrackBar3.Value - 1
        Call SetColor()
    End Sub

    Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
        B = TrackBar3.Value - 10
        Call SetColor()
    End Sub

    Sub SetColor()
        If R > 255 Then
            R = 255
        ElseIf R < 0 Then
            R = 0
        End If
        If G > 255 Then
            G = 255
        ElseIf G < 0 Then
            G = 0
        End If
        If B > 255 Then
            B = 255
        ElseIf B < 0 Then
            B = 0
        End If

        TrackBar1.Value = R
        TrackBar2.Value = G
        TrackBar3.Value = B

        HScrollBar1.Value = R
        HScrollBar2.Value = G
        HScrollBar3.Value = B

        VScrollBar1.Value = R
        VScrollBar2.Value = G
        VScrollBar3.Value = B


        Label1.Text = R
        Label2.Text = G
        Label3.Text = B

        TextBox1.Text = R
        TextBox2.Text = G
        TextBox3.Text = B

        PictureBox1.BackColor = Color.FromArgb(R, 0, 0)
        PictureBox2.BackColor = Color.FromArgb(0, G, 0)
        PictureBox3.BackColor = Color.FromArgb(0, 0, B)

        PictureBox4.BackColor = Color.FromArgb(R, G, B)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        R = TrackBar1.Value
        G = TrackBar2.Value
        B = TrackBar3.Value
        Call SetColor()
    End Sub

    Private Sub HScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar1.Scroll
        R = HScrollBar1.Value
        Call SetColor()
    End Sub

    Private Sub HScrollBar2_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar2.Scroll
        G = HScrollBar2.Value
        Call SetColor()
    End Sub

    Private Sub HScrollBar3_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar3.Scroll
        B = HScrollBar3.Value
        Call SetColor()
    End Sub

    Private Sub VScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles VScrollBar1.Scroll
        R = VScrollBar1.Value
        Call SetColor()
    End Sub

    Private Sub VScrollBar2_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles VScrollBar2.Scroll
        G = VScrollBar2.Value
        Call SetColor()
    End Sub

    Private Sub VScrollBar3_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles VScrollBar3.Scroll
        B = VScrollBar3.Value
        Call SetColor()
    End Sub
End Class

利用Enter鍵,移至下個欄位。(TabIndex)

    Private Sub TextBox2_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox2.KeyDown
        If e.KeyCode = 13 Then
            My.Computer.Keyboard.SendKeys("{TAB}", True)
        End If
    End Sub

(TabIndex)

2019年4月16日 星期二

資料結構:堆疊、佇列

資料結構:

stack 堆疊:FiLo、LiFo。
         先進后出 、   后進先出。
       (FILO, First-In-Last-Out)(LIFO, Last-In-First-Out)

queue 佇列:FiFo、LiLo。
         先進先出 、   后進后出。
       (FIFO, First-In-First-Out)(LILO, Last-In-Last-Out)

副程式的使用時機和目的

副程式的使用時機和目的

  時機:      目的:
一、程式碼重複。 一、提高程式一致性。
二、獨立功能。  二、提高主程式閱讀性。
           (簡潔、好理解、好閱讀)

DeBug

一、語法錯誤。
二、語意錯誤。(邏輯錯誤)
三、執行階段錯誤。

2019年4月11日 星期四

調色盤ColorV10



Public Class Form1

    Dim R As Integer
    Dim G As Integer
    Dim B As Integer
    Dim A As Integer

    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
        R = TrackBar1.Value
        Call SetColor()
    End Sub

    Private Sub TrackBar2_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar2.Scroll
        G = TrackBar2.Value
        Call SetColor()
    End Sub

    Private Sub TrackBar3_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar3.Scroll
        B = TrackBar3.Value
        Call SetColor()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        R = val(InputBox("請輸入紅色", "紅", 128))
        G = val(InputBox("請輸入綠色", "綠", 128))
        B = val(InputBox("請輸入藍色", "藍", 128))
        Call SetColor()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        R = Val(TextBox1.Text)
        G = Val(TextBox2.Text)
        B = Val(TextBox3.Text)
        Call SetColor()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        A = MsgBox("您的色彩有" + "  紅色=" & R & "  綠色=" & G & "  藍色=" & B, MsgBoxStyle.YesNo + MsgBoxStyle.Information, "調色盤")
    End Sub
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        R = TrackBar1.Value + 10
        Call SetColor()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        R = TrackBar1.Value + 1
        Call SetColor()
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        R = TrackBar1.Value - 1
        Call SetColor()
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        R = TrackBar1.Value - 10
        Call SetColor()
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        G = TrackBar2.Value + 10
        Call SetColor()
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        G = TrackBar2.Value + 1
        Call SetColor()
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        G = TrackBar2.Value - 1
        Call SetColor()
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        G = TrackBar2.Value - 10
        Call SetColor()
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
        B = TrackBar3.Value + 10
        Call SetColor()
    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        B = TrackBar3.Value + 1
        Call SetColor()
    End Sub

    Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
        B = TrackBar3.Value - 1
        Call SetColor()
    End Sub

    Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
        B = TrackBar3.Value - 10
        Call SetColor()
    End Sub

    Sub SetColor()
        If R > 255 Then
            R = 255
        ElseIf R < 0 Then
            R = 0
        End If

        If G > 255 Then
            G = 255
        ElseIf G < 0 Then
            G = 0
        End If

        If B > 255 Then
            B = 255
        ElseIf B < 0 Then
            B = 0
        End If

        TrackBar1.Value = R
        TrackBar2.Value = G
        TrackBar3.Value = B

        Label1.Text = R
        Label2.Text = G
        Label3.Text = B

        TextBox1.Text = R
        TextBox2.Text = G
        TextBox3.Text = B

        PictureBox1.BackColor = Color.FromArgb(R, 0, 0)
        PictureBox2.BackColor = Color.FromArgb(0, G, 0)
        PictureBox3.BackColor = Color.FromArgb(0, 0, B)

        PictureBox4.BackColor = Color.FromArgb(R, G, B)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        R = TrackBar1.Value
        G = TrackBar2.Value
        B = TrackBar3.Value
  Call SetColor()
    End Sub

End Class

調色盤ColorV9



Public Class Form1

    Dim R As Integer
    Dim G As Integer
    Dim B As Integer
    Dim A As Integer

    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
        R = TrackBar1.Value
        Call SetColor(R, G, B)
    End Sub

    Private Sub TrackBar2_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar2.Scroll
        G = TrackBar2.Value
        Call SetColor(R, G, B)
    End Sub

    Private Sub TrackBar3_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar3.Scroll
        B = TrackBar3.Value
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        R = val(InputBox("請輸入紅色", "紅", 128))
        G = val(InputBox("請輸入綠色", "綠", 128))
        B = val(InputBox("請輸入藍色", "藍", 128))
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        R = Val(TextBox1.Text)
        G = Val(TextBox2.Text)
        B = Val(TextBox3.Text)
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        A = MsgBox("您的色彩有" + "  紅色=" & R & "  綠色=" & G & "  藍色=" & B, MsgBoxStyle.YesNo + MsgBoxStyle.Information, "調色盤")
    End Sub
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        R = TrackBar1.Value + 10
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        R = TrackBar1.Value + 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        R = TrackBar1.Value - 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        R = TrackBar1.Value - 10
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        G = TrackBar2.Value + 10
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        G = TrackBar2.Value + 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        G = TrackBar2.Value - 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        G = TrackBar2.Value - 10
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
        B = TrackBar3.Value + 10
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        B = TrackBar3.Value + 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
        B = TrackBar3.Value - 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
        B = TrackBar3.Value - 10
        Call SetColor(R, G, B)
    End Sub

    Sub SetColor(ByRef R As Integer, ByRef G As Integer, ByRef B As Integer)
        If R > 255 Then
            R = 255
        ElseIf R < 0 Then
            R = 0
        End If

        If G > 255 Then
            G = 255
        ElseIf G < 0 Then
            G = 0
        End If

        If B > 255 Then
            B = 255
        ElseIf B < 0 Then
            B = 0
        End If

        TrackBar1.Value = R
        TrackBar2.Value = G
        TrackBar3.Value = B

        Label1.Text = R
        Label2.Text = G
        Label3.Text = B

        TextBox1.Text = R
        TextBox2.Text = G
        TextBox3.Text = B

        PictureBox1.BackColor = Color.FromArgb(R, 0, 0)
        PictureBox2.BackColor = Color.FromArgb(0, G, 0)
        PictureBox3.BackColor = Color.FromArgb(0, 0, B)

        PictureBox4.BackColor = Color.FromArgb(R, G, B)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        R = TrackBar1.Value
        G = TrackBar2.Value
        B = TrackBar3.Value
  Call SetColor()
    End Sub
End Class

調色盤ColorV8



Public Class Form1
    Dim R As Integer
    Dim G As Integer
    Dim B As Integer
    Dim A As Integer
    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
        R = TrackBar1.Value
        G = TrackBar2.Value
        B = TrackBar3.Value
        Call SetColor(R, G, B)
    End Sub

    Private Sub TrackBar2_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar2.Scroll
        R = TrackBar1.Value
        G = TrackBar2.Value
        B = TrackBar3.Value
        Call SetColor(R, G, B)
    End Sub

    Private Sub TrackBar3_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar3.Scroll
        R = TrackBar1.Value
        G = TrackBar2.Value
        B = TrackBar3.Value
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        R = val(InputBox("請輸入紅色", "紅", 128))
        G = val(InputBox("請輸入綠色", "綠", 128))
        B = val(InputBox("請輸入藍色", "藍", 128))
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        R = Val(TextBox1.Text)
        G = Val(TextBox2.Text)
        B = Val(TextBox3.Text)
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        R = TrackBar1.Value
        G = TrackBar2.Value
        B = TrackBar3.Value
        A = MsgBox("您的色彩有" + "  紅色=" & R & "  綠色=" & G & "  藍色=" & B, MsgBoxStyle.YesNo + MsgBoxStyle.Information, "調色盤")
    End Sub
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        R = TrackBar1.Value + 10
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        R = TrackBar1.Value + 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        R = TrackBar1.Value - 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        R = TrackBar1.Value - 10
        Call SetColor(R, G, B)
    End Sub


    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        G = TrackBar2.Value + 10
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        G = TrackBar2.Value + 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        G = TrackBar2.Value - 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        G = TrackBar2.Value - 10
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
        B = TrackBar3.Value + 10
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        B = TrackBar3.Value + 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
        B = TrackBar3.Value - 1
        Call SetColor(R, G, B)
    End Sub

    Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
        B = TrackBar3.Value - 10
        Call SetColor(R, G, B)
    End Sub

    Sub SetColor(ByRef R As Integer, ByRef G As Integer, ByRef B As Integer)
        If R > 255 Then
            R = 255
        ElseIf R < 0 Then
            R = 0
        End If
        If G > 255 Then
            G = 255
        ElseIf G < 0 Then
            G = 0
        End If
        If B > 255 Then
            B = 255
        ElseIf B < 0 Then
            B = 0
        End If

        TrackBar1.Value = R
        TrackBar2.Value = G
        TrackBar3.Value = B

        Label1.Text = R
        Label2.Text = G
        Label3.Text = B

        TextBox1.Text = R
        TextBox2.Text = G
        TextBox3.Text = B

        PictureBox1.BackColor = Color.FromArgb(R, 0, 0)
        PictureBox2.BackColor = Color.FromArgb(0, G, 0)
        PictureBox3.BackColor = Color.FromArgb(0, 0, B)

        PictureBox4.BackColor = Color.FromArgb(R, G, B)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        R = TrackBar1.Value
        G = TrackBar2.Value
        B = TrackBar3.Value
  Call SetColor()
    End Sub
End Class

2019年4月10日 星期三

ByetHost網站空間使用方法

申請免費網站空間Byethost程序

Byethost 空間申請教學

Byethost免費虛擬主機申請方法及FTP軟體FileZilla上傳設定


簡報(投影片)寫作重點

投影片的兩個主要功能:

1. 為聽眾提醒重點。
2. 提醒演說者內容摘要。

投影片寫作重點:

1. 只需要摘要:
 重點是您的演說內容,投影片是您演說的輔助工具。

2. 不要逐字朗讀:
 您是在作演說,是要說明您的想法,不是朗讀比賽。

3. 投影片內容優先次序:
 A. 照片、圖片……。
 B. 統計報表、統計圖表……。
 C. 條列式摘要。

4. 請尊重智慧財產權。

5. 引用他人資料,請註明出處。

6. 引用資料,最好用自己的語言重新描述,
 并請註明引用出處。
 PS:請在合理的範圍引用,不要超越「合理使用」的範圍。

7. 報告前先演練:
 找您的同學、朋友當聽眾,回饋您的演說,以求進步、簡明。

 PS:報告時由教師隨機安排報告次序,
   所以同學應該全程演練,同學互相指導。

參考資料:

專題簡報技巧
http://cs.hccvs.hc.edu.tw/~hsieh/Thesis/powerpoint_introduction.ppt

口語表達好還要更好-記住神奇的魔術數字
http://case.104.com.tw/knowledge/detail.cfm?kno=132

TED教你馬上用得到的10個簡報製作技巧
http://tedxtaipei.com/articles/10_tips_for_slide/

商業簡報製作技巧 | 丟掉傳統表格,簡易上手的簡報表格美學三大訣竅
http://andyliuonline.com/keynote-ppt-skills-beautiful-table/

中學生小論文寫作 成功的PPT製作技巧
http://finder.lonchun.com.tw/books/chjhs07/1/pdf/source/14720077822923.pdf

Power Point的重點-研究生求生法則
http://blog.duncan.idv.tw/blogs/index.php?title=power_pointc_e_er_if_cn_ccpc_ap_c_as_a&more=1&c=1&tb=1&pb=1

簡報範例大全!10個網站幫你做出完美簡報
http://www.businessweekly.com.tw/article.aspx?id=3686&type=Blog

如何作一個好的口頭報告
http://dolphinwing.pixnet.net/blog/post/27735066-%5B%E6%96%87%E7%AB%A0%5D-%E5%A6%82%E4%BD%95%E4%BD%9C%E4%B8%80%E5%80%8B%E5%A5%BD%E7%9A%84%E5%8F%A3%E9%A0%AD%E5%A0%B1%E5%91%8A


程式設計作業






App Inventor 安裝設定方法、程式範例



App Inventor 安裝設定方法

   作者:亞洲大學資訊多媒體應用學系林致宇 助理教授

App Inventor 程式範例

   作者:亞洲大學資訊多媒體應用學系林致宇 助理教授


Java 8 軟體更新



Installing App Inventor 2 Setup on Windows 安裝程式



程式設計期末報告規範

一、以Google線上文件、LibreOffice、OpenOffice Writer製作文書報告。(作業成績)
二、以Google線上文件、LibreOffice、OpenOffice Impress製作簡報檔。(替代上台報告的平時考成績)
三、執行檔。PS:放在上學期的網站裡。
以上三項分別郵寄到『how.to.doing@gmail.com謝謝您!


軟體開發生命週期(The Systems Development Life Cycle, SDLC)
軟體開發過程分為需求分析(Requirement)、設計(Design)、執行(Implement)、測試(Test)、上線操作部署(Release and Deployment)以及維護(Maintenance)六大階段


A.設定題目:
B.分析問題:
I.探討以電腦解決問題的可行性評估、
II.需求分析(Requirement)、
III.找出輸入輸出的資料項目等。
C.設計(Design)
演算法(Algorithm):就是解決問題方法、步驟、程序、方案。必需符合以上特性:
(一)有限性:在有限的時間、有限的步驛解決問題。
(二)明確性:步驟必須清楚、明確的表達,不可含糊、模稜兩可。
(三)有效性:必須能有效的達成程式的目標、目的。
(四)輸入資料:依程式的需要可能會有輸入資料,或沒有輸入資料。
(五)輸出資料:一定要有有效達成目標的結果呈現。
I.文字敘述
II.流程圖


III.虛擬碼:虛擬碼兼具有文字描述和流程圖的優點,使用類似程式語言的寫法,來描述演算法的過程。


D.撰寫程式以及程式碼加註解
I.編譯(Compile)
II.執行(Execute)  
III.測試(Test)
IV.除錯(Debug)
E.編寫文件:
I.使用者操作手冊
II.技術參考手冊(本次作業就是屬於技術參考手冊)

F.維護(Maintenance)