跑馬燈

這是跑馬燈範例請在版面配置/跨欄區/新增小工具/新增HTML/JavaScript程式/程式內容:<左括弧marquee>右括弧  跑馬燈燈文字

VB程式設計作業

VB程式設計作業
於VB執行表單畫面 / Print Screen / 到PhotoImpact:貼上 / 儲存圖片 / 將圖片上傳至google雲端相簿 / 回Google Blogger / 網頁 / 新網頁 / 插入圖片。
將VB表單程式碼複製到新網頁之中.

1.家庭用電計算:

原始碼:
Private Sub Command1_Click()
    Dim fee As Single, degree As Single 'fee代表計算出的電價  degree用電度數
    degree = Val(txtDegree)
    If optHome.Value = True Then
        Call Home(degree, fee)
    Else
        Call Business(degree, fee)
    End If
    lelFee = fee
End Sub

Sub Home(d As Single, f As Single)
    Select Case d
        Case Is <= 100
            f = 2.4 * d
        Case Is <= 300
            f = 2.4 * 100 + 3.1 * (d - 100)
        Case Else
            f = 2.4 * 100 + 3.1 * 200 + 4.1 * (d - 300)
        End Select
End Sub
Sub Business(d As Single, f As Single)
    If d <= 300 Then
        f = 5.9 * d
    Else
        f = 5.9 * 300 + 6.7 * (d - 300)
    End If
End Sub

Private Sub Command2_Click()
    End
End Sub

Private Sub Form_Load()
    optHome.Value = True
End Sub



沒有留言:

張貼留言