Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Some issue of my application

Posted on 1997-08-26
3
Medium Priority
?
172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 100 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

636 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