Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

Major_A398

@Major_A398
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Prevent Application Close / Detech Application started
    M Major_A398

    theRealCondor wrote:

    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.

    There has to be another way to do this, as I have seen this with some other apps where you can't end task on the exe.

    theRealCondor wrote:

    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.

    This isn't what I want to do at all. If someone launches Notepad.exe from where ever, start --> run notepad.exe, start -->

    C# csharp help question

  • Prevent Application Close / Detech Application started
    M Major_A398

    I already have a Closing Event: private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e) { this.Hide(); e.Cancel = true; } and when I do a Ctrl + Alt + Del then select the EXE and click end task it allows me to do this. 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? What prevents someone from just going to c:\windows\system32\notepad.exe from the start --> run, or start --> Programs doing it this way?

    C# csharp help question

  • right mouse click on tree node
    M Major_A398

    Here is how I have done it: private void treeView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if(e.Button == MouseButtons.Right) { treeView1.SelectedNode = treeView1.GetNodeAt (e.X ,e.Y ); } }

    C# data-structures help

  • Prevent Application Close / Detech Application started
    M Major_A398

    I'm looking for a way in C#.NET 2.0 to not allow my application from being closed by Task Manager by doing an End Task. Was thinking about displaying an error message saying you can't close this task. Any Ideas? Also I'm looking for a way to detect certain applications are started and not allow them to start with a message box that says something like "Not aloud to run this app".

    C# csharp help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups