Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Delphi - Hide console window

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Hatschi
Master Cheater
Reputation: 2

Joined: 28 Jan 2010
Posts: 323

PostPosted: Wed May 17, 2017 11:14 am    Post subject: Delphi - Hide console window Reply with quote

in lazarus I've created a new console project file. How can I hide the console window that appears if I run the project? (I don't want to use a form project because its large in size).

I've tried the following code which I found via google search but that doesn't work:

Code:

program unit1;


uses
  Windows,
  Shellapi;

  function GetConsoleWindow: HWND; stdcall; external kernel32;

  procedure Main;
  begin
    ShowWindow(GetConsoleWindow, SW_HIDE);
  end;

begin
  Main;
end.               
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 345

Joined: 09 May 2003
Posts: 20115
Location: The netherlands

PostPosted: Wed May 17, 2017 2:35 pm    Post subject: Reply with quote

compile it as a gui projects
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
flashcoder
Newbie cheater
Reputation: 0

Joined: 29 Jan 2017
Posts: 13

PostPosted: Wed May 17, 2017 2:51 pm    Post subject: Reply with quote

In Delphi you can do

replacing:

Code:

{$APPTYPE CONSOLE}


with:

Code:

{$APPTYPE GUI}
Back to top
View user's profile Send private message
Hatschi
Master Cheater
Reputation: 2

Joined: 28 Jan 2010
Posts: 323

PostPosted: Fri May 19, 2017 2:17 pm    Post subject: Reply with quote

Compiling as GUI project did the trick thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites