Delphi Users - A couple of useful code snippets

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I've been finishing off a new plug and am now in the habit of adding a weblink and an email link to the GUI. Took me a while to suss out the first time, so I thought I'd share :)


To open a web page on a click use the following :-
ShellExecute(GetDesktopWindow(), 'open', PChar('http://www.djmarko.pwp.blueyonder.co.uk'), nil, nil, SW_SHOWNORMAL);

To open the users email client, ready to send an email to you , use :-
ShellExecute(GetDesktopWindow(), 'open', PChar('mailto:scuzzphut@blueyonder.co.uk'), nil, nil, SW_SHOWNORMAL);


Both will require you to add "shellapi" to your "uses" list under "interface"

Post

scuzzphut wrote:To open a web page on a click use the following :-
ShellExecute(GetDesktopWindow(), 'open', PChar('http://www.djmarko.pwp.blueyonder.co.uk'), nil, nil, SW_SHOWNORMAL);
Cool, I was just gearing up to research how to solve this very issue. :)

Cheers :)
Someone shot the food. Remember: don't shoot food!

Post

Hmmm. It loads the webpage alright but gives me an access violation in SX2.2....

:o :-o :o
Image
ARPocalypse - AT - wiz - DOT - nildram - DOT co - DOT - uk

Post

Ahh. For some reason this doesn't seem to like being called from a DIB component.

My solution is to put in a timer started by the DIB component and have the timer open the webpage - so decoupling the DIB component from the call.

Seems to work.
8)
Image
ARPocalypse - AT - wiz - DOT - nildram - DOT co - DOT - uk

Post

I call these from the onclick() in a dibImage. Works fine.

Thanks for sharing the workaround , though. I'll wager you're not the only one affected. :)

Post Reply

Return to “DSP and Plugin Development”