button是图片 点击Button以后换图片怎么实现呢 Private Sub Command1_Click() Image1.Visible = Not (Image1.Visible) Image2.Visible = Not (Image2.Visible) End Sub 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if (this.pictureBox1.Visible == true) { this.pictureBox1.Visible = false; this.pictureBox2.Visible = true; } else if (this.pictureBox1.Visible == false) { this.pictureBox1.Visible = true; this.pictureBox2.Visible = false;} 你用的是ImageButton?先定义一个变量,onclick后首先判断这个值是否为空,若为空就给这个变量赋一个值,并把图片换上.若不为空又给按钮换上另一张图片...我的思路是这样的.... C#中有ImageButton么。。我的好像没有 http://www.panoramio.com/photos/square/4637525.jpg 楼上看看这个~~~ protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GetImageUrl(ImageButton1, new string[] { "mian_14.gif", "mian_15.gif" }, 0); } } public static void GetImageUrl(ImageButton btn, string[] url, int i) { if (i.Equals(0)) btn.ImageUrl = url[0]; else btn.ImageUrl = url[1]; } protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { GetImageUrl(ImageButton1, new string[] { "mian_14.gif", "mian_15.gif" }, 1); } 写一个 JS 用来改变 button 的 style 大家看看这种URL是怎么实现的? 请教一个字符串校验问题 我最近有个项目,要同时测试4块手机pcba板。是否要多线程??? 今天终于有分了, 再发一贴向大家请教, 可能用正则来做会简单和高效一些. 自己怎么做提示框(替代MessageBox)?请帮帮忙 请问数据库连接语句放在哪里呢,VS05的 请问:datatable某字段的返回值出错 config文件放在debug目录下和项目目录下有什么区别? 没人用过speech sdk吗??发了3个帖都没人理?? c#窗体程序如何安插音乐进去啊! GridView的删除问题 新手求指导,有没有简单一点的写法呢?
{
this.pictureBox1.Visible = false;
this.pictureBox2.Visible = true;
}
else if (this.pictureBox1.Visible == false)
{
this.pictureBox1.Visible = true;
this.pictureBox2.Visible = false;
}
先定义一个变量,onclick后首先判断这个值是否为空,若为空就给这个变量赋一个值,并把图片换上.若不为空又给按钮换上另一张图片...
我的思路是这样的....
楼上看看这个~~~
{
if (!IsPostBack)
{
GetImageUrl(ImageButton1, new string[] { "mian_14.gif", "mian_15.gif" }, 0);
}
} public static void GetImageUrl(ImageButton btn, string[] url, int i)
{
if (i.Equals(0))
btn.ImageUrl = url[0];
else
btn.ImageUrl = url[1];
} protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
GetImageUrl(ImageButton1, new string[] { "mian_14.gif", "mian_15.gif" }, 1);
}