|登录 |注册

楼主: 毛毛小子
打印 上一主题 下一主题

Visual Basic 疑问

[复制链接]

回复 #19 Super-Tomato 的帖子

Anything~~!
2009-1-22 04:25 PM
你误解了吧,我是说他的code

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

这是第一个button的功能,
我要做多一个button,功能是把x的数字换掉,每按一次就会变,然后第一个button的功能可以运作
KenXML
2009-1-23 04:23 PM
who cann teach me vb ??
Super-Tomato
2009-1-23 05:23 PM
原帖由 Anything~~! 于 2009-1-22 04:25 PM 发表
你误解了吧,我是说他的code

private sub cmd1_click()

这是第一个button的功能,
我要做多一个button,功能是把x的数字换掉,每按一次就会变,然后第一个button的功能可以运作



那麼首先你是否學過 VB??? 你所創建的另外一個 button event 和第一個 button 的 event 有甚麼關係呢??

回复 #22 KenXML 的帖子

goodhermit95
2009-1-23 09:52 PM
我要学!教教我!我要做Dota外挂!我要做3D game!
Jay1515Jay
2009-1-24 11:58 PM
原帖由 KenXML 于 2009-1-23 04:23 PM 发表
who cann teach me vb ??

是给人教就会全部人都是programmer咯
要自己研究和找google d
新手不用人家教的不用很多方法
google就懂了

按这里看Google搜索技巧

[ 本帖最后由 Jay1515Jay 于 2009-1-25 12:04 AM 编辑 ]
毛毛小子
2009-1-26 08:32 PM
我想请教下:
怎样Convert celcius 去 fahrenheit

回复 #26 毛毛小子 的帖子

goodhermit95
2009-1-26 08:39 PM
http://www.albireo.ch/temperatureconverter/formula.htm


  1. if isnumeric(textbox1.text) and isnumeric(textbox2.text) Then
  2. Dim C as integer = Textbox1.Text * 10 'Textbox1.Text as C , *10 to avoid have x.5
  3. C=5/9(F-32)
  4. label1.text = C 'f,label1.text as output
复制代码

回复 #27 goodhermit95 的帖子

毛毛小子
2009-1-27 01:08 AM
谢谢你~
我试试看先
毛毛小子
2009-1-28 06:22 PM
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 <> ""


If strFTemp <> == Then  这行的==那里错,我放variable在==后面也错,删掉==也错。>"<

回复 #27 goodhermit95 的帖子

毛毛小子
2009-1-28 06:45 PM
你的那个If IsNumeric(TextBox1.Text) And IsNumeric(textbox2.text) Then要不要declare的?
我declare IsNumeric as 什么什么的,不可以用。
您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2025-12-31 09:09 PM , Processed in 0.093217 second(s), 26 queries .

Powered by Discuz! X2.5 © 2001-2012 Comsenz Inc.

本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved

Dedicated Server powered by iCore Technology Sdn. Bhd.

合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部