从Windows任务栏中删除firemonkey [英] Removing firemonkey from Windows taskbar

查看:331
本文介绍了从Windows任务栏中删除firemonkey的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法,删除我的firemonkey应用程序窗体Windows XP / vista / 7任务栏?



问题:



如何隐藏Windows任务栏中dll中的表单。

解决方案

注意: Talibek 在问题中回答了自己的问题,为了清楚起见,我已经在这里移动了。



您需要获取主窗体句柄( Form1.Handle ),因为在firemonkey中没有Application.handle,然后将其转换为 FmxHandleToHWND FMX.Platform.Win )到正常的窗口句柄。从您的主机应用程序,您需要检索该句柄(您可以导出一个函数),并执行以下操作:

  h: = GetHandle(); 

ShowWindow(h,SW_HIDE);
SetWindowLong(h,GWL_EXSTYLE,GetWindowLong(h,GWL_EXSTYLE)或
WS_EX_TOOLWINDOW);
ShowWindow(h,SW_SHOW);

检索句柄:

  class function TForm1.returnHandle():integer; 
begin
result:= FmxHandleToHWND(Form1.Handle);
结束

当然, Application.MainFormOnTaskBar 属性需要设置为 true ,以便表单可以处理该应用程序。



希望它有助于某人。 >

Is there a way, to remove my firemonkey application form Windows XP/vista/7 taskbar? There is no info when i google.

The problem:

How to hide the form that is located in a dll from the Windows taskbar.

解决方案

NB: Talibek answered his own question within the question, for clarity I have moved it here.

You need to get your main form handle (Form1.Handle), because there is no Application.handle in firemonkey, then convert it with FmxHandleToHWND (FMX.Platform.Win) to normal window handle. From your host application, you need to retrive that handle (you can export a function with it) and do this:

  h := GetHandle();

  ShowWindow(h, SW_HIDE);
  SetWindowLong(h, GWL_EXSTYLE, GetWindowLong(h, GWL_EXSTYLE) or 
      WS_EX_TOOLWINDOW);
  ShowWindow(h, SW_SHOW);

Retrieving handle:

class function TForm1.returnHandle(): integer;
begin
  result := FmxHandleToHWND(Form1.Handle);
end;

Of course, the Application.MainFormOnTaskBar property needs to be set to true so the form can handle the application.

Hope it helps somebody.

这篇关于从Windows任务栏中删除firemonkey的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