VB程序編寫,VB程式編寫

2023-02-16 07:00:41 字數 963 閱讀 2004

1樓:象棋佈局教學

新增兩個控制元件,一個按鈕,一個label1控制元件陣列,label1(0),label1(1),**:

private sub form_load()pi = 3.14159265358979end sub

private sub text1_change()label1(0).caption = "sin" & text1.text & "=" & round(sin((val(text1.

text)) * 3.14159263579893 / 180), 4) & space(2) & "cos" & text1.text & "=" & round(cos((val(text1.

text)) * 3.14159263579893 / 180), 4)

label1(1).caption = "tan" & text1.text & "=" & round(tan((val(text1.

text)) * 3.14159263579893 / 180), 4) & space(2) & "cot" & text1.text & "=" & round(1 / (tan((val(text1.

text)) * 3.14159263579893 / 180)), 4)

end sub

2樓:同君銳

以下是計算45度的**。

三個函式可以直接用,但是輸入必須是弧度,不是角度。

dim angle as double

dim theta as double

angle = 45

theta = angle * 3.1415926 / 180text1.text = sin(theta)text2.

text = cos(theta)text3.text = tan(theta)

3樓:

這三個函式都可以直接呼叫啊

用VB編寫程式,用VB編寫一個程式

樓上的,不許要引用吧 option explicit private declare function getdrivetype lib kernel32 alias getdrivetypea byval ndrive as string as long private declare funct...

怎麼編寫VB投票統計程式,怎麼編寫一個VB投票統計程式?

private sub command1 click text1.text val text1.text 1end sub private sub command2 click text2.text val text2.text 1end sub private sub command3 click...

求VB高手 編寫程式,找出10000 99999的所有迴文數

private sub mand1 click dim i as long,j as longdim x1 as long,x2 as longdim str as string dim flag as boolean str 從 10000 到 99999 之間的迴文數有 vbcrlf for i...