Solved

Some issue of my application

Posted on 1997-08-26
3
157 Views
Last Modified: 2010-04-06
Hi yee,

I've got a problem. I want to build an application which can be running
one instance at one time. A know a solution but it works only when the
application was loaded into the memory. Is there any chance to provide
this, I mean the code must be compiled under some extra circumstances.
For example the operating system, Windows95 can recognise that this
application can be run in one instance at one time.

Any help regarded,

Ciao

Andrew Kabdebon

ethkaan@eth.ericsson.se
0
Comment
Question by:bandi081497
3 Comments
 
LVL 1

Expert Comment

by:peter_vc
ID: 1342534
By issue I assume you mean instance?  You want to restrict your program so that only one copy can be running.

I also think you want to restrict it so that only one copy will run anywhere on a network at any given time.  Is this correct?

Its difficult to understand the question.  Are you actually writing it for Windows 95?


0
 

Author Comment

by:bandi081497
ID: 1342535
Edited text of question
0
 
LVL 5

Accepted Solution

by:
ronit051397 earned 50 total points
ID: 1342536
try this. write it in the dpr file.
--------------------------------------------------------
var FWindow: THandle;
Begin
  FWindow:=FindWindow('TfMain',write here the caption of the form or nil);//find a window by the class of the form, in this case is TfMain
  if FWindow<>0 then
  begin
    SetForegroundWindow(FWindow);
    ShowWindow(FWindow,SW_SHOW);
    Application.Terminate;
    Exit;
  end;

  Application.Initialize;
  Application.CreateForm(TfMain, fMain);
  Application.Run;
end.
--------------------------------------------------------
this is not an elegant solution but...
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question