Alright, I got something working that using mutex and postmessage (no extra registry entries or files). It does not handle multiple command line arguments.
In case someone else is, in the App unit (Credit go to TometaSoftware, whosrdaddy for the hard parts, and random google results for the...
I'm sorry, BobbaFet didn't mean to leave you out :D
I like your solution, but it could probably be done with a registry entry. I do appreciate your help though, thanks.
Thanks for your comments.
TometaSoftware: It looks good, but how is it better? It seems to accomplish the same thing.. I'm fairly new to mutex. I'll be looking into mutexes.
whosrdaddy: I'm trying to make your code with mutex, because I will need to use them anyways.
Thanks!
Hi,
I'm using mutex to insure that only one instance of one of my application is running with this code (in Project.dpr):
var
hMutex: THandle;
begin
hMutex := CreateMutex(nil, False, 'termBlaster');
if WaitForSingleObject (HMutex, 0) = WAIT_TIMEOUT then
begin
MessageDlg ('Only one...
I've have a pretty simple question that I can't seem to figure out.
In the following code, XMLDoc will be freed when AOwner is free'd correct?
{...}
TServiceList = class(TListBox, IServiceView)
private
protected
XMLDoc : TXMLDocument;
{...}
constructor TServiceList.Create(AOwner...
I am trying to extend the TTreeView class.
How do I ensure that the memory of the object (it will always be an object) that is assigned to TreeNode.data is freed whenever a node is deleted in statements such as TV.Items.Clear?
I understand something like:
TNodeData(TV.Selected.Data).Free...
Thanks for the replies, but I'm afraid that I wasn't clear in my earlier post.
I have a hirearchy of TMenuItems that is dynamically generated from a Virtual Tree View. The problem lies in the TMenuItems. This TreeView has folder and leaf nodes.
My program goes through the treeview and...
Hi,
I'm fairly new to Delphi, and I want to know how to handle double click events for my menu items.
I have a simple dynamically generated menu hirearchy based off a tree view. I need users to be able to double click (or somehow select) a menu item which has children items. I could just use...
Thanks, I'll test this code out tonight.
I'm not much of a JavaScript person so I had no idea where to start, and I'm not to fond of msdn for javascript because I prefer to be create cross-platform code.
Can I play a sequence of media files with the embed tag?
I have an Open Source PHP script (http://phpmultimeed.sourceforge.net/dev/) that uses javascript to display a playlist play a list of media files. Someone has requested the ability to play a sequence of files consecutively.
I need...
>> But that doesn't change the fact that it is not necessary to have it there ;o)
Your right lol.
>>Sounds like you're running into a security issue. You can't retrieve the location of another frame if the page isn't on your server. If people could, they would be able to track your movements...
Hi,
I am trying to simulate a detach frame mechanism.
I have 2 frames, mainFrame and leftFrame. I want to be able to let users open a new window with the location of the mainFrame.
I can simulate "detach frame" if the user has not clicked a link, but when the location of the frame is changed...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.