`
文章列表
private OleDbConnection conn = null;         //建立与Excel的连接        private void getConnection()        {                    string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + this.label8.Text.Trim() + ";Extended Properties=\"Excel 12.0;HDR=YES\"" ...
//创建MobileBackup.xml文件        private void createXml()        {            //创建一个XmlTextWriter实例            XmlTextWriter xmlTW = new XmlTextWriter(path + @"\MobileBackup.xml", Encoding.UTF8);             //开始写            xmlTW.WriteStartDocument();            xmlTW.WriteStartElement(" ...
//从xml文件中读取发件箱信息        private void readerXmlOutBox()        {            if (xmlDo == null)                xmlDo = new XmlDocument();            xmlDo.Load(path + @"\MobileBackup.xml");             XmlNode xmlNode = xmlDo.SelectSingleNode("SHT_MOBILE");            XmlNodeList xm ...
//获得当前项目运行的路径            path = System.IO.Directory.GetCurrentDirectory(); private void pictureBox1_MouseHover(object sender, EventArgs e)        {            this.pictureBox1.BackgroundImage=System.Drawing.Image.FromFile(path + @"\images\CloseButton_Hover.bmp");        }         private v ...
//让窗体显示在右下角Screen screen = Screen.AllScreens[0];this.DesktopLocation = new Point(screen.Bounds.Width - (this.Width + 5), screen.Bounds.Height - this.Height + 33));//让窗体一直显示在最前面this.TopMost = true;
using System.Runtime.InteropServices; //窗体的拖动   [DllImport("user32.dll")]   public static extern bool ReleaseCapture();        [DllImport("user32.dll")]        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);        public const int w = 0x0112; ...
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices; namespace MovSysSht{    internal class CSoundPlay    {        public CSoundPlay()        {            //            // TODO: 在此处添加构造函数逻辑            //        }         [Flags]       ...

C# 操作注册表

名字空间Microsoft.Win32以下从‘读’‘写’‘删除’‘判断’四个事例实现对注册表的简单操作 1.读取指定名称的注册表的值 1private string GetRegistData(string name) 2{ 3   string registData; 4    RegistryKey hkml = Registry.LocalMachine; 5    RegistryKey software =
在新建ASP.NET项目的时候出现HTTP/1.1 500 Server Error的错误解决方法 看到下面的错误提示是不是很头疼,网上很多相关的解决方法也都不好使,没关系看下面的操 第一步(开启MSDTC服务) 打开控制面板 → 管理工具 → 服务 → 找到 ...
package cn.com.lough.struts.action; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.util.Random; import javax.imageio.ImageIO; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; imp ...
Struts 2框架有两个核心配置文件: struts.xml和struts.properties 其中struts.xml文件主要负责管理应用中的Action映射,以及该Action包含的Result定义等。除此之外,Struts 2框架还包含一个struts.properties文件,该文件定义了Struts 2框架的大量属 ...
Global site tag (gtag.js) - Google Analytics