Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click, Button3.Click
成都創(chuàng)新互聯(lián)服務(wù)項(xiàng)目包括疏附網(wǎng)站建設(shè)、疏附網(wǎng)站制作、疏附網(wǎng)頁(yè)制作以及疏附網(wǎng)絡(luò)營(yíng)銷策劃等。多年來(lái),我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,疏附網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到疏附省份的部分城市,未來(lái)相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!
TextBox1.Text = sender.Text
End Sub
僅供參考~
using?System;
using?System.Windows.Forms;
namespace?WindowsFormsApplication1
{
public?partial?class?Form1?:?Form
{
Timer?tm?=?new?Timer();//實(shí)例化?timeer?
static?int?timeS?=?0;?//設(shè)置靜態(tài)變量記錄秒數(shù)
TimeSpan?ts?=?new?TimeSpan();?//實(shí)例化?TimeSpan?
public?Form1()
{
InitializeComponent();
}
private?void?button1_Click(object?sender,?EventArgs?e)
{
tm.Interval?=?1000;?//設(shè)置?timeer?1000毫秒執(zhí)行一次
tm.Tick?+=?new?EventHandler(timeer_Tick);?//設(shè)置?timeer?運(yùn)行事件
tm.Start();?//?啟用?timeer
}
private?void?timeer_Tick(object?sender,?EventArgs?e)
{
timeS?+=?1;?//秒數(shù)?+1?
ts?=?new?TimeSpan(0,?0,?timeS);?
label1.Text?=?ts.Hours?+?":"?+?ts.Minutes?+?":"?+?ts.Seconds;
}
private?void?button2_Click(object?sender,?EventArgs?e)
{
tm.Stop();
timeS?=?0;
}
}
}
dim a as double
dim b as double
if (string.IsNullOrEmpty(txt1.Text) or string.IsNullOrEmpty(txt2.Text)) begin
messagebox.show("請(qǐng)輸入數(shù)值");
return;
end
if double.TryParse(txt.Text, out a ) begin
else begin
Messagebox.show('文本框1包含非數(shù)字')
return;
end
if double.TryParse(txt2.Text, out b) begin
else
Messagebox.show('文本框2包含非數(shù)字')
return;
end
Label1.Text = 0.6*a + 0.4*b;