ASCII码

ASCII码 键盘 ASCII 码 键盘 ASCII 码 键盘 ASCII 码 键盘 27 ESC 32 SPACE 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' 40 ( 41 ) 42 * 43 + 44 , 45 – 46 . 47 / 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? 64 @ 65 A 66 B 67 C 68 D 69 […]

龙生   13 Feb 2012
View Details

win快捷键

   Win + D  D = Desktop (桌面)  Win + E  E = Explorer (资源管理器)  Win + F  F = Find   (查找)  Win + R  D = Run   (运行)  WIN+ BREAK 显示"系统属性"对话框。   WIN+ M 最小化所有窗口。  WIN+ Shift + M 还原最小化的窗口。   CTRL+WIN+ F 搜索计算机。  WIN+ F1 显示 Windows 帮助。   WIN+ L 锁定您的计算机,或者切换用户。   WIN+ U 打开"工具管理器"。

龙生   13 Feb 2012
View Details

非常详细的IFRAME的属性参考手册

 ALIGN align 设置或获取表格排列。  ALLOWTRANSPARENCY allowTransparency 设置或获取对象是否可为透明。  APPLICATION APPLICATION 表明对象的内容是否为 HTML 应用程序(HTA),以便免除浏览器安全模式。  ATOMICSELECTION 指定元素及其内容是否可以一不可见单位统一选择。  BEGIN begin 设置或获取时间线在该元素上播放前的延迟时间。  BORDER border 设置或获取框架间的空间,包括 3D 边框。  canHaveChildren 获取表明对象是否可以包含子对象的值。  canHaveHTML 获取表明对象是否可以包含丰富的 HTML 标签的值。  CLASS className 设置或获取对象的类。  contentWindow 获取指定的 frame 或 iframe 的 window 对象。  DATAFLD dataFld 设置或获取由 dataSrc 属性指定的绑定到指定对象的给定数据源的字段。  DATASRC dataSrc 设置或获取用于数据绑定的数据源。  disabled 获取表明用户是否可与该对象交互的值。  END end 设置或获取表明元素结束时间的值,或者元素设置为重复的简单持续终止时间。  firstChild 获取对象的 childNodes 集合的第一个子对象的引用。  FRAMEBORDER frameBorder 设置或获取是否显示框架的边框。  hasMedia 获取一个表明元素是否为 HTML+TIME 媒体元素的 Boolean 值。  HEIGHT height 设置或获取对象的高度。  HIDEFOCUS hideFocus 设置或获取表明对象是否显式标明焦点的值。  HSPACE hspace 设置或获取对象的水平边距。  ID id 获取标识对象的字符串。  innerText 设置或获取位于对象起始和结束标签内的文本。  isContentEditable 获取表明用户是否可编辑对象内容的值。  isDisabled 获取表明用户是否可与该对象交互的值。  isMultiLine 获取表明对象的内容是包含一行还是多行的值。  isTextEdit 获取是否可使用该对象创建一个 TextRange 对象。  […]

龙生   13 Feb 2012
View Details

param里参数的详解

    <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="580" height="110"> <param name="_cx" value="10372"> <param name="_cy" value="2355"> <param name="FlashVars" value="-1"> <param name="Movie" value="swf.swf"> <param name="Src" value="1.swf"> <param name="WMode" value="Transparent"> <param name="Play" value="-1"> <param name="Loop" value="-1"> <param name="Quality" value="High"> <param name="SAlign" value> <param name="Menu" value="0"> <param name="Base" value> <param name="AllowScriptAccess" value="always"> <param name="Scale" value="ShowAll"> <param name="DeviceFont" value="0"> <param name="EmbedMovie" value="0"> <param name="BGColor" value> <param name="SWRemote" value> <embed src="1.swf" width="580" height="110" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" menu="false"></embed> </object>     ——————————————————————————————————————————- 参数和属性   下列标记属性和参数描述了由“发布”命令创建的 HTML 代码。在编写自己的用于显示 Flash 内容的 HTML 时,可以参考此列表。除非特别说明,否则所有条目都同时适用于 object 标记和 embed 标记。可选条目也在此列出。Internet Explorer […]

龙生   13 Feb 2012
View Details

C#列表所有IIS站点以及相关站点属性

