摘要: 例1:<div style="width:100px; height:50px;"> <div style="float:left; width:50px; height:50px; background-color:blue"></div> <div style="float:left; width:50px; height:50px; background-color:red"></div> </div>例2:<div style="width 阅读全文
posted @ 2013-01-30 16:01 quanzhan 阅读(376) 评论(0) 推荐(0) 编辑
摘要: C#如果遇到图片文件被占用资源时无法删除或者修改不能使用以下方法调用图片//1Image img = Image.FromFile(path);//2pictureBox1.Image = Image.FromFile(path);//解决方法:应该使用如下函数将图片转换成数据流形式,再调用public Image GetImage(string path){ FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); Image result = Image.FromStream(fs); ... 阅读全文
posted @ 2013-01-17 21:59 quanzhan 阅读(858) 评论(0) 推荐(0) 编辑
摘要: private void Form1_Load(object sender, EventArgs e) { this.MouseWheel += new MouseEventHandler(Form1_MouseWheel); } void Form1_MouseWheel(object sender, Mo... 阅读全文
posted @ 2013-01-15 16:44 quanzhan 阅读(449) 评论(0) 推荐(0) 编辑
摘要: 可以用Control.MousePosition获得当前鼠标的坐标,使用PointToClient计算鼠标相对于某个控件的坐标,如下//鼠标相对于屏幕左上角的坐标Point screenPoint = Control.MousePosition;//鼠标相对于窗体左上角的坐标Point formPoint = this.PointToClient(Control.MousePosition);//鼠标相对于contextMenuStrip1左上角的坐标Point contextMenuPoint = contextMenuStrip1.PointToClient(Control.MousePo 阅读全文
posted @ 2013-01-15 15:02 quanzhan 阅读(918) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Text; 7 using System.Windows.Forms; 8 9 namesp... 阅读全文
posted @ 2013-01-15 10:55 quanzhan 阅读(498) 评论(0) 推荐(0) 编辑
摘要: using System.IO; Path.GetDirectoryName(str); 阅读全文
posted @ 2013-01-14 22:50 quanzhan 阅读(390) 评论(0) 推荐(0) 编辑
摘要: View Code //使用方法:右键要打开的图片文件,打开方式-选择默认程序-浏览- pic.exe//Form1.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO;namespace pic{ public partial class Form1 : Form { p... 阅读全文
posted @ 2013-01-14 22:02 quanzhan 阅读(403) 评论(0) 推荐(0) 编辑
摘要: winform 中 TextBox 的 Multiline属性设置为 true ,敲入几个字符和几个回车,然后保存到数据库,再从数据库中读取出来赋值给TextBox,换行符丢失。将读取出的字符串中的"\n"替换为"\r\n"解决问题。1、TextBox 中换行符为: "\r\n"2、Windows 中的换行符(即:Environment.NewLine) 为 "\r\n"3、MessageBox.Show() 的换行符为 "\n"4、Console 的换行符为 "\n"从数据 阅读全文
posted @ 2013-01-09 15:49 quanzhan 阅读(928) 评论(0) 推荐(0) 编辑
摘要: Oracle中的 utl_inaddr 包的作用为取得局域网或internet环境中的主机名和ip地址 1、utl_inaddr.get_host_address 环境中IP地址 如果查询失败,则提示系统错误 查询www.baidu.com的IP地址 select UTL_INADDR.get_host_address('www.baidu.com') from dual; 查询本机IP地址 select UTL_INADDR.get_host_address() from dual; 查询局域网内yuechu的IP地址 select UTL_INADDR.get_host_a 阅读全文
posted @ 2012-12-25 21:51 quanzhan 阅读(680) 评论(0) 推荐(0) 编辑
摘要: 数据库中数据文件,控制文件,日志文件,参数文件的存取路径:①数据文件: select * from V$datafile;c:oracle\product\10.2.0\db_1\database\sysaux01.dbfc:oracle\product\10.2.0\db_1\database\sysaux02.dbfc:oracle\product\10.2.0\db_1\database\users01.dbfc:oracle\product\10.2.0\db_1\database\data_rent.dbf...②控制文件:select * from v$controlfile;c: 阅读全文
posted @ 2012-12-25 12:03 quanzhan 阅读(577) 评论(0) 推荐(0) 编辑