untitled

Similar documents
四川省普通高等学校

untitled

untitled

Powerpoint 2003

untitled

untitled

B3_Unit3   地理資訊的處理:計量分析

untitled

untitled

九十三年第三期檔案管理工作研習營學員建議事項答覆情形彙整表

第一章 簡介

I/O Files讀寫檔案:

untitled

untitled

untitled

untitled

untitled

untitled

untitled

untitled

untitled

1

untitled

untitled

PowerPoint 簡報

untitled

untitled

排灣族

了 立 連 立 量 領 來 例 蘭 便 不 數 不 論 更 更 更 力 更 參 例 來 例 見 量 度 量 量 參 論 量 行 量 量 瑩 理 來 錄 量 量 不 力 省 力 立 力 量 量 量 了 量 便 錄 錄 錄 料 說 省 6

投影片 1

untitled

Visual Basic D 3D

untitled

台灣經濟新報資料庫

untitled

untitled

untitled

公務出國報告

untitled

untitled

untitled

untitled

untitled

國立自然科學博物館館訊第263期

untitled

untitled

untitled

第一場

微處理機實習期末專題

untitled

untitled

臺灣地區的警察教育現況與展望

untitled

untitled

untitled

中華人民共和國殘疾人保障法(2008年修訂)

untitled

行政院國科會九十一年度專題研究

血管內裝置感染管制作業規範

untitled

勞工安全衛生組織管理及自動檢查辦法修正條文對照表(草案)

理 立 立 不 讀 易 不 不 讀 老 1

untitled

個人教室 / 網路硬碟

untitled

untitled

WTO/TBT重要通知

國立陽明大學輻射防護計畫書

untitled

untitled

龍華科技大學

untitled

untitled

untitled

4-04 論文封面(樣式)

行 類 錄 行 類 說...I 行 類 說 A 類 林...1 B 類...7 C 類...9 D 類 力...91 E 類...92 六 F 類...96 G 類 零 H 類 I 類 J 類 K 類 金 L 類 不 M 類..

公告99年度全民健康保險醫療給付費用總額及其分配

untitled

untitled

untitled

北 行 禮 北 路 樓 (02) 行 路 路 林 立 北 北 樓 便利 樓 車 車 行 15 聯 車 行 車

自學進修學力鑑定考試職業證照與專科學校類科及筆試科目對照表

untitled

PowerPoint 簡報

untitled

untitled

untitled

untitled

untitled

地方公共服務績效比較評量之探討—標竿學習策略的觀點

untitled

untitled

依據教育部八十九年 月 日臺(八九)技(二)字第 號函

ARBURG Qualitätssicherung AQS 4.0

untitled

大陸黨報集團化發展之研究

untitled

第五章 實例個案

Fuzzy GP

untitled

Transcription:

Visual Basic 2005 (VB.net 2.0) hana@arbor.ee.ntu.edu.tw 立

六 數 串 數數 數 數

串 數

串 數 Len( 串 ) 串 度 Len( 123 )=3 LCase( 串 ) 串 LCase( AnB123 ) anb123 UCase( 串 ) 串 UCase( AnB123 ) ANB123

串 數 InStr([ ], 串 1, 串 2[, ]) 串 2 串 1 不 0 InStr( abcdecd, cd ) 3 InStr(4, abcdecd, cd ) 6

串 數 InStr([ ], 串 1, 串 2[, ]) : CompareMethod.Binary CompareMethod.Text 不 InStr(1, abcd, Cd,vbBinaryCompare) 0 InStr(1, abcd, Cd,vbTextCompare) 3

串 數 Microsoft.VisualBasic.Strings.Left( 串, 度 ) 串 Microsoft.VisualBasic.Strings.Left( test1 test2,5) test1 Microsoft.VisualBasic.Strings.Right( 串, 度 ) 串 Microsoft.VisualBasic.Strings.Right( test1 test2,5) test2 Mid( 串, [, 度 ]) 串 : Mid( test test,6) test Mid( test test,6,3) tes

串 數 (cont d) LTrim( 串 ) : Trim( test ) test RTrim( 串 ) : Trim( test ) test Trim( 串 ) : Trim( test ) test

練 1: email

練 2:

數 數

數 數 Abs Sgn Ceiling Floor Round Fix Int CInt Max Min Exp Pow Sqrt Log Log10 Sin Cos Tan Atan Randomize Rnd 數 數 Math. Math.Abs(-7.6)

