SlideShare a Scribd company logo
1 of 7
1. 標籤 Label
3. 框架
frame
Caption
6. 文字盒 Text-
Box
Multiline
text
4. 選項鈕 Option Button
Caption
Value
單選
5. 影像盒 image
box
Picture
Stretch
核取盒 Check
Box
Caption
Value
複選
7. 水平捲軸 Hscroll-
Bar
Max Min
1. 標籤 Label
Private Sub Option4_Click()
text1.ForeColor = RGB(255, 0, 0)
End Sub
Private Sub Option5_Click()
text1.ForeColor = RGB(0, 255, 0)
End Sub
Private Sub Option6_Click()
text1.ForeColor = RGB(0, 0, 255)
End Sub
文字紅
色
文字綠
色
文字藍
色
Private Sub Option2_Click()
text1.Font.Size = 24
End Sub
Private Sub Option3_Click()
text1.Font.Size = 36
End Sub
大小 12
大小 24
大小 36
Private Sub Option1_Click()
text1.Font.Size = 12
End Sub
Text1.text = " "清除
定 方法一 Red Green Blue
, 綠  , 藍  ) 0 表示不要 , 255 表示倒
IF ….. THEN 之三種程式語
法1. IF 條件 Then 行
動 1
2.
IF 條件
Then
行動 1
行動 2
.
.
End IF
3. IF 條件 Then
行動 1
ELSE
行動 2
END IF
Private Sub Check1_Click( )
If Check1.Value Then
Text1.Font.Bold = True
Else
Text1.Font.Bold = False
End If
End Sub
If W > S Then
Print " 肥豬 , 該減肥了 "
Picture1.Visible = True
End If
Private Sub Check1_Click( )
If Check1.Value Then
Text1.Font.Bold = True
Else
Text1.Font.Bold = False
End If
End Sub
Private Sub Check2_Click( )
If Check2.Value Then
Text1.Font.Italic = True
Else
Text1.Font.Italic = False
End If
End Sub
粗
體
斜體
Private Sub Check3_Click( )
If Check3.Value Then
Text1.Font.Underline = True
Else
Text1.Font.Underline = False
End If
End Sub
True 1
False 0
成績計算方式
50 分 ( 文字大小   , 文字顏色  ,
清除 )
+10 分    粗體 斜體 加底線
+10 分 圖片 隱藏 顯示 ( 用影像盒 Image Box 實
作 )
+10 分 加上  控制表單背景顏色的水平捲軸    
VB 顏色設定 方法一
RGB( 紅  , 綠  , 藍  ) 0 表示不要 , 255 表示倒
全部
             0~255 0~255 0~255
VB 顏色設定 方法二
 QBColor(N)
N 為 0~15
0 黑   1 藍   2 綠    3 灰藍     4 紅     5 紫 6 棕   7 灰  
8 深灰
9 寶藍   10 淺綠   11 淺藍 12 淺紅   13 淺紫    14 黃    15
白
顯示 image1.visible = True
隱藏 image1.visible = False
換圖 Image1.picture = image2.picture
Picture1 Picture2
Picture3
用來暫存圖片
Picture3.picture = picture1.picture
Picture1.picture = picture2.picture
Picture2.picture = picture3.picture
1
2
3
控制—表單背景顏色 - - 的水平捲軸 ,
須先設定捲軸屬性 Max =15 , Min =0
Form1.BackColor = QBColor( HscroLL1.value)
------------------------------------------------------
控制 -- 文字大小 -- 的水平捲軸 ,
須先設定捲軸屬性 Max=72 , Min=8
Text1.Font.Size = HscroLL2.value
VB 顏色設定 方法二
 QBColor(N)
N 為 0~15
0 黑   1 藍   2 綠    3 灰藍     4 紅     5 紫 6 棕   7 灰   8 深灰
9 寶藍   10 淺綠   11 淺藍 12 淺紅   13 淺紫    14 黃    15 白義峰是大帥哥 "

More Related Content

Viewers also liked

Building Social Media for Educators
Building Social Media for EducatorsBuilding Social Media for Educators
Building Social Media for EducatorsLisa Cohen
 
NFV Architectural Framework
NFV Architectural FrameworkNFV Architectural Framework
NFV Architectural FrameworkSeung-Hoon Baek
 
GraphLab Conference 2014 Yucheng Low - Scalable Data Structures: SFrame & SGr...
GraphLab Conference 2014 Yucheng Low - Scalable Data Structures: SFrame & SGr...GraphLab Conference 2014 Yucheng Low - Scalable Data Structures: SFrame & SGr...
GraphLab Conference 2014 Yucheng Low - Scalable Data Structures: SFrame & SGr...Turi, Inc.
 
SERVICES PRICING REVIEW-2
SERVICES PRICING REVIEW-2SERVICES PRICING REVIEW-2
SERVICES PRICING REVIEW-2Jesper Hansson
 
