Click here to Skip to main content
15,917,793 members
Home / Discussions / C#
   

C#

 
QuestionDetermining file state (open or closed) Pin
Nitin19813-Oct-06 20:20
Nitin19813-Oct-06 20:20 
AnswerRe: Determining file state (open or closed) Pin
Steve :)3-Oct-06 20:46
Steve :)3-Oct-06 20:46 
GeneralRe: Determining file state (open or closed) Pin
Nitin19813-Oct-06 21:04
Nitin19813-Oct-06 21:04 
AnswerRe: Determining file state (open or closed) Pin
S. Senthil Kumar4-Oct-06 4:29
S. Senthil Kumar4-Oct-06 4:29 
QuestionPrevent Application Close / Detech Application started Pin
Major_A3983-Oct-06 16:14
Major_A3983-Oct-06 16:14 
AnswerRe: Prevent Application Close / Detech Application started Pin
LongRange.Shooter4-Oct-06 7:12
LongRange.Shooter4-Oct-06 7:12 
AnswerRe: Prevent Application Close / Detech Application started Pin
Major_A3984-Oct-06 12:35
Major_A3984-Oct-06 12:35 
GeneralRe: Prevent Application Close / Detech Application started Pin
LongRange.Shooter4-Oct-06 14:52
LongRange.Shooter4-Oct-06 14:52 
You can use ACL's to disallow users from running Task Manager to kill your application. When task manager kills a process, it KILLS the process.


Major_A398 wrote:
As for the alternative what you are saying is have like a control panel / menu that has all the applications and they can launch them from there?


Well...actually you would have a controller for you application which is written as a Form and defined as an MDIParent. (Properties in the Windows.Form properties)

It would present a menu or panel that lists application (actually you can control what gets listed in the menu by rights!!!) When the application is chosen from the menu it runs inside the MDIParent as one of its' children. This is similar to running the document editor instances in Word....except you are running all of the application instances.

You would probably have to have each application implement an interface so that you can easily create an instance of each application and a consistant naming standard for the form that starts the application (like Main).

A user would switch between the applications via the Window option in the Menu or would just tile the applications and pick the one they want. This also has an added benefit in that you can easily control which applications can be run as a single instance or multiple instances.

Your application just changes by being defined as an MDIParent. And as I said in an earlier post, you would create an instance of each object, set yourself as the MDIParent, and then call the Show() method. The application is now an independant child inside your frame.

All your applications get compiled as classes instead of as Windows applications. So they exist as DLL's in your library folder which prevents anyone from randomly running whatever they want. Use an external config file or a Resource file that defines an ID for each application and the namespace:assembly for each library. Then your code for launching is something like this: (I'm writing this by memory at home so don't take it as perfect, ready-to-compile:

IApplication instance = (IApplication)Application.CreateInstance( manager.GetResource(appID) );
runList.Add(instance); // make sure it does not get disposed
instance.MDIParent = this;
instance.Show();


Have fun with it.
GeneralRe: Prevent Application Close / Detech Application started Pin
Major_A3984-Oct-06 15:05
Major_A3984-Oct-06 15:05 
QuestionHow to implement a ReceiveCallback function??? Pin
CTaylor893-Oct-06 14:03
CTaylor893-Oct-06 14:03 
AnswerRe: How to implement a ReceiveCallback function??? Pin
Stefan Troschuetz3-Oct-06 21:14
Stefan Troschuetz3-Oct-06 21:14 
GeneralRe: How to implement a ReceiveCallback function??? Pin
CTaylor894-Oct-06 8:45
CTaylor894-Oct-06 8:45 
AnswerRe: remoting in c# Pin
LongRange.Shooter4-Oct-06 7:13
LongRange.Shooter4-Oct-06 7:13 
QuestionUnit Testing Pin
Jamie Nordmeyer3-Oct-06 12:56
Jamie Nordmeyer3-Oct-06 12:56 
AnswerRe: Unit Testing Pin
LongRange.Shooter4-Oct-06 7:15
LongRange.Shooter4-Oct-06 7:15 
GeneralRe: Unit Testing Pin
Jamie Nordmeyer4-Oct-06 7:17
Jamie Nordmeyer4-Oct-06 7:17 
QuestionPath of a current process? Pin
sundar1563-Oct-06 12:47
sundar1563-Oct-06 12:47 
AnswerRe: Path of a current process? Pin
User 66583-Oct-06 13:03
User 66583-Oct-06 13:03 
Questionbold and italic Pin
mostafasafy3-Oct-06 10:09
mostafasafy3-Oct-06 10:09 
AnswerRe: bold and italic Pin
Nader Elshehabi3-Oct-06 10:25
Nader Elshehabi3-Oct-06 10:25 
QuestionMODI Error Pin
smarttom993-Oct-06 9:30
smarttom993-Oct-06 9:30 
AnswerRe: MODI Error Pin
Nader Elshehabi3-Oct-06 9:39
Nader Elshehabi3-Oct-06 9:39 
QuestionWriting redirected output from an unmanaged executable to a windows form control Pin
erikash3-Oct-06 7:54
erikash3-Oct-06 7:54 
AnswerRe: Writing redirected output from an unmanaged executable to a windows form control Pin
led mike3-Oct-06 8:39
led mike3-Oct-06 8:39 
GeneralRe: Writing redirected output from an unmanaged executable to a windows form control Pin
erikash3-Oct-06 9:30
erikash3-Oct-06 9:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.