2013年1月30日
摘要: 以前,我们判断控件是否被点击是根据它的坐标及尺寸判断的。不过,在WP/SL中,是否被点击了还要增加一个判断依据,那就是这里是否有内容。所以,有时我们的控件死活就是不响应点击事件,原因就在这里,点击到的地方的确在控件范围内,可是那里没有内容。所以,解决办法就是给它个透明背景色。虽然是完全透明,但是不管怎样,那里有内容了。 阅读全文
posted @ 2013-01-30 16:21 snet 阅读(322) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;namespace GAME{ public struct mapPoint { public int x; public int y; } class FindWay { class Point { public Point() { } public int G; public int H; public int x; ... 阅读全文
posted @ 2013-01-30 16:09 snet 阅读(749) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { test mytest = new test(); //定义出发位置 Point startingPoint = new Point(); startingPoint.x = 1; startin... 阅读全文
posted @ 2013-01-30 16:08 snet 阅读(636) 评论(0) 推荐(1) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace ConsoleApplication2{ class Program { static void Main(string[] args) { test mytest = new test(); //定义出发位置 Point pa = new Point(); ... 阅读全文
posted @ 2013-01-30 16:08 snet 阅读(310) 评论(0) 推荐(0) 编辑
摘要: Form1.csusing System;using System.Windows.Forms;using QuartzTypeLib;namespace DirectShow{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } //设置常量 const int WM_APP = 0x8000; const int WM_GRAPHNOTIFY = WM_APP + 1; ... 阅读全文
posted @ 2013-01-30 16:06 snet 阅读(661) 评论(0) 推荐(0) 编辑
摘要: 播放选定的文件 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace MediaApp{ public partial class Form1 : Form { private const int WS_CHILD = 0x40000000; private const int... 阅读全文
posted @ 2013-01-30 16:05 snet 阅读(939) 评论(0) 推荐(0) 编辑
摘要: 有些时候,我们的图片资源保存到了DLL里面,那么,在应用程序中,如何读取出来呢?其实比较简单,我们来用C#做个简单的模型,读取DLL中的图片。新建一个类库项目,然后新建一个文件夹,保存我们的图片。如图:然后,我们要把图片,嵌入到DLL里面去,操作如图:选择嵌入的资源,然后开始写代码:using System;namespace Dll{ public class Class1 { public void mydll() { this.GetType().Assembly.GetManifestResourceStream("Dll.image.test.jpg"); } p 阅读全文
posted @ 2013-01-30 16:03 snet 阅读(773) 评论(0) 推荐(0) 编辑
摘要: <%'用ServerXMLHTTP从ip138获取IP地址Dim WinHttpReqSet WinHttpReq = CreateObject("Msxml2.ServerXMLHTTP")WinHttpReq.Open "GET", "http://www.ip138.com/ip2city.asp"WinHttpReq.Send'正则表达式解析出外网IPDim MyRegExpSet MyRegExp = CreateObject("VBScript.RegExp")MyRegExp.P 阅读全文
posted @ 2013-01-30 15:59 snet 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1.oncontextmenu="window.event.returnvalue=false"将彻底屏蔽鼠标右键<tableborderoncontextmenu=return(false)><td>no</table>可用于Table2.<bodyonselectstart="returnfalse">取消选取、防止复制3.onpaste="returnfalse"不准粘贴4.oncopy="returnfalse;"oncut="returnfalse 阅读全文
posted @ 2013-01-30 15:55 snet 阅读(630) 评论(0) 推荐(0) 编辑
摘要: 这是DW自动生成代码的缺陷,将所有的 __MMColParam = "1" 改为 __MMColParam = "0"或者删除ID1。 阅读全文
posted @ 2013-01-30 15:54 snet 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 很简单,在有图片的那个标签添加 onFocus="this.blur()"如<li onFocus="this.blur()"></li> <a onFocus="this.blur()"></a> 阅读全文
posted @ 2013-01-30 15:54 snet 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Connections.asp<%' FileName="Connection_ado_conn_string.htm"' Type="ADO"' DesigntimeType="ADO"' HTTP="false"' Catalog=""' Schema=""Dim MM_(连接名称)_STRINGMM_(连接名称)_STRING = "DRIVER={MySQL ODBC 5.1 Driver};SERVER 阅读全文
posted @ 2013-01-30 15:53 snet 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 文件1.上传界面文件 upload.htm<html><head><meta http-equiv="Content-Language" content="zh-cn"><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>文件上传</title></head><body><form method="POST& 阅读全文
posted @ 2013-01-30 15:49 snet 阅读(15649) 评论(0) 推荐(0) 编辑
摘要: 有排版的页面http://hi.baidu.com/xnaer/item/5a430e5f53e8d61bdb1635ea思路: 会员通过文件域上传图片; 将图片名改为 会员ID+.jpg;在要显示头像图片的地方插入该图片链接。代码:——————————1.asp————————————<form name="form1" method="post" action="2.asp"> 上传本地图片: <input name="file" type="file" class=&qu 阅读全文
posted @ 2013-01-30 15:48 snet 阅读(1862) 评论(0) 推荐(0) 编辑
摘要: <%dim fso,filepath,fileset fso=server.createobject("scripting.filesystemobject")filepath=server.mappath("index.asp")'选择目标文件为根目录下的index.aspset f=fso.getfile(filepath) '获取尺寸If f.size<1024 ThenResponse.Write f.size & "B"else If f.size<1048576 Then' 阅读全文
posted @ 2013-01-30 15:47 snet 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 我们一般通俗的理解为: UTF-8是世界性通用代码,也完美的支持中文编码,如果我们做的网站能让国外用户正常的访问,就最好用UTF-8。 GB2312属于中文编码,主要针对国内用户使用,如果国外用户访问GB2312编码的网站就会变乱码。 网友的反馈一般觉得是用UTF-8比GB2312要多很多,大家都比较赞同用UTF-8。 从一张外国网站的调查也可看得出:由此图可以看出,2001-2008年期间,GB2312编码的使用情况虽然幅度不大,但还是在稳定上升的;蓝色的线表示出用UTF-8的网站越来越多了。 我挑选了国内部分几个大的门户网站,看看他们用的是哪种编码格式:也许有同学就会问了为什么国... 阅读全文
posted @ 2013-01-30 15:45 snet 阅读(207) 评论(0) 推荐(0) 编辑
摘要: mysql数据库的编码方案在安装的时候已经设置成utf-8,网页的编码方案也设置成utf-8,可显示出来的中文数据还是l乱码,怎么解决?很简单,在你的asp文件的第一行后插入<% Response.CodePage=65001%><% Response.Charset="UTF-8" %> 阅读全文
posted @ 2013-01-30 15:43 snet 阅读(623) 评论(0) 推荐(0) 编辑
摘要: <style type="text/css">a {display: block;}div a:first-letter {background: red;}</style><div><a><span>x</span></a></div> 阅读全文
posted @ 2013-01-30 15:40 snet 阅读(140) 评论(0) 推荐(0) 编辑