School department
School departmentSchool department
School department怡安 陳
 

Viewers also liked (7)

Building Social Media for Educators
Building Social Media for EducatorsBuilding Social Media for Educators
Building Social Media for Educators
 
Tepsi
Tepsi Tepsi
Tepsi
 
NFV Architectural Framework
NFV Architectural FrameworkNFV Architectural Framework
NFV Architectural Framework
 
GraphLab Conference 2014 Yucheng Low - Scalable Data Structures: SFrame & SGr...
GraphLab Conference 2014 Yucheng Low - Scalable Data Structures: SFrame & SGr...GraphLab Conference 2014 Yucheng Low - Scalable Data Structures: SFrame & SGr...
GraphLab Conference 2014 Yucheng Low - Scalable Data Structures: SFrame & SGr...
 
SERVICES PRICING REVIEW-2
SERVICES PRICING REVIEW-2SERVICES PRICING REVIEW-2
SERVICES PRICING REVIEW-2
 
School department
School departmentSchool department
School department
 
Stereotypes..
Stereotypes..Stereotypes..
Stereotypes..
 

作業2

  • 1. 1. 標籤 Label 3. 框架 frame Caption 6. 文字盒 Text- Box Multiline text 4. 選項鈕 Option Button Caption Value 單選 5. 影像盒 image box Picture Stretch 核取盒 Check Box Caption Value 複選 7. 水平捲軸 Hscroll- Bar Max Min 1. 標籤 Label
  • 2. Private Sub Option4_Click() text1.ForeColor = RGB(255, 0, 0) End Sub Private Sub Option5_Click() text1.ForeColor = RGB(0, 255, 0) End Sub Private Sub Option6_Click() text1.ForeColor = RGB(0, 0, 255) End Sub 文字紅 色 文字綠 色 文字藍 色 Private Sub Option2_Click() text1.Font.Size = 24 End Sub Private Sub Option3_Click() text1.Font.Size = 36 End Sub 大小 12 大小 24 大小 36 Private Sub Option1_Click() text1.Font.Size = 12 End Sub Text1.text = " "清除 定 方法一 Red Green Blue , 綠  , 藍  ) 0 表示不要 , 255 表示倒
  • 3. IF ….. THEN 之三種程式語 法1. IF 條件 Then 行 動 1 2. IF 條件 Then 行動 1 行動 2 . . End IF 3. IF 條件 Then 行動 1 ELSE 行動 2 END IF Private Sub Check1_Click( ) If Check1.Value Then Text1.Font.Bold = True Else Text1.Font.Bold = False End If End Sub If W > S Then Print " 肥豬 , 該減肥了 " Picture1.Visible = True End If
  • 4. Private Sub Check1_Click( ) If Check1.Value Then Text1.Font.Bold = True Else Text1.Font.Bold = False End If End Sub Private Sub Check2_Click( ) If Check2.Value Then Text1.Font.Italic = True Else Text1.Font.Italic = False End If End Sub 粗 體 斜體 Private Sub Check3_Click( ) If Check3.Value Then Text1.Font.Underline = True Else Text1.Font.Underline = False End If End Sub True 1 False 0 成績計算方式 50 分 ( 文字大小   , 文字顏色  , 清除 ) +10 分    粗體 斜體 加底線 +10 分 圖片 隱藏 顯示 ( 用影像盒 Image Box 實 作 ) +10 分 加上  控制表單背景顏色的水平捲軸    
  • 5. VB 顏色設定 方法一 RGB( 紅  , 綠  , 藍  ) 0 表示不要 , 255 表示倒 全部              0~255 0~255 0~255 VB 顏色設定 方法二  QBColor(N) N 為 0~15 0 黑   1 藍   2 綠    3 灰藍     4 紅     5 紫 6 棕   7 灰   8 深灰 9 寶藍   10 淺綠   11 淺藍 12 淺紅   13 淺紫    14 黃    15 白 顯示 image1.visible = True 隱藏 image1.visible = False 換圖 Image1.picture = image2.picture
  • 6. Picture1 Picture2 Picture3 用來暫存圖片 Picture3.picture = picture1.picture Picture1.picture = picture2.picture Picture2.picture = picture3.picture 1 2 3
  • 7. 控制—表單背景顏色 - - 的水平捲軸 , 須先設定捲軸屬性 Max =15 , Min =0 Form1.BackColor = QBColor( HscroLL1.value) ------------------------------------------------------ 控制 -- 文字大小 -- 的水平捲軸 , 須先設定捲軸屬性 Max=72 , Min=8 Text1.Font.Size = HscroLL2.value VB 顏色設定 方法二  QBColor(N) N 為 0~15 0 黑   1 藍   2 綠    3 灰藍     4 紅     5 紫 6 棕   7 灰   8 深灰 9 寶藍   10 淺綠   11 淺藍 12 淺紅   13 淺紫    14 黃    15 白義峰是大帥哥 "