Resend my activation email : Register : Log in 
BCF: Bike Chat Forums


Any Delphi programmers?

Reply to topic
Bike Chat Forums Index -> The Geek Zone
View previous topic : View next topic  
Author Message

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 15:08 - 03 Jul 2006    Post subject: Any Delphi programmers? Reply with quote

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. Embarassed
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

veeeffarr
Super Spammer



Joined: 22 Jul 2004
Karma :

PostPosted: 15:09 - 03 Jul 2006    Post subject: Reply with quote

Why Delphi?
 Back to top
View user's profile Send private message You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 15:34 - 03 Jul 2006    Post subject: Reply with quote

Because thats what I've got access too. Thumbs Up
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 15:51 - 03 Jul 2006    Post subject: Reply with quote

Sorted it now, thanks for looking. Thumbs Up Mr. Green
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

veeeffarr
Super Spammer



Joined: 22 Jul 2004
Karma :

PostPosted: 15:55 - 03 Jul 2006    Post subject: Reply with quote

gsxrmick wrote:
Sorted it now, thanks for looking. Thumbs Up Mr. Green


Sorry mate, don't know any delphi, but it is evil Razz
 Back to top
View user's profile Send private message You must be logged in to rate posts

map
Mr Calendar



Joined: 14 Jun 2004
Karma :

PostPosted: 16:00 - 03 Jul 2006    Post subject: Re: Any Delphi programmers? Reply with quote

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 Confused
HTH Thumbs Up
____________________
...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? Very Happy
 Back to top
View user's profile Send private message Send e-mail Visit poster's website You must be logged in to rate posts

NSR Mick
World Chat Champion



Joined: 26 Jun 2005
Karma :

PostPosted: 16:02 - 03 Jul 2006    Post subject: Re: Any Delphi programmers? Reply with quote

map wrote:
If you don't understand what I've written please get a grown up to help and don't use any sharp objects unsupervised.


PMSL. Thumbs Up Mr. Green
____________________
If you dont like the way that I ride.......Stop trying to keep up!!!
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

JonT
Crazy Courier



Joined: 06 Feb 2005
Karma :

PostPosted: 19:01 - 03 Jul 2006    Post subject: Reply with quote

Toby R wrote:
gsxrmick wrote:
Sorted it now, thanks for looking. Thumbs Up Mr. Green


Sorry mate, don't know any delphi, but it is evil Razz


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
View user's profile Send private message Visit poster's website 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?
  Display posts from previous:   
This page may contain affiliate links, which means we may earn a small commission if a visitor clicks through and makes a purchase. By clicking on an affiliate link, you accept that third-party cookies will be set.

Post new topic   Reply to topic    Bike Chat Forums Index -> The Geek Zone All times are GMT + 1 Hour
Page 1 of 1

 
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 cannot download files in this forum

Read the Terms of Use! - Powered by phpBB © phpBB Group
 

Debug Mode: ON - Server: birks (www) - Page Generation Time: 0.07 Sec - Server Load: 0.6 - MySQL Queries: 17 - Page Size: 61.71 Kb