1 / 21

程式設計 Visual Basic 6.0

程式設計 Visual Basic 6.0. 許翠婷 E-mail : tsuiting@scu.edu.tw. 輸入. Width. 文字方塊( text ) txt Text Caption MaxLength PasswordChar Locked MultiLine ScrollBars Height Width. ScaleWidth. ScaleHeight. Height. 輸入. 單選選擇鈕( OptionButton ) opt Caption Value ( Boolean ) 架框( Frame ) fra

Télécharger la présentation

程式設計 Visual Basic 6.0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 程式設計Visual Basic 6.0 許翠婷 E-mail : tsuiting@scu.edu.tw

  2. 輸入 Width • 文字方塊(text) txt • Text • Caption • MaxLength • PasswordChar • Locked • MultiLine • ScrollBars • Height • Width ScaleWidth ScaleHeight Height

  3. 輸入 • 單選選擇鈕(OptionButton)opt • Caption • Value(Boolean) • 架框(Frame)fra • Caption • Width • Height

  4. 輸入 • 核取方塊(CheckBox)chk • Caption • Alignment • Value(1) • 清單方塊(ListBox)lst • List • Text • ListIndex • MultiSelect • Sorted • ListCount • Colums • Selcount • Style • Clear • AddItem Data,Index • RemoveItem Index 0 1 2 3

  5. 輸入 • 下拉式方塊(ComboBox)cbo • Style • 0.DropDown Combo • 1. simple Combo • 2.DropDown List • List • Text • ListIndex • MultiSelect • Sorted • ListCount • Clear • AddItem Data,Index • RemoveItem Index

  6. 調色盤

  7. VB 的色彩 • 標準 RGB 色彩的有效範圍是 0到 16,777,215,由四個Byte 組成。 • 最高位元組為0或80(16進位)。 • 其餘從最高位元組到最低位元組依次決定 • 藍( &H00FF0000 ) • 綠( &H0000FF00 ) • 紅( &H000000FF)

  8. 色彩

  9. VB 的色彩 • 系統顏色(&H80000005、vbWindowBackground)【系統色彩常數】 • 紅、綠和藍的成分,分別由一個介於 0 與 255 (&HFF) 之間的數目來表示。 • 可使用 • 數值(&H00FF00FF ) • 常數( vbMagenta ) • 函數(QBColor(13) 、RGB(255,0,255)) 表示之。(P 14-4、14-5)

  10. 捲軸(scroll Bar) • 輸入數值 • 限制範圍 • 垂直捲軸(Vertical Scroll Bar)vsb • 水平捲軸(Horizontal Scroll Bar)hsb 快捲區 捲動鈕 微動鈕

  11. 捲軸(scroll Bar) • 屬性 • LargeChange 快捲區 • Max(-32768 ~ 32767) • Min( -32768 ~ 32767 ) • SmallChange 微動鈕 • Value

  12. 捲軸(scroll Bar) • 事件 • Scroll • 移動捲動鈕時觸動 • Change • 移動微動鈕時觸動。 • Value 改變時觸動。

  13. 設計簡單小畫家功能表

  14. 功能表(Menu Bar) • 定義 • 所有選單(MENU)的集合。 • 每個選單內都有多個功能選項(Menu Item) • 無功能選項選單(MENU)! • 有副選單(MENU) • 選單(MENU) • 三個小點(…)-啟動對話方塊

  15. 設計功能表 • 「工具」「功能表編輯器」 • 新增選單 • 新增選項 • 新增副選單 • 新增分隔線 標題 - • 設定「選取鍵」(Access Key) Alt • 設定「快速鍵」(Accelerator)Ctrl • 屬性 • Enabled • Checked • Visible

  16. 設計進階小畫家功能表

  17. 再談表單屬性 • BackColor: 可設定用來繪製表單或控制項的背景色彩。 • ForeColor: 可設定在表單或控制項中,透過繪圖方法所 建立的文字或圖形色彩。 • DrawWidth: 繪圖相關方法所使用的直線寬度

  18. 畫線 • 事件 • Mousemove • 方法 Line -(x,y)

  19. 修改簡易小畫家表單

  20. 作業 • P8-59 第2題 • P8-60 第5題 • 以功能表改寫課堂練習之記事本,使其選擇項目前出現核取式

More Related