Google [站内搜索]

分类: Win编程预览模式: 普通 | 列表

C#读取并显示其他应用程序图标示例



//using System.Drawing;
pictureBox1.Image = Icon.ExtractAssociatedIcon(@"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe").ToBitmap();

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2496

Modular InnoSetup Dependency Installer[转]

Introduction

This article contains a modular InnoSetup install script that downloads (if setup files don't exist locally) and installs various dependencies like .NET Framework 1.1/2.0/3.5/4.0/4.6 or C++ Redistributable 2005/2008/2010/2012/2013/2015 on 32-bit and 64-bit Windows.

Background

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 5633
1.本地安装.Net Framework

[Files]
Source: "G:\myapp\dotnetfx.exe"; Flags: dontcopy noencryption

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 9664

Check .NET Version with Inno Setup[转]

Inno Setup by Jordan Russell is a great installation scripting program, but lacks a built-in function to determine the .NET Framework version installed on the target machine. Fortunately, it’s easy to write such a function using Inno Setup’s Pascal scripting language.

The Versions

Microsoft maintains a set of registry keys that indicate the installed .NET Framework versions and service packs. C# MVP Scott Dorman has posted a list comprising versions 1.0 through 4.0 (at the time of this writing) in this Stack Overflow thread. The required registry keys are quite similar for most .NET Framework versions except 1.0. We’ll ignore that version which has been obsoleted by 1.1 anyway.

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 7923

C#应用程序自动请求以管理员身份运行

Windows 7及更新版本的操作系统增加了 UAC(用户账户控制) 的安全机制,如果 UAC 被打开,用户即使以管理员权限登录,其应用程序默认情况下也无法对系统目录、系统注册表等可能影响系统正常运行的设置进行写操作,这个机制大大增强了系统的安全性。

但有时应用程序确实需要修改系统目录、系统注册表等操作,在确保安全的前提下,用户可以右键单击应用程序,选择"以管理员身份运行"运行即可:

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4341
在注册表添加如下信息即可自行添加卸载程序到控制面板添加或删除程序:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\mzwu_com]

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 1940
C#无法删除正在运行的应用程序自身文件,但我们可以调用dos的del命令进行删除,加上ping做适当延时,简直完美:

//using System.Diagnostics;
Process.Start("cmd.exe", string.Format("/C echo 删除需要一点时间,请稍等... & ping -n 1 delay.mzwu.com > nul & del /Q \"{0}\"", Process.GetCurrentProcess().MainModule.FileName));

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2667

C#应用程序获取自身路径和文件名示例

在ConsoleApplication和WindowsFormsApplication都能使用:

//获取应用程序自身路径和文件名
string filePath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;

只能在WindowsFormsApplication使用:

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2965


一、QQ群成员消息群发思路

问题一:怎么打开所有QQ群成员聊天窗口?

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 6037
Visual Studio International Pack 包含一组类库,该类库扩展了.NET Framework对全球化软件开发的支持。使用该类库提供的类,.NET 开发人员可以更方便的创建支持多文化多语言的软件应用。 该软件包1.0版提供下面七个组件以增强.NET Framework对全球化软件应用开发的支持。

·East Asia Numeric Formatting Library - 支持将小写的数字字符串格式化成简体中文,繁体中文,日文和韩文的大写数字字符串。
·Japanese Kana Conversion Library - 支持将日文假名(Kana)转化为另一种日文字符。
·Japanese Text Alignment Library - 支持日文特有的一种对齐格式。

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3518