上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页
摘要: //关闭显示器类... class CloseMonitor { //系统消息 private const uint WM_SYSCOMMAND = 0x112; //关闭显示器的系统命令 private const int SC_MONITORPOWER = 0xF170; //2为PowerOff, 1为省电状态,-1为开机 private const int MonitorPowerOff = 2; //广播消息,所有顶级窗体都会接收 private static readonly IntPtr HWND_BROADCAST = new IntPtr(0xffff); //导入API.. 阅读全文
posted @ 2012-03-30 19:08 氺〤魚Oo。 阅读(237) 评论(0) 推荐(0) 编辑
摘要: //获取用户当前选择的行的数据 string name=this.listViewAdmin.FocusedItem.SubItems[0].Text; name += " "; name += this.listViewAdmin.FocusedItem.SubItems[1].Text; MessageBox.Show(name); 阅读全文
posted @ 2012-03-30 13:08 氺〤魚Oo。 阅读(4764) 评论(0) 推荐(0) 编辑
摘要: //实现该功能花了我好多时间啊,资料查了N久...//窗体加载时 private void FrmViewAdmin_Load(object sender, EventArgs e) { string[] str=new string[2]; char a='A'; for (int i = 1; i < 11;i++,a++ ) { str[0] = i.ToString(); str[1] = a.ToString(); //获取当前ListView行数 int row = this.listViewAdmin.Items.Count; //向ListView插入数据 阅读全文
posted @ 2012-03-29 21:33 氺〤魚Oo。 阅读(280) 评论(0) 推荐(0) 编辑
摘要: <!--以下的div包含3个p标签,现在我们想让这3个标签的表现形式都是一样的,如果才能做到呢?用包含选择符即可,详细请看CSS文件代码...--><div id="testId"><p>我是P1</p><p>我是P2</p><p>我是P3</p></div>CSS文件代码:/*这是CSS注释方式*//*用包含选择符时,要用空格隔开相邻的两个标签,如下所示#testId和p之间有一空间,#testId在此代表Div*/#testId p{font-size:36px; 阅读全文
posted @ 2012-03-28 19:28 氺〤魚Oo。 阅读(209) 评论(0) 推荐(0) 编辑
摘要: <!--给标签p的class取个名字叫myClass,注class名可以有多个--><p class="myClass">hello web</p><div class="myClass1 myClass2 myClass3"> 我的class名有3个,每一个都可以控制我的表现形式</div>CSS文件代码如下:/*这是CSS注释*//*在用class名来控制html标签时,应在class名前加一点,如果是id名,加#即可*/.myClass{font-size:60px;color:#C09; 阅读全文
posted @ 2012-03-28 19:17 氺〤魚Oo。 阅读(221) 评论(0) 推荐(0) 编辑
摘要: <!--给标签p的id取个名字叫myId,注id名在同一个html文件中应保持唯一性,而class名可以重复,且一个p标签可以有多个class名--><p id="myId">hello web</p>CSS文件代码如下:/*这是CSS注释方式*//*在用id名来控制html标签时,应在id名前加个#号,如果是class名,则加一点即可*/#myId{font-size:60px;color:#C09;}效果如下: 阅读全文
posted @ 2012-03-28 19:06 氺〤魚Oo。 阅读(195) 评论(0) 推荐(0) 编辑
摘要: <!--为测试方便,我直接把CSS代码放在html文件中了,实际使用时,建议单独建个CSS文件来放CSS代码...--><style type="text/css">p{font-size:60px;color:#00F;}</style><p>hello web</p>效果截图如下: 阅读全文
posted @ 2012-03-28 18:46 氺〤魚Oo。 阅读(127) 评论(0) 推荐(0) 编辑
摘要: System.Diagnostics.Process.Start("explorer.exe", "www.baidu.com"); 阅读全文
posted @ 2012-03-26 22:03 氺〤魚Oo。 阅读(149) 评论(0) 推荐(0) 编辑
摘要: private void tbSite_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar==13) { MessageBox.Show("你按了回车键"); } } 阅读全文
posted @ 2012-03-25 22:06 氺〤魚Oo。 阅读(692) 评论(0) 推荐(0) 编辑
摘要: 窗体的关闭用:this.Close();程序的退出用:Application.Exit(); 阅读全文
posted @ 2012-03-25 16:13 氺〤魚Oo。 阅读(156) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页