|
Author |
Message |
NSR Mick |
This post is not being displayed .
|
NSR Mick World Chat Champion
Joined: 26 Jun 2005 Karma :
|
Posted: 15:08 - 03 Jul 2006 Post subject: Any Delphi programmers? |
|
|
I need to write a simple application that will open one of 4 .pif files depending on which button is pressed.
The problem being is that I'm a complete noob when it comes to programming. ____________________ If you dont like the way that I ride.......Stop trying to keep up!!! |
|
Back to top |
|
You must be logged in to rate posts |
|
|
veeeffarr |
This post is not being displayed .
|
veeeffarr Super Spammer
Joined: 22 Jul 2004 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
NSR Mick |
This post is not being displayed .
|
NSR Mick World Chat Champion
Joined: 26 Jun 2005 Karma :
|
Posted: 15:34 - 03 Jul 2006 Post subject: |
|
|
Because thats what I've got access too. ____________________ If you dont like the way that I ride.......Stop trying to keep up!!! |
|
Back to top |
|
You must be logged in to rate posts |
|
|
NSR Mick |
This post is not being displayed .
|
NSR Mick World Chat Champion
Joined: 26 Jun 2005 Karma :
|
Posted: 15:51 - 03 Jul 2006 Post subject: |
|
|
Sorted it now, thanks for looking. ____________________ If you dont like the way that I ride.......Stop trying to keep up!!! |
|
Back to top |
|
You must be logged in to rate posts |
|
|
veeeffarr |
This post is not being displayed .
|
veeeffarr Super Spammer
Joined: 22 Jul 2004 Karma :
|
Posted: 15:55 - 03 Jul 2006 Post subject: |
|
|
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
map |
This post is not being displayed .
|
map Mr Calendar
Joined: 14 Jun 2004 Karma :
|
Posted: 16:00 - 03 Jul 2006 Post subject: Re: Any Delphi programmers? |
|
|
gsxrmick wrote: | ...simple application that will open one of 4 .pif files depending on which button is pressed... |
Ok, how did you sort it?
My solution would have been, assuming the pif is to open archive files...
In Delphi create your form with the 4 push buttons.
Then on the event OnClick for each of the buttons add the following:-
LoadExe('<path and name of exe to open pif>', '<pif name to open>');
then declare a function to do this (needs to use Delphi ShellAPI)
function LoadExe( ExeName, Params : string; ): HWND;
var
pcParams,
pcName : PChar;
handle : HWND;
begin
pcParams := StrAlloc(1024);
pcName := StrAlloc(1024);
StrPCopy(pcParams,Params);
StrPCopy(pcName,ExeName);
handle := ShellExecute(0, 'open', pcName, pcParams, NIL, SW_NORMAL);
StrDispose(pcParams);
StrDispose(pcName);
result := handle;
end;
.. add your own error handling if handle <= 32 if you want.
No doubt you've found something easier
HTH ____________________ ...and the whirlwind is in the thorn trees, it's hard for thee to kick against the pricks...
Gibbs, what did Duckie look like when he was younger? |
|
Back to top |
|
You must be logged in to rate posts |
|
|
NSR Mick |
This post is not being displayed .
|
NSR Mick World Chat Champion
Joined: 26 Jun 2005 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
JonT |
This post is not being displayed .
|
JonT Crazy Courier
Joined: 06 Feb 2005 Karma :
|
Posted: 19:01 - 03 Jul 2006 Post subject: |
|
|
Delphi is actually rather good toby :p
I'm forced to use Java in uni, was forced to use Delphi in college, and first learned using visual basic.
I can just about do C/C++ if I keep a reference card about cos once you know one language its just a matter of syntax (and other nasties like pointers) to deal with.
If I have to write an application I go with Delphi first every time. It is amazingly quick to throw together some applications with. Visual Basic has become good recently but i just have a personal dislike of its syntax.
Java is long winded as hell, takes me a while to write anything in it, but it has its advantages (good as applets, nice not to recompile for different systems, not that I'm ever asked to do anything none windows anyway).
At the end of the day my personal prefference doesn't matter, its just nice to be able to say yes when your employer wants something done a certain way. |
|
Back to top |
|
You must be logged in to rate posts |
|
|
Old Thread Alert!
The last post was made 17 years, 303 days ago. Instead of replying here, would creating a new thread be more useful? |
|
|
|