Solved

Some issue of my application

Posted on 1997-08-26
3
141 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now