Recent

Author Topic: Eliminate Black Shell!  (Read 3659 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Eliminate Black Shell!
« on: May 21, 2010, 05:00:13 am »
Question: I created an application and everything worked, but when running before the launch a shell appears black even before arriving at line

Application.Initialize;

Does anyone know why?


program project1;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms, Unit1, myserialnumber, LResources, DBFLaz, DBSimpleComponents,
  lazreport, Unit2, UnitVariabileGlobale, GetHtml;

{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}

begin
  {$I project1.lrs}
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.Run;
end.       
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Leledumbo

  • Hero Member
  • *****
  • Posts: 8799
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Eliminate Black Shell!
« Reply #1 on: May 21, 2010, 05:18:37 am »
If you're on Windows (any other platform that can cause this?), don't forget to check "Win32 GUI application" in compiler options.

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Eliminate Black Shell!
« Reply #2 on: May 21, 2010, 05:29:49 am »
Thank you it was just that. You were very kind!
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018