Recent

Author Topic: what to use instead of application.handle for ShellExecute?  (Read 8102 times)

clueless

  • Newbie
  • Posts: 1
what to use instead of application.handle for ShellExecute?
« on: October 18, 2008, 09:21:35 pm »
This works fine using Delphi 3.02 with windows:

ShellExecute(application.Handle, nil,
     PWideChar('http://www.zipcon.net/~highroad/CDCzar/'),
     PWideChar(''),nil ,1);

But trying to run under Lazarus 0..9.26 I get this error:
    Error: identifier idents no member "Handle"

How can I get ShellExecute to work with Lazarus?  Yes, I included ShellApi under "uses".

Thank you.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: what to use instead of application.handle for ShellExecu
« Reply #1 on: October 18, 2008, 09:47:38 pm »
Quote from: "clueless"
This works fine using Delphi 3.02 with windows:

ShellExecute(application.Handle, nil,
     PWideChar('http://www.zipcon.net/~highroad/CDCzar/'),
     PWideChar(''),nil ,1);

But trying to run under Lazarus 0..9.26 I get this error:
    Error: identifier idents no member "Handle"

How can I get ShellExecute to work with Lazarus?  Yes, I included ShellApi under "uses".

Thank you.


HWND(nil) works. Note that you're creating code that will only compile on Windows.

Thanks.

-Phil

 

TinyPortal © 2005-2018