文章分类 -  软件应用

1
摘要:1、介绍 最近在做一个系统,要求在安装程序在完成安装之后删除自身。遇到这样的问题,当然要祭起”Google大法”。果不其然,与我想同问题的朋友还是不少。网上给出的方案里面大致有这么几种。2、方法(1)利用批处理文件,删除自身using System.Runtime.InteropServices; //************************************... 阅读全文
posted @ 2009-08-18 21:07 oraclejava 阅读(246) 评论(0) 推荐(0)
摘要:1/**////<summary>2///转全角的函数(SBCcase)3///</summary>4///<paramname="input">任意字符串</param>5///<returns>全角字符串</returns>6///<remarks>7///全角空格为12288,半角空格为328///其他字符半... 阅读全文
posted @ 2009-08-18 17:05 oraclejava 阅读(156) 评论(0) 推荐(0)
摘要:由于以前做一个小程序,想把窗口置顶,其实这个技术已经不是难题了,以前在VB中也是借助于API函数。但在C#中没想用API函数,至今没找到好办法,最后还得借助于API函数。片断代如下: [DllImport("user32.dll", CharSet = CharSet.Auto)] private static extern int SetWindowPos(IntPtr hWnd, int hW... 阅读全文
posted @ 2009-08-18 16:45 oraclejava 阅读(1594) 评论(0) 推荐(1)
摘要:一)。创建部署项目1. 在“文件”菜单上指向“添加项目”,然后选择“新建项目”。   2. 在“添加新项目”对话框中,选择“项目类型”窗格中的“安装和部署项目”,然后选择“模板”窗格中的“安装项目”。在... 阅读全文
posted @ 2009-08-18 16:17 oraclejava 阅读(225) 评论(0) 推荐(0)
摘要:摘 要: 本文针对目前C/S模式下编写的应用程序可维护性差的特点,提出了一套自动在线升级的解决方案,分析了在线升级的困难及实现原理,并给出了实现升级的部分代码,具有实际参考价值和现实意义。本文程序代码均在.Net Framework 1.1 和Windows2000下测试通过。  关键词:C#;在线升级;自动升级;下载;XML文档1 前言 长期以来,广大程序员为到底是使用Client/Server... 阅读全文
posted @ 2009-08-18 16:17 oraclejava 阅读(247) 评论(0) 推荐(0)
摘要:usingSystem;usingSystem.Collections.Generic;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;usingSystem.Data;usingSystem.ServiceProcess;namespaceAdminZJC.DataBaseControl{///<summary>///数据库操... 阅读全文
posted @ 2009-08-18 16:14 oraclejava 阅读(197) 评论(0) 推荐(0)
摘要:using System.Data.OleDb; //引入命名空间try { //数据库连接对象 OleDbConnection Conn = new OleDbConnection("Provider=SQLOLEDB;Data Source=(local) OleDbCommand Comm = new OleDbCommand(); //命令 Comm.CommandText = "sp_a... 阅读全文
posted @ 2009-08-18 16:13 oraclejava 阅读(166) 评论(0) 推荐(0)
摘要:public class User32API { private static Hashtable processWnd = null; public delegate bool WNDENUMPROC(IntPtr hwnd, uint lParam); static User32API() { if (processWnd == null) { processWnd = new Hashtab... 阅读全文
posted @ 2009-08-18 15:58 oraclejava 阅读(4113) 评论(0) 推荐(0)
摘要:拖一个NotifyIcon设置form的showInTastbar属性为falsethis.SizeChanged += new System.EventHandler(this.Form1_SizeChanged);private void Form1_SizeChanged(object sender, EventArgs e) { if (this.WindowState == FormWi... 阅读全文
posted @ 2009-08-18 15:58 oraclejava 阅读(129) 评论(0) 推荐(0)
摘要:拖一个CheckBox1、软件启动时给CheckBox重置状态:RegistryKey R_local = Registry.LocalMachine; RegistryKey R_run = R_local.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"); if (R_run.GetValue("BirthdayTip... 阅读全文
posted @ 2009-08-18 15:57 oraclejava 阅读(208) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Text;using System.Data;using System.Data.SqlClient;using System.Windows;using System.Windows.Forms;using System.Collections;namespace Windows... 阅读全文
posted @ 2009-08-18 15:48 oraclejava 阅读(186) 评论(0) 推荐(0)
摘要:显示动态光标和图标的基本原理:在计时器控件的Tick事件下处理过程把一系列图标或光标赋予给窗体的"iCON"属性,以形成连续播放的图标或光标从而形成动态1.在窗体上添加一个计时器"timer1"控件,并准备一些图标1.ico,2.ico.........和光标1.cur,2.cur.............下面是源码:using System;using System.Collections.Ge... 阅读全文
posted @ 2009-08-18 15:03 oraclejava 阅读(298) 评论(0) 推荐(0)
摘要:原来一直是为每个文本框的KeyPress增加: if(e.KeyChar = '\r') SendKeys.Send("{TAB}");最近想想,其实有更简单的方法,把Form的KeyPreView设为true,然后在Form的KeyPress中增加下列代码即可: if (e.KeyChar == '\r') this.SelectNextControl(this.ActiveControl, t... 阅读全文
posted @ 2009-08-18 14:53 oraclejava 阅读(105) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Microsoft.Win32;namespace Reg4U{ pub... 阅读全文
posted @ 2009-08-18 14:52 oraclejava 阅读(395) 评论(0) 推荐(0)
摘要:1.将窗体的属性KeyPrieview设置为true2.在窗体KeyDown事件中加如下代码private void FormVali_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { //屏掉alt+f4 if ((e.KeyCode == Keys.F4)&&(e.Alt == true)) { e.Ha... 阅读全文
posted @ 2009-08-18 14:50 oraclejava 阅读(203) 评论(0) 推荐(0)
摘要:Microsoft.Win32.RegistryKeykey=Microsoft.Win32.Registry.CurrentUser; Microsoft.Win32.RegistryKeykey1=key.CreateSubKey"Software\Microsoft\Windows\CurrentVersion\Policies\System");key1.SetValue("Disable... 阅读全文
posted @ 2009-08-18 14:50 oraclejava 阅读(490) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Collections;namespace 仿造QQ图标闪... 阅读全文
posted @ 2009-08-17 21:41 oraclejava 阅读(785) 评论(0) 推荐(0)
摘要:private void Form1_Load(object sender, System.EventArgs e) { RegistryKey RootKey,RegKey; //项名为:HKEY_CURRENT_USERSoftware RootKey = Registry.CurrentUser.OpenSubKey ("Software",true); //打开子项:HKEY_CURR... 阅读全文
posted @ 2009-08-17 21:26 oraclejava 阅读(198) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Microsoft.Win32; namespace 限软件的使用次数{... 阅读全文
posted @ 2009-08-17 21:24 oraclejava 阅读(223) 评论(0) 推荐(0)
摘要:#region Using Directivesusing System;using System.IO ;using System.Xml ;using System.Collections ;using System.Reflection ;using System.Text ;using System.Data ;using System.ComponentModel;using Syste... 阅读全文
posted @ 2009-08-17 20:18 oraclejava 阅读(1150) 评论(0) 推荐(0)

1