數 數 Abs(x) x Math.Abs(69.6) 69.6 Math.Abs(-69.6) 69.6 Sgn(x) x 若 x>0 1 Math.Sgn(9.5) 1 若 x=0 0 Math.Sgn(0) 0 若 x<0-1 Math.Sgn(-7) -1

數 數 數 Ceiling(x) 不 x 數 Math.Ceiling(12.45) 13 Math.Ceiling(-2.3) -2 Floor(x) 不 x 數 Math.Floor (12.45) 12 Math.Floor (-2.3) -3

數 數 數 Round(x) x 數 Math.Round(12.4) 12 Math.Round(-3.5) -4 Fix(x) x 數 數 Fix 不 Math. Fix(9.6) 9 Fix(-9.6) -9

數 數 數 Int(x) 不 x 數 Int 不 Math. Int(9.6) 9 Int(-9.6) -10

數 數 數 CInt( 參數 ) 來 ( 串 ) 數 : *.5 不 CInt(0.4) 0 CInt(0.6) 1 CInt(0.5) 0 CInt(1.5) 2 數

數 數 Max(x y) Math.Max(12 23) 23 Min(x y) Math.Min(12 23) 12

數 數 數 數 Exp(x) e x Math.Exp(1)= 2.71828182845905 Pow(x y) x y Math.Pow(2 3) 8

數 數 Sqrt(x) x Math.Sqrt(16) 4

數 數 數 數 Log(x) 數 Math.Log(10) 2.30258509299405 Log10(x) 10 數 Math.Log10(10) 1

數 數 數 Sin (x) 數 x 度 Math.Sin(30 * Math.PI / 180) Cos(x) x 度 Math.Cos(60 * Math.PI / 180) Tan(x) <-> Atan(x) 切 數 x 度 Math.Tan(45 * Math.PI / 180)

數 IsNumeric(expression) 數 數 True 數 False

數 數 亂數 Randomize(x) 亂數 Rnd([x]) Single 亂數 亂數 1 零

數 數 亂數 亂數 1 100 數 Int(((100-1)+1)*Rnd()+1) Int((( - )+1)*Rnd()+ )

InputBox(,[ ],[ ] ) 串 = InputBox( ) Dim InRes As String InRes = InputBox(,, )

練 : 數

MsgBox(,[ ],[ ]) MsgBox( Nice to meet you! )

- 類 MsgBoxStyle.OKOnly MsgBoxStyle.OKCancel MsgBoxStyle.AbortRetryIgnore MsgBoxStyle.YesNoCancel MsgBoxStyle.YesNo MsgBoxStyle.RetryCancel 0 1 2 3 4 5 略

- MsgBoxStyle.DefaultButton1 MsgBoxStyle.DefaultButton2 MsgBoxStyle.DefaultButton3 MsgBoxStyle.DefaultButton4 0 256 512 768

- MsgBoxStyle.Critical MsgBoxStyle.Question MsgBoxStyle.Exclamation MsgBoxStyle.Information 16 32 48 64

類 + + MsgBox( Do you like me?, 4+64+0) MsgBox( Nice to meet you! ) Dim ans as integer ans = MsgBox( Do you like me?, 4+64+0)

MsgBoxResult.OK MsgBoxResult.Cancel MsgBoxResult.Abort MsgBoxResult.Retry MsgBoxResult.Ignore MsgBoxResult.Yes MsgBoxResult.No 1 2 3 4 5 6 7

練 : 數 +?

數 Day Month Year Today MonthName Hour Minute Second Now WeekDayName

數 Today: Today 2000/10/20 Now: Now 2000/10/20 12:59:30

數 (cont d) 年 Year(Date 數 ) Month(Date 數 ) Day(Date 數 )

數 (cont d) Hour(Date 數 ) Minute(Date 數 ) Second(Date 數 )

數 (cont d) Weekday( 數 [, ]) Weekday(Today()) 6 FirstDayOfWeek.Sunday FirstDayOfWeek.Monday FirstDayOfWeek.Tuesday FirstDayOfWeek.Wednesday FirstDayOfWeek.Thursday FirstDayOfWeek.Friday FirstDayOfWeek.Saturday

數 IsDate(Expression)

(Timer) 拉 Interval Interval 0 不 Timer Tick 理 行

Private Sub Form1_Load Timer1.Interval = 1000 Timer1.Enabled = True End Sub Private Sub Timer1_Tick Static count As Integer count = count + 1 Label1.Text = count End Sub

練 : 數 +

~