using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Windows.Forms.Design; using System.DirectoryServices; using System.Reflection; using System.Text.RegularExpressions; int TotalServerCount=0; DirectoryEntry rootfolder = new DirectoryEntry("IIS://localhost/W3SVC"); //TotalServerCount=rootfolder.Children.SchemaFilter.Count; foreach (DirectoryEntry child in rootfolder.Children) { if (child.SchemaClassName == "IIsWebServer") { TotalServerCount+=1; } } //循环获取所有站点详细属性写入数组中 string [] arrayServerID = new string[TotalServerCount];//站点标识符 string [] arrayServerIP = new string[TotalServerCount];//站点主机头 string [] arrayServerPort = new string[TotalServerCount];//站点主机头 string [] arrayServerHeader = new string[TotalServerCount];//站点主机头 string [] arrayServerPath = new string[TotalServerCount];//站点主机头 string [] arrayServerComment = new string[TotalServerCount];//站点主机头 string [] arrayServerBinds = new string[TotalServerCount];//站点主机头 string currentServerBindings;//绑定主机头IP端口字符串 char[] a=":".ToCharArray(); string […]

龙生   12 Feb 2012
View Details

c#读取IIS中的站点相关属性代码

private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)  {   string currentServerComment=comboBox1.SelectedItem.ToString();   string currentSiteNum = GetWebSiteNum(currentServerComment);   string rootPath = "IIS://localhost/w3svc";   string currentSitePath =rootPath+"/"+currentSiteNum;      DirectoryEntry siteEntry = new DirectoryEntry(currentSitePath);    string currentServerBindings=siteEntry.Properties["ServerBindings"].Value.ToString();   char[] a=":".ToCharArray();   string [] currentBingdings = null;      currentBingdings=currentServerBindings.Split(a);   string currentServerIP=currentBingdings[0];   string currentServerPort=currentBingdings[1];   string currentServerHeader=currentBingdings[2];   string currentServerHost="";   string currentServerPath="";    foreach (DirectoryEntry child in siteEntry.Children)   {        if((child.SchemaClassName == "IIsWebVirtualDir")&&(child.Name=="root"))    {     currentServerPath = child.Properties["Path"].Value.ToString();         }   }     textBox2.Text=currentServerIP;   textBox3.Text=currentServerPort;   textBox4.Text=currentServerPath;   textBox5.Text=currentServerHeader;   textBox6.Text=currentServerHost;  } /// <summary>  /// 根据站点名称获取站点标识符  /// </summary>     public string GetWebSiteNum(string siteName)  {    Regex […]

龙生   12 Feb 2012
View Details

使用Flash和C# WinForm配合打造界面漂亮的应用程序

