FireMonkey隐藏任务栏图标
FMX(FireMonkey)可以轻松实现很多VCL无法或难以实现的特效,所以将FMX程序作为界面,打包入DLL由VCL程序调用,是一个不错的方案。为了程序的完整性,你不想看见FMX程序在任务栏上显示图标。可是普通的Windows函数似乎没有作用,比如你取得FMX窗体的句柄后,使用ShowWindow函数隐藏任务栏图标,结果是毫无作用。其实原因很简单,只是你使用的句柄不正确而已。
正确的源代码我贴出来,具体我就不解释了,相信有基础的人都能看懂。
unit Unit1; interface uses
Winapi.Windows,
Winapi.Messages,
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Platform.Win,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation, FMX.StdCtrls; type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end; var
Form1: TForm1; implementation {$R *.fmx} procedure TForm1.Button1Click(Sender: TObject);
begin
//隐藏主程序在任务栏的图标
ShowWindow(ApplicationHWND, SW_HIDE);
//隐藏主程序在alt+tab中的图标
SetWindowLong(ApplicationHWND, GWL_EXSTYLE, WS_EX_TOOLWINDOW Or GetWindowLong(ApplicationHWND, GWL_EXSTYLE));
end; end.
此代码在Delphi XE8中编译,调试正确。
FireMonkey隐藏任务栏图标的更多相关文章
- C++隐藏任务栏图标
在VC编程中,有时候我们需要将我们的程序在任务栏上的显示隐藏起来,我试过几种方法,下面我介绍一下我知道的三种方法. 第一种方法是设置窗口WS_EX_TOOLWINDOW扩展样式,通过在OnInitDi ...
- C# 隐藏窗口标题栏、隐藏任务栏图标
//没有标题 this.FormBorderStyle = FormBorderStyle.None; //任务栏不显示 this.ShowInTaskbar = false;
- Delphi2007中正确调用SetWindowLong隐藏程序任务栏图标
http://terony.blog.sohu.com/71347192.html Delphi2007中正确调用SetWindowLong隐藏程序任务栏图标 标签: Delphi2007 SetW ...
- Win10如何隐藏Windows Defender任务栏图标
导读 Windows 10 至发布以来就内置集成了 Windows Defender 安全防护应用,但有许多用户平常压根儿就没注意到它的存在.微软为了使安全防护功能更加明显,Windows 10 周年 ...
- C#:实现托盘(任务栏图标与托盘图标互斥)
实现托盘(任务栏图标与托盘图标互斥),并且在点击任务栏图标时实现的最小化与点击最小化按钮分离. 具体如下: 1.向窗体上添加如下控件:MenuStrip menuStrip1, NotifyIcon ...
- ubuntu gnome桌面隐藏顶栏
注意:ubuntu 14.04.5默认的为unity桌面,有多点触发,没有自带Tweak Tool工具.需安装gnome 桌面,可参见我的另一随笔. 环境: ubuntu 14.04.5 gnome ...
- delphi XE4 隐藏程序在任务管理器和隐藏任务栏
最新处理方法,偶然发现delphi下有个ShowMainForm属性,只要在Application.Initialize;后面加上Application.ShowMainForm := false;就 ...
- iOS 滑动隐藏导航栏-三种方式
/** 1隐藏导航栏-简单- */ self.navigationController.hidesBarsOnSwipe = YES; /** 2隐藏导航栏-不随tableView滑动消失效果 ...
- Win7任务栏图标大小调整为等宽
打开注册表,找到HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics,新建DWORD,输入MinWidth,大图标设为56,小图标设定为36: 参 ...
随机推荐
- LA 3708 Graveyard(推理 参考系 中位数)
Graveyard Programming contests became so popular in the year 2397 that the governor of New Earck -- ...
- write() ,read();
int main1(int argc ,char *argv[]){ if(argc < 2 ) return 0; int fd = open(argv[1] , O_RDONLY); if( ...
- $.ajax参数备注-转转转
jquery中的ajax方法参数总是记不住,这里记录一下. $,ajax()方法参数详解 1.url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. 2.type: 要求为St ...
- jdk环境变量配置(总结)
进行java开发,首先要安装jdk,安装了jdk后还要进行环境变量配置: 1.下载jdk(http://java.sun.com/javase/downloads/index.jsp),我下载的版本是 ...
- Sqlserver知识点1
1.字符串 字符数据类型是SQL Server 中最常用的数据类型之一,它可以用来存储各种字母.数字符号和特殊符号.在使用字符数据类型时,需要在其前后加上英文单引号或者双引号. (1)char ...
- substring和substr的用法
substring 方法用于提取字符串中介于两个指定下标之间的字符 substring(start,end) 开始和结束的位置,从零开始的索引 返回值是一个新的字符串,该字符串值包含 stringOb ...
- Leetcode 解题 Longest Substring without repeating charcater python
原题: Given a string, find the length of the longest substring without repeating character For example ...
- why app_start start
Add following code for your class: [assembly: WebActivatorEx.PostApplicationStartMethod(typeof(WeCha ...
- iOS中使用RegexKitLite来试用正则表达式 使用ARC 20个错误解决办法
You can also disable the ARC for the RegexKitLite only by adding a flag: select the project -> YO ...
- 定位 - CoreLocation - 打印位置信息
1. 导入框架 <CoreLocation.framework>, 引入头文件 import <CoreLocation/CoreLocation.h>; 2. 创建管理者对象 ...