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

delphi package - easy access to kernel objects etc.

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

Postby smallsmoker » Tue Feb 26, 2008 2:04 pm

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-stuff/Neue%20Bitmap.jpg
smallsmoker
 
Posts: 4
Joined: Tue Feb 26, 2008 1:58 pm

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

Postby smallsmoker » Tue Feb 26, 2008 4:09 pm

*push*
please help me :-/
smallsmoker
 
Posts: 4
Joined: Tue Feb 26, 2008 1:58 pm

Postby smallsmoker » Fri Feb 29, 2008 4:13 pm

push again
smallsmoker
 
Posts: 4
Joined: Tue Feb 26, 2008 1:58 pm

Postby madshi » Mon Mar 03, 2008 6:23 pm

Strange, it works with Delphi 7 on XPSP2 here on my PC.
madshi
Site Admin
 
Posts: 9338
Joined: Sun Mar 21, 2004 5:25 pm

Postby brian » Tue Mar 11, 2008 4:18 am

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
brian
 
Posts: 36
Joined: Fri Feb 29, 2008 11:12 am

Postby smallsmoker » Wed Jun 25, 2008 11:06 pm

and theres no way that i can hide a single icon on windows vista ?
lg smallsmoker
smallsmoker
 
Posts: 4
Joined: Tue Feb 26, 2008 1:58 pm


Return to madKernel

Who is online

Users browsing this forum: No registered users and 1 guest