(木野狐 2006-10-29)   由于之前一阵公司一个项目提出的需求,自己也想进行这方面的尝试,我对如何使用 Flash 来做 WinForm 程序的界面产生了兴趣,于是学习了一些资料,摘要于此。   要在 WinForm 中使用 Flash,通常需要用到 Shockwave Flash Object 这个 COM 组件。   (http://www.codeproject.com/csharp/fscommand.asp)   (http://www.codeproject.com/useritems/FlashDBInteract.asp)   具体步骤如下:   首先添加对 COM 组件 Shockwave Flash Object 的引用,将该组件拖到窗体上之后,可以设置如下关键属性:   Movie: Flash 的存放地址   EmbedMovie: 是否嵌入到程序的资源中。   接下来你可以设置其他一些属性,使得 Flash 的窗口最大化,隐藏掉其宿主程序的 C# WinForm 窗体。   在 Flash 的 ActionScript 中,可以通过 FSCommand 函数与 hosting app 通信,该函数有两个参数,分别是:   command: 命令名称   parameters: 参数   例子:   on(press){   fscommand("Circule", "Green");   }   在 C# 中,处理 Flash 对象的 FSCommand 事件即可。   如果该事件处理函数的 EventArgs 为 e, 则有如下对应关系:   […]

龙生   12 Feb 2012
View Details

C#获取项目程序及运行路径的方法

1.asp.net webform用“Request.PhysicalApplicationPath获取站点所在虚拟目录的物理路径,最后包含“\”; 2.c# winform用A:“Application.StartupPath”:获取当前应用程序所在目录的路径,最后不包含“\”;B:“Application.ExecutablePath ”:获取当前应用程序文件的路径,包含文件的名称;C:“AppDomain.CurrentDomain.BaseDirectory”:获取当前应用程序所在目录的路径,最后包含“\”;D:“System.Threading.Thread.GetDomain().BaseDirectory”:获取当前应用程序所在目录的路径,最后包含“\”;E:“Environment.CurrentDirectory”:获取当前应用程序的路径,最后不包含“\”;F:“System.IO.Directory.GetCurrentDirectory”:获取当前应用程序的路径,最后不包含“\”; 3.c# windows service服务中用“AppDomain.CurrentDomain.BaseDirectory”或“System.Threading.Thread.GetDomain().BaseDirectory”;用“Environment.CurrentDirectory”和“System.IO.Directory.GetCurrentDirectory”将得到“ system32”目录的路径;如果要使用“Application.StartupPath”或“Application.ExecutablePath ”,需要手动添加对“System.Windows.Forms.dll ”的引用,并在程序开头用“using System.Windows.Forms”声明该引用; 4.在卸载程序获取系统安装的目录:System.Reflection.Assembly curPath = System.Reflection.Assembly.GetExecutingAssembly();string path=curPath.Location;//得到安装程序类SetupLibrary文件的路径,获取这个文件路径所在的目录即得到安装程序的目录;   System.Diagnostics.StackFrame f = new System.Diagnostics.StackFrame(1);MethodBase mb = f.GetMethod();System.Web.HttpContext.Current.Response.Write(mb.DeclaringType.ToString()); 获取调用类的信息,可以从父类知道子类的情况  

龙生   11 Feb 2012
View Details

C#获取程序运行目录

第一种方法: string AppPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; if (AppPath.EndsWith("\\") || AppPath.EndsWith("/"))     AppPath= AppPath.Substring(0, AppPath.Length – 1); 第二种方法:string AppPath = Environment.CurrentDirectory; // 结尾不带"/" 第三种方法:string AppPath = Directory.GetCurrentDirectory();//获取应用程序的当前工作目录 Directory.SetCurrentDirectory(localFolder);

龙生   11 Feb 2012
View Details

c# 不规则窗口实现

相信每个编程爱好者都希望自己的程序不仅性能优越而且有一个美观的界面,一个区别于别人的程序的个性化的界面。然而以前烦琐的API调用和大量的代码使大家望而却步。现在好了,在C#中通过少量的代码就可以实现不规则窗体的制作。如果您有兴趣就接着往下看吧。 一、在说我用的方法前,我不得不说一下另一种方法,这种方法在实现不规则窗体自身显示效果(即除开窗体的移动、最大最小话、关闭等)时是不用编代码 的。非常简便,但它的致命缺点就是要要求程序运行环境在24位色以下,否则不规则窗体的透明部分就会显示出来,窗体会非常难看。   方法1:步骤1:先用图象处理软件制作您的不规则窗体的位图BMP(最好是位图,其它的我没有试过:))。制作时请注意将背景色(即需要设置成透明的颜色部分)设置成与非背景图片颜色反差较大的颜色,并且使用一种容易记忆的颜色。如下图:   图中黄颜色背景将要设置成透明部分    步骤2:新建windows应用程序。创建windows窗体并设置窗体基本属性。(1)将 FormBorderStyle 属性设置为 None。(2)将窗体的 BackgroundImage 属性设置为先前创建的位图文件。不必将文件添加到项目系统中;这将在指定该文件作为背景图像时自动完成。(3)将 TransparencyKey 属性设置为位图文件的背景色,本例中为黄色。(此属性告诉应用程序窗体中的哪些部分需要设置为透明。 )上面两个步骤已经完成了不规则窗体自身显示效果的制作,此刻您要做的就是为窗体添加移动、关闭、最大最小化的事件。这个将在方法2中详细介绍。方法1在24位色以下的环境中可以显示正常,但在24位色以上时黄色背景不能消失,所以方法1不能胜任24位色以上环境。为了解决这个问题,我们可以用到方法2。方法2步骤1:同方法1,先用图象处理软件制作您的不规则窗体的位图BMP步骤2:创建windows应用程序。创建windows窗体。由于方法2是调用类来实现制作不规则窗体,所以您只需要在窗体的LOAD事件中加入以下代码:private void login_Load(object sender, System.EventArgs e){//初始化调用不规则窗体生成代码BitmapRegion BitmapRegion =new BitmapRegion();//此为生成不规则窗体和控件的类BitmapRegion.CreateControlRegion(this,new Bitmap("HMlogin.bmp")); }其中"HMlogin.bmp"为您制作的位图。   下面就是文件BitmapRegion.cs 我在网上找到的是英文的,自己翻译了一下,英语水平有限,有错的地方还请大家指出。 /***************************************************************************************///// 功能描述:不规则窗体和控件的生成类// 撰 写 人:不祥(网上搜集)// //// 修改说明:2005.8.31 杨丹翻译和修改///***************************************************************************************/using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; { /// <summary> /// Summary description for BitmapRegion. /// </summary> public class BitmapRegion { public BitmapRegion() {} /// <summary> /// Create and apply the region on the supplied control/// 创建支持位图区域的控件(目前有button和form)/// </summary> /// <param name="control">The Control object to apply the region to控件</param> /// <param […]

龙生   11 Feb 2012
View Details
1 389 390 391 410