扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:阿虎 来源:天极开发 2007年11月11日
关键字:
private void InitializeComponent ( ) { this.textBox1 = new System.Windows.Forms.TextBox ( ) ; this.textBox2 = new System.Windows.Forms.TextBox ( ) ; this.textBox3 = new System.Windows.Forms.TextBox ( ) ; this.button1 = new System.Windows.Forms.Button ( ) ; this.label1 = new System.Windows.Forms.Label ( ) ; this.label2 = new System.Windows.Forms.Label ( ) ; this.label3 = new System.Windows.Forms.Label ( ) ; this.label4 = new System.Windows.Forms.Label ( ) ; this.textBox4 = new System.Windows.Forms.TextBox ( ) ; this.SuspendLayout ( ) ; this.textBox1.Location = new System.Drawing.Point ( 144 , 16 ) ; this.textBox1.Name = "textBox1" ; this.textBox1.Size = new System.Drawing.Size ( 184 , 21 ) ; this.textBox1.TabIndex = 0 ; this.textBox1.Text = "" ; this.textBox2.Location = new System.Drawing.Point ( 144 , 69 ) ; this.textBox2.Name = "textBox2" ; this.textBox2.PasswordChar = '*' ; this.textBox2.Size = new System.Drawing.Size ( 184 , 21 ) ; this.textBox2.TabIndex = 1 ; this.textBox2.Text = "" ; this.textBox3.Location = new System.Drawing.Point ( 144 , 122 ) ; this.textBox3.Name = "textBox3" ; this.textBox3.Size = new System.Drawing.Size ( 184 , 21 ) ; this.textBox3.TabIndex = 2 ; this.textBox3.Text = "" ; this.button1.Location = new System.Drawing.Point ( 152 , 256 ) ; this.button1.Name = "button1" ; this.button1.Size = new System.Drawing.Size ( 80 , 32 ) ; this.button1.TabIndex = 4 ; this.button1.Text = "发送" ; this.button1.Click += new System.EventHandler ( this.button1_Click ) ; this.label1.Location = new System.Drawing.Point ( 56 , 24 ) ; this.label1.Name = "label1" ; this.label1.Size = new System.Drawing.Size ( 88 , 16 ) ; this.label1.TabIndex = 5 ; this.label1.Text = "注册手机号:" ; this.label2.Location = new System.Drawing.Point ( 88 , 77 ) ; this.label2.Name = "label2" ; this.label2.Size = new System.Drawing.Size ( 72 , 16 ) ; this.label2.TabIndex = 6 ; this.label2.Text = "口令:" ; this.label3.Location = new System.Drawing.Point ( 56 , 128 ) ; this.label3.Name = "label3" ; this.label3.Size = new System.Drawing.Size ( 96 , 16 ) ; this.label3.TabIndex = 7 ; this.label3.Text = "目标手机号:" ; this.label4.Location = new System.Drawing.Point ( 96 , 176 ) ; this.label4.Name = "label4" ; this.label4.Size = new System.Drawing.Size ( 72 , 16 ) ; this.label4.TabIndex = 8 ; this.label4.Text = "内容:" ; this.textBox4.Location = new System.Drawing.Point ( 144 , 175 ) ; this.textBox4.Multiline = true ; this.textBox4.Name = "textBox4" ; this.textBox4.Size = new System.Drawing.Size ( 184 , 48 ) ; this.textBox4.TabIndex = 3 ; this.textBox4.Text = "" ; this.AutoScaleBaseSize = new System.Drawing.Size ( 6 , 14 ) ; this.ClientSize = new System.Drawing.Size ( 410 , 303 ) ; this.Controls.Add ( this.button1 ) ; this.Controls.Add ( this.textBox4 ) ; this.Controls.Add ( this.textBox3 ) ; this.Controls.Add ( this.textBox2 ) ; this.Controls.Add ( this.textBox1 ) ; this.Controls.Add ( this.label4 ) ; this.Controls.Add ( this.label3 ) ; this.Controls.Add ( this.label2 ) ; this.Controls.Add ( this.label1 ) ; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle ; this.MaximizeBox = false ; this.Name = "Form1" ; this.Text = "Visual C#实现短信发送" ; this.ResumeLayout ( false ) ; } |
图04:【短信】项目的设计界面 |
图05:在【短信】项目中添加Web引用的界面 |
private void button1_Click ( object sender , System.EventArgs e ) { 短信.cn.com.sina.smsinter.SMSWS ws = new 短信.cn.com.sina.smsinter.SMSWS ( ) ; string result = ws.sendXml ( "Sina" ,textBox1.Text ,textBox2.Text ,textBox3.Text ,textBox4.Text ,"new" ) ; MessageBox.Show ( result ) ; } |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者