I want to make sure that my application was running only one time. But I dont know that my application already running or not. How?

I have an example to detect delphi running or not. Surely you can use this (with little modification at function DelphiLoaded. You should try it.
Place it at form create and if your application detected running, you can close the new one. That way will avoid your application running twice.

function WindowExists(AppWindowName, AppClassName: string): Boolean;
hwd: LongWord;
hwd := 0;
hwd := FindWindow(PChar(AppWindowName), PChar(AppClassName));
Result := False;
if not (Hwd = 0) then {window was found if not nil}
Result := True;

function DelphiLoaded: Boolean;
DelphiLoaded := False;
if WindowExists('TPropertyInspector', 'Object Inspector') then
if WindowExists('TMenuBuilder', 'Menu Designer') then
if WindowExists('TAppBuilder', '(AnyName)') then
if WindowExists('TApplication', 'Delphi') then
if WindowExists('TAlignPalette', 'Align') then
DelphiLoaded := True;

procedure TForm1.Button1Click(Sender: TObject);
if DelphiLoaded then
ShowMessage('Delphi is running');

function DelphiIsRunning: Boolean;
Result := DebugHook <> 0;

71 Responses so far.

  1. SkyFlyer says:

    Works Great, Thanks A Lot!!!

  2. Anonymous says:

    Getting a good HD TV has never bееn easier. Dіsсοver the right model foг you
    аnԁ youг pockеt wіth ouг rеview at http://reviews.
    Here is my web-site -

  3. Anonymous says:

    Nice post. I learn something new and challenging on sites I stumbleupon everyday.
    It will always be interesting to read through articles from other
    authors and use a little something from their sites.

    Here is my blog :: gesetzliche krankenversicherung vergleich stiftung warentest
    My web blog ::

  4. Anonymous says:

    Definitely believe that which you stated. Your favorite justification seemed to be on the internet the easiest thing to be aware of.
    I say to you, I definitely get irked while people think
    about worries that they just don't know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people can take a signal. Will probably be back to get more. Thanks
    My site : south padre island vacation package

  5. Anonymous says:

    Hi Dear, are you in fact visiting this site regularly, if so
    then you will without doubt take nice knowledge.

    Also visit my web page free affiliate software
    Here is my page ::

  6. Anonymous says:

    Hello, of course this piece of writing is actually pleasant and I have learned lot
    of things from it on the topic of blogging. thanks.
    Feel free to visit my web page : make money from affiliate

  7. Anonymous says:

    Thank you a bunch for sharing this with
    all folks you actually recognise what you are talking about!
    Bookmarked. Kindly also talk over with my website =).

    We can have a hyperlink exchange contract between us

    Also visit my weblog; günstige krankenversicherung
    Feel free to visit my blog post ...

  8. Anonymous says:

    Hi there! This article could not be written much better! Looking at this article
    reminds me of my previous roommate! He constantly kept talking about
    this. I'll forward this article to him. Pretty sure he will have a great read. I appreciate you for sharing!
    Here is my web-site - private studentische krankenversicherung

  9. Anonymous says:

    I have been browsing online more than 2 hours today,
    yet I never found any interesting article like yours. It is pretty worth enough for me.
    In my opinion, if all webmasters and bloggers made good content as
    you did, the net will be much more useful than ever before.
    My web page ; reseller web hosting uk

  10. Anonymous says:

    Asking questions are actually pleasant thing if you are not understanding something totally, however this post provides nice understanding even.
    My web-site ; refinance with bad credit score

  11. Anonymous says:

    Heya i am for the first time here. I found this board and I find It really useful & it helped
    me out a lot. I hope to give something back and help others
    like you aided me.

    Check out my blog; how to make money clickbank
    Take a look at my webpage ...

  12. Anonymous says:

    Its not my first time to pay a visit this web page, i am visiting this site dailly and get fastidious
    data from here everyday.

    Have a look at my webpage; gesetzliche krankenversicherungsvergleich
    Feel free to visit my blog post -

  13. Anonymous says:

    Fantastic blog! Do you have any tips for aspiring writers?
    I'm planning to start my own blog soon but I'm a little lost on everything.
    Would you advise starting with a free platform like Wordpress or go for a
    paid option? There are so many options out there that I'm completely overwhelmed .. Any tips? Cheers!
    My blog post - versicherungsvergleich gesetzliche krankenversicherung

  14. Anonymous says:

    This text is priceless. How can I find out more?
    my website - visit the next document

  15. Anonymous says:

    I'm extremely impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you customize it yourself? Anyway keep up the excellent quality writing, it's rare to see a great blog like this one these days.
    Also visit my blog - work at home free jobs

  16. Anonymous says:

    I am truly thankful to the holder of this web site who has
    shared this enormous article at here.
    Also visit my page :: kleider outlet online

  17. Anonymous says:

    Very nice blog post. I definitely appreciate this website.
    Continue the good work!
    Feel free to visit my website :: kredit für hausfrau

  18. Anonymous says:

    I visited several web sites except the audio quality for audio songs present at this site is really superb.
    my page :: search engine optimization keywords

  19. Anonymous says:

    I know this web site gives quality dependent articles or reviews
    and additional stuff, is there any other web page which presents these stuff in quality?
    My blog post Web Hosting Top 10

  20. Anonymous says:

    Hmm is anyone else having problems with the images on this blog loading?

    I'm trying to find out if its a problem on my end or if it's the blog.

    Any feedback would be greatly appreciated.
    My webpage :: private student loan lender

  21. Anonymous says:

    Hi, all the time i used to check webpage posts here early in
    the morning, since i like to find out more
    and more.
    Also see my web page: quick business ideas

  22. Anonymous says:

    I love it when folks get together and share thoughts.
    Great blog, stick with it!

    Take a look at my web-site

  23. Anonymous says:

    There's certainly a great deal to learn about this topic. I like all the points you made.

    my page krankenkassen privat
    my site - private krankenversicherung vergleichsrechner

  24. Anonymous says:

    Everyone loves what you guys are usually up too. This kind of clever work
    and exposure! Keep up the awesome works guys I've you guys to blogroll.

    Here is my site private krankenversicherung informationen

  25. Anonymous says:

    I don't even know how I ended up here, but I thought this post was great. I don't know who you
    are but certainly you are going to a famous blogger
    if you aren't already ;) Cheers!

    Look into my web site - nethosting Ratings
    my webpage - nethosting Recommendations

  26. Anonymous says:

    My brother suggested I might like this blog. He used to be totally
    right. This submit actually made my day. You cann't believe just how a lot time I had spent for this information! Thank you!

    Here is my blog post; krankenversicherung für beamtenanwäRter

  27. Anonymous says:

    Good day! Do you know if they make any plugins to assist with Search Engine Optimization?

    I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very
    good gains. If you know of any please share. Cheers!

    Feel free to visit my site ... zusatzversicherung pflegeversicherung

  28. Anonymous says:

    Have you ever thought about adding a little bit more than just your articles?

    I mean, what you say is important and everything. However imagine if you added some great visuals or videos to give your posts
    more, "pop"! Your content is excellent but with images and video clips, this site could undeniably be one of the
    greatest in its field. Great blog!

    Here is my weblog ... taking out a home equity loan

  29. Anonymous says:

    I'll right away grasp your rss as I can not in finding your email subscription link or e-newsletter service. Do you have any? Please let me know in order that I may just subscribe. Thanks.

    my weblog; Page not found - International 505 Class - American Section

  30. Anonymous says:

    You really make it appear really easy together with your
    presentation however I in finding this topic to be actually one thing which I feel I'd by no means understand. It kind of feels too complicated and very extensive for me. I'm looking ahead
    in your subsequent post, I'll attempt to get the hold of it!

    My webpage - Matilda Claudia

  31. Anonymous says:

    Somebody essentially assist to make critically posts I might state.

    This is the first time I frequented your website
    page and so far? I surprised with the analysis you made to create this actual put up extraordinary.
    Excellent process!

    Also visit my homepage private krankenversicherungen im test

  32. Anonymous says:

    Hi there, just became alert to your blog through Google, and found that it's really informative. I am gonna watch out for brussels. I will be grateful if you continue this in future. Many people will be benefited from your writing. Cheers!

    Feel free to visit my site: This Web site

  33. Anonymous says:

    Hi there! This is kind of off topic but I need some advice from an established
    blog. Is it very difficult to set up your own blog?
    I'm not very techincal but I can figure things out pretty quick. I'm
    thinking about setting up my own but I'm not sure where to begin. Do you have any tips or suggestions? Appreciate it

    my homepage :: Melissa

  34. Anonymous says:

    I’m not that much of a internet reader to
    be honest but your sites really nice, keep it up! I'll go ahead and bookmark your site to come back in the future. Cheers

    My web-site; best clickbank affiliate programs

  35. Anonymous says:

    I quite like looking through an article that can make people think.
    Also, many thanks for permitting me to comment!

    Also visit my web site covered coffee beans

  36. Anonymous says:

    Hi, all the time i used to check website posts here in the early hours in the dawn, because i
    love to learn more and more.

    my website just click the up coming internet site

  37. Anonymous says:

    It's very straightforward to find out any topic on net as compared to textbooks, as I found this paragraph at this web site.

    my page - User:DickHpl - ISMP website

  38. Anonymous says:

    Hi, I do believe this is a great web site. I stumbledupon it ;) I will revisit once again since i have bookmarked it.
    Money and freedom is the best way to change, may you be rich and continue to help other people.

    Feel free to visit my homepage: fishing ski boats

  39. Anonymous says:

    I couldn't resist commenting. Very well written!

    Also visit my blog Mouse Click The Following Article

  40. Anonymous says:

    It's going to be ending of mine day, however before ending I am reading this great article to improve my know-how.

    Also visit my weblog: main page

  41. Anonymous says:

    Great blog you have here but I was curious about if you
    knew of any community forums that cover the same topics talked
    about in this article? I'd really like to be a part of online community where I can get responses from other knowledgeable individuals that share the same interest. If you have any suggestions, please let me know. Thank you!

    my web-site - cuisinart 11 plus prep

  42. Anonymous says:

    Hello there, I discovered your site via Google whilst searching for a comparable subject, your web
    site came up, it seems good. I've bookmarked it in my google bookmarks.
    Hello there, simply become alert to your weblog thru Google, and located that it's
    really informative. I'm going to be careful for brussels. I will be grateful in the event you continue this in future. A lot of folks can be benefited out of your writing. Cheers!

    Here is my webpage: coffee makers reviews

  43. Anonymous says:

    WOW just what I was looking for. Came here by searching for mesothelioma disease

    Here is my page: Going At this website

  44. Anonymous says:

    I do not even know how I ended up here, but I thought
    this post was good. I don't know who you are but certainly you are going to a famous blogger if you aren't already
    ;) Cheers!

    my blog post - 1

  45. Anonymous says:

    Great post.

    Here is my blog post search engine optimization agencies

  46. Anonymous says:

    Hello, I read your blog daily. Your story-telling style is witty, keep
    it up!

    my homepage make money as affiliate

  47. Anonymous says:

    When I originally left a comment I appear to have clicked the -Notify
    me when new comments are added- checkbox and now each time
    a comment is added I get 4 emails with the exact same comment.
    Perhaps there is a means you can remove me from
    that service? Thanks!

    Feel free to surf to my blog post; Utente:MaribelRow - FUSS Didattica

  48. Anonymous says:

    I don't know if it's juѕt me oг if evеrybody
    else encountering pгoblems ωіth уour
    website. Ӏt lookѕ likе some of the сontent in yοur posts aгe гunnіng off thе screеn.
    Ϲan ѕоmeonе elѕе please comment and let mе know if this iѕ hapрening tο thеm
    as well? This could be a іѕsue ωіth my brοwser becausе ӏ've had this happen previously. Thank you

    Review my webpage ... unsecured loans instant decision

  49. Anonymous says:

    hello!,I like your wrіting sο much!
    Should we bе in contaсt mοre about
    your artіcle on гeddit? ӏ neеd а specialist on thіs hοuse to rеsolve mу
    problеm. May bе that's you! Looking forward to peer you.

    Here is my web page - quick decision loans

  50. Anonymous says:

    Most of the blogs is not the place, but I'd like to say that this spot is genuinely forced me to not be so! Excellent post.

    Here is my web page Credit Refinance

  51. Anonymous says:

    Hi, I can’t comprehend ways to add your website in my rss reader.

    Are you able to help me, please :)

    Take a look at my web page :: kredit schlechter schufa

  52. Anonymous says:

    Hold hearing the news I only talk about finding free on the web grant applications so we looked for the very best location to get one particular.

    Also visit my homepage best uk hosting

  53. Anonymous says:

    brilliant stuff thanx :)

    Take a look at my weblog work from home business opportunity

  54. Anonymous says:

    The log appears good. Have a good day.

    Also visit my blog post: Cloud reseller hosting

  55. Anonymous says:

    Actually, as the report I'm going back up.

    Feel free to surf to my web blog home mortgage lenders bad credit

  56. Anonymous says:

    Awesome stuff thanx:)

    my webpage article source -

  57. Anonymous says:

    I don’t ordinarily respond to posts but I'll within this result in. WoW :)

    Also visit my blog can you refinance home with bad credit

  58. Anonymous says:

    That is as well Fine,

    Stop by my blog post - how to refinance a home with bad credit

  59. Anonymous says:

    Lift up the prestigious task. I appear forward to reading
    extra from you within the future.

    Also visit my blog post :: Just click the next website

  60. Anonymous says:

    I could not refrain from commenting. Well written!

    Also visit my site: teichpumpe ()

  61. Anonymous says:

    What's up Dear, are you really visiting this site regularly, if so afterward you will definitely take good experience.

    Feel free to visit my web blog: wasserspiel solar **

  62. spencermeyer says:

    while downloading online The flick app sustains 15 languages on Website the whole English, russian, Spanish, Snaptube App for Android, Windows & iOS Free Download Portuguese, Chinese, German, Italian, Hindi, Snaptube Korean, Turkish, Snaptube App Indonesian, Thai, Arabic and French.

  63. albertcarson says:

    straightforward directions to download and Mobdro Download App Set up Mobdro on Windows Know More 10 PC. Though Mobdro Application Mobdro App is designed for Android running system initially.

  64. seo com says:

    الصيانة المنزلية بجدة والمدينة المنورة للقيام بكافة ما يبحث عنه عملائنا من أعمال تمديد الغاز المركزي والسباكة والكهرباء والنجارة والدهانات وفني تركيب الدش بأمهر المتخصصين وأقل التكاليف وسرعة للتواصل مع عملائنا الكرام بجدة والمدينة.

    سباك بالمدينة المنورة
    كهربائي بالمدينة المنورة
    دهان بالمدينة المنورة
    نجار بالمدينة المنورة
    معلم سباك بجدة
    معلم كهربائي بجدة
    معلم دهان بجدة

  65. seo com says:

    جميع خدمات وأعمال الصيانة المنزلية لعملائنا بجدة والمدينة المنورة لأعمال صيانة أعطال الكهرباء وصيانة السباكة وأعمال السباكة والنجارة والكهرباء والدهانات للمنازل والفنادق والمنتجعات السياحية والمستشفيات والمدارس والمكاتب والمنشأت بأنواعها بأفضل متخصصين فى مجالات أعمال الصيانة المنزلية وتمديدات الغاز المركزي وتوفير كافة مستلزمات الكهرباء وتوفيرمستلزمات الصحي للسباكة وتركيب الدش وبرمجة الرسيفرات وتركيب الشاشات، من خلال ارقام سباك ودهان وكهربائي ونجار وفني دش بجدة والمدينة المنورة أفضل متخصصين بأرخص أسعار.

    فني سباكة بالمدينة المنورة
    فنى كهربائي بالمدينة المنورة
    معلم بوية بالمدينة المنورة
    رقم سباك بجدة
    فني دش بجدة
    رقم كهربائي بجدة
    رقم دهان بجدة
    معلم جبس بورد بجدة
    رقم فني دش بجدة
    نجار بجدة

  66. seo com says:

    شركة تيجان من أفضل الشركات التى تقوم بنقل الأثاث والعفش باحدث الاجهزة كما نقوم بشراء الأثاث
    شركة نقل عفش بالمدينة المنورة
    شركة تنسيق حدائق بالمدينة المنورة
    شركة شراء اثاث مستعمل بالمدينة المنورة
    افضل شركة مكافحة حشرات بالمدينة المنورة مكافحة القوارض والزواحف والحشرات الطائرة باستخدام أقوى المبيدات الفعالة المصرح بها من وزارة الصحة السعودية، خدماتنا لمكافحة الحشرات طوال ال 24 ساعة وأحدث معدات رش المبيدات الحشرية، مبيدات أمنة لن تغادر المنزل وليس لها أي أثار صحية على الأطفال أو الذين يعانون من أمراض الحساسية
    شركة مكافحة حشرات بالمدينة المنورة
    شركة مكافحة النمل الابيض بالمدينة المنورة
    شركة مكافحة حشرات بالمدينة المنورة
    شركة تركيب طارد الحمام بالمدينة المنورة

Post a Comment

Thank you for your comment.

Any request and idea are welcome.