⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 more_icon.htm

📁 对于学习很有帮助
💻 HTM
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>如何让自己的程序在不同分辨率下拥有不同的图标</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>

<body>

<p align="center"><strong><span class="font1"><br>
</span><span style="font-family: 宋体, Times New Roman; font-size: 10.5pt">如何让自己的程序在不同分辨率下拥有不同的图标</span></strong></p>

<p><span style="font-family: 宋体, Times New Roman; font-size: 10.5pt"><br>
我们知道,几乎好多程序都有几个图标(你用VC打开它的EXE就可以看到), 
<br>
但是用Delphi如何实现呢? <br>
以下是源代码: <br>
=============================== <br>
Application.Initialize; <br>
&nbsp;&nbsp;Application.CreateForm(TForm1,&nbsp;Form1); <br>
&nbsp;&nbsp;CASE&nbsp;GetDeviceCaps(GetDC(Form1.Handle),&nbsp;HORZRES)&nbsp;of <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;640&nbsp;:&nbsp;Application.Icon.Handle&nbsp;:=&nbsp;LoadIcon&nbsp;(hInstance,&nbsp;'ICON640'); 
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;:&nbsp;Application.Icon.Handle&nbsp;:=&nbsp;LoadIcon&nbsp;(hInstance,&nbsp;'ICON800'); 
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;1024&nbsp;:&nbsp;Application.Icon.Handle&nbsp;:=&nbsp;LoadIcon&nbsp;(hInstance,&nbsp;'ICON1024') 
<br>
; <br>
&nbsp;&nbsp;&nbsp;&nbsp;1280&nbsp;:&nbsp;Application.Icon.Handle&nbsp;:=&nbsp;LoadIcon&nbsp;(hInstance,&nbsp;'ICON1280') 
<br>
; <br>
&nbsp;&nbsp;END; <br>
&nbsp;&nbsp;Application.Run; <br>
===================================================== <br>
注意:'ICON640','ICON800'……是图标的名称,关于如何把职员加入到EXE 
<br>
中,请另行参考文章。 <br>
<br>
</span><span class="font2"><br>
</span><span class="font2" style="font-family: 宋体; font-size: 9pt">Site:Delphi爱好者<br>
Author:西安&nbsp;&nbsp; 梁&nbsp; 明<br>
Date:99-08-03<br>
E-mail:<a href="mailto:delphifan@990.net">delphifan@990.net</a></span></p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -