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 


[Help] Delphi

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
DevilGilad
Grandmaster Cheater
Reputation: 0

Joined: 10 May 2007
Posts: 624
Location: Delete C:\WINDOWS folder and you'll be able to see me.

PostPosted: Sat Jun 30, 2007 12:55 pm    Post subject: [Help] Delphi Reply with quote

I want to open with Delphi my own program (like music [mp3 for example]).
I got one button and one textbox...
I want the button do something like that:

ShellExecute(Handle, 'Open', 'C:\lol\pwnt\'+Edit1.Text+'.mp3', nil, nil, SW_SHOWNORMAL);

It tells me that there's an errors.
The errors are:

[Error] Unit1.pas(408): Incompatible types: 'String' and 'PAnsiChar'
[Fatal Error] Project1.dpr(7): Could not compile used unit 'Unit1.pas'

What do I have to do to fix this problem...?
Thx :]

_________________
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sat Jun 30, 2007 12:57 pm    Post subject: Reply with quote

ShellExecute(Handle, 'Open', PChar('C:\lol\pwnt\'+Edit1.Text+'.mp3'), nil, nil, SW_SHOWNORMAL);
Back to top
View user's profile Send private message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sat Jun 30, 2007 12:58 pm    Post subject: Reply with quote

you must use .res files to open mp3 files (if you want it to be played on all computers, not only yours) else you need a Tmediaplayer component before you can play .mp3's
Back to top
View user's profile Send private message MSN Messenger
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sat Jun 30, 2007 1:00 pm    Post subject: Reply with quote

Kevinnn, stop spewing nonsense. You DON'T need to embed them in your application, how do you think all media players work when you tell them to play an external mp3 file? embed it in a resource file and recompile themselves?!

Last edited by appalsap on Sat Jun 30, 2007 1:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
DevilGilad
Grandmaster Cheater
Reputation: 0

Joined: 10 May 2007
Posts: 624
Location: Delete C:\WINDOWS folder and you'll be able to see me.

PostPosted: Sat Jun 30, 2007 1:02 pm    Post subject: Reply with quote

Kevinnn wrote:
you must use .res files to open mp3 files (if you want it to be played on all computers, not only yours) else you need a Tmediaplayer component before you can play .mp3's

My program installs itself on C:\ driver, so dun worry bout it...

appalsap wrote:
ShellExecute(Handle, 'Open', PChar('C:\lol\pwnt\'+Edit1.Text+'.mp3'), nil, nil, SW_SHOWNORMAL);

Thx, appalsap :]

_________________
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
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