Page 1 of 1

hiding tray icons exeption: "Could not load Module [...

Posted: Tue Feb 26, 2008 2:04 pm
by smallsmoker
Hi i tried to hide a tray icon of a externel application,
my os.: Windows Vista Ultimate x64
delphi.: Codegear Rad delphi 2007

i also tried it on windows xp professional xp2
with a delphi 7 compiler :/

here my source code:

Code: Select all

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, madkernel, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var name:string;
begin
Name := 'foobar2000.exe';
Process( Name).TrayIcons.Hide;
MessageBox(0, pchar('"' + Process( Name).Exefile + '"'), '', 0);
Process( Name).TrayIcons.Show;
end;

end.
and a Screenshot of the Exeption.:
http://wearestrange.jypd.de/boredcoders ... Bitmap.jpg

Re: hiding tray icons exeption: "Could not load Module

Posted: Tue Feb 26, 2008 4:09 pm
by smallsmoker
*push*
please help me :-/

Posted: Fri Feb 29, 2008 4:13 pm
by smallsmoker
push again

Posted: Mon Mar 03, 2008 6:23 pm
by madshi
Strange, it works with Delphi 7 on XPSP2 here on my PC.

Posted: Tue Mar 11, 2008 4:18 am
by brian
You need to run it from outside the IDE, the exception seems to happen only if you run it with the IDE/debugger etc

It doesn't really work anyway with D2007/Vista

Posted: Wed Jun 25, 2008 11:06 pm
by smallsmoker
and theres no way that i can hide a single icon on windows vista ?
lg smallsmoker