Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Question..

Featured Replies

Posted

Hello,

Im making a program that will load an setup file for example:

I fire up my delphi project and i got a installer.exe now how do i execute it (if i press on Button in Delphi)

Not sure how Windows API integration works in Delphi, but it should be done like this:

ShellExecute(Window, 'Open', 'setup.exe', 0, 0, SW_SHOW);

where Window is the handle to your window (duh), you can set it to 0 though

And you have to change 'setup.exe' to the exe you want to open ofc.

  • Author

If i try to run it i get these errors:

Build

[Error] Unit1.pas(29): Undeclared identifier: 'ShellExecute'

[Error] Unit1.pas(29): Undeclared identifier: 'Window'

[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'

so what to do next..?

Okay, try:

ShellExecuteA(0, 'Open', 'setup.exe', 0, 0, SW_SHOW);
  • Author

Still no success

this is my source

unit Unit1;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls;

type

TForm1 = class(TForm)

Button1: TButton;

procedure Button1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

ShellExecuteA

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);

begin

ShellExecuteA(0, 'Open', 'setup.exe', 0, 0, SW_SHOW);

end;

end.

and this is the error it gave me if i try to run it:

Build

[Error] Unit1.pas(22): ',' or ':' expected but 'IMPLEMENTATION' found

[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'

To use that function you have to declare the ShellAPI unit...

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

...and delete the line 'ShellExecuteA' here:

var
Form1: TForm1;
ShellExecuteA
implementation

Now it should run... :)

  • Author

IT WORKS!, thnx guys .. :)

Edited by HEROiC

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.