原帖由 毛毛小子 于 2009-1-11 07:32 PM 发表
如果我放一个Label,然后把它拉长,如果我要按button(red)然后Label里面的颜色会随着按button而变,需要写什么code进去?
forecolor ?
原帖由 毛毛小子 于 2009-1-12 12:59 AM 发表
哈哈!!
我已经做出来了~~原来很简单而已~~
Public Class ColourLabel1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
...
'textbox1'
'label1'
'command button1'
private sub cmd1_click()
x = 50
y =val(txt1.text)
if y = x then
lbl1.caption="corret"
elseif y <> x then
lbl1.caption="wrong"
end if
end sub
x = 50
y =val(txt1.text)
if y = x then
lbl1.caption="corret"
elseif y <> x then
lbl1.caption="wrong"
end if
end sub
原帖由 Anything~~! 于 2009-1-22 04:25 PM 发表
你误解了吧,我是说他的code
private sub cmd1_click()
这是第一个button的功能,
我要做多一个button,功能是把x的数字换掉,每按一次就会变,然后第一个button的功能可以运作
Dim Ftemp, Celsius As Single
Dim strFTemp As String
Dim Prompt As String = "Enter a Fahrenheit temperature."
Do
strFTemp = InputBox(Prompt, "Fahrenheit to celcius.")
If strFTemp <> == Then
Ftemp = CSng(strFTemp)
Celsius = Int((Ftemp + 40) * 5 / 9 - 40)
MsgBox(Celsius, , "Temperature in Celcius:")
End If
Loop While strFTemp <> ""
userinput = TextBox1.Text
Select Case userinput
Case A = grade >= 75 And grade <= 100
MsgBox("Grade A")
Case B = grade >= 60 And grade <= 74
MsgBox("Grade B")
Case C = grade > 50 And grade <= 59
MsgBox("Grade C")
Case D = grade >= 40 And grade <= 49
MsgBox("Grade D")
Case Else
MsgBox("Fail")
End Select
userinput = TextBox1.Text
Select Case userinput
Case 75 To 100
MsgBox("Grade A")
Case 60 To 74
MsgBox("Grade B")
Case 50 To 59
MsgBox("Grade C")
Case 40 To 49
MsgBox("Grade D")
Case Else
MsgBox("Fail")
End Select
'Calculate Gross Pay Rate.....
GrossPay = WorkedHour * PayRate
Label6.Text = WorkedHour.ToString("N")
Label7.Text = PayRate.ToString("C")
Label8.Text = GrossPay.ToString("C")
'Calculate OverTime Pay Rate.....
If WorkedHour > 35 & WorkedHour < 60 Then
OTPay = (WorkedHour - 35) * (PayRate) * (1.5) + GrossPay
MsgBox(OTPay)
If number < 10 Then
MsgBox("True")
ElseIf number >= 10 Then
MsgBox("False")
Else
MsgBox(" Please Enter Again")
End If
子贡问曰:孔文子何以谓之文也?子曰:敏而好学,不耻下问,是以谓之文也!
所以变成……
毛毛小文子!哈哈哈
ElseIf PayPerHour <= 25 And (WorkHour <= 60 And WorkHour >= 36) Then
OTPay = ((PayPerHour - 35) * PayPerHour) * 1.5
MsgBox("Your Over Time Pay is = +" & OTPay)
原帖由 AhPang 于 2009-2-5 06:23 AM 发表
e-book 要吗?http://ebooks.tipsclub.com/index.php gooddays贴看到的,很不错有很多书。
介绍你这本http://ebooks.tipsclub.com/index.php?act=view&id=750,写得很详细我也正在读。
原帖由 毛毛小子 于 2009-2-23 08:16 PM 发表
问题已解决。。。。
我知道怎么弄到了。。。
就随手玩玩然后就变出来
可是要怎样才可以弄到像那种Installation一样的em0010
欢迎光临 JBTALKS.CC (https://jbtalks.my/) | Powered by Discuz! X2.5 |