Click here to Skip to main content
12,696,493 members (31,627 online)
Click here to Skip to main content


126 bookmarked

The Windows Access Control Model Part 3

, 1 Jul 2005
In the third part of this series, we will take a tour of the new access control classes coming in .NET v2.0.
namespace NetAccessControl
    partial class MainMenu
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
            if (disposing && (components != null))

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
			this.subprogramSelect = new System.Windows.Forms.ComboBox();
			this.OKButton = new System.Windows.Forms.Button();
			this.descriptiveLabel = new System.Windows.Forms.Label();
			this.choiceLabel = new System.Windows.Forms.Label();
			// subprogramSelect
			this.subprogramSelect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
						| System.Windows.Forms.AnchorStyles.Right)));
			this.subprogramSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.subprogramSelect.FormattingEnabled = true;
			this.subprogramSelect.Items.AddRange(new object[] {
            "Convert Sids To User Name",
            "Read Token",
            "Make Unprivileged User",
            "Security Descriptor Factory",
            "Access Check",
			this.subprogramSelect.Location = new System.Drawing.Point(81, 47);
			this.subprogramSelect.Name = "subprogramSelect";
			this.subprogramSelect.Size = new System.Drawing.Size(171, 21);
			this.subprogramSelect.TabIndex = 2;
			// OKButton
			this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
			this.OKButton.Location = new System.Drawing.Point(258, 45);
			this.OKButton.Name = "OKButton";
			this.OKButton.Size = new System.Drawing.Size(75, 23);
			this.OKButton.TabIndex = 3;
			this.OKButton.Text = "&Open...";
			this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
			// descriptiveLabel
			this.descriptiveLabel.AutoSize = true;
			this.descriptiveLabel.Location = new System.Drawing.Point(13, 13);
			this.descriptiveLabel.Name = "descriptiveLabel";
			this.descriptiveLabel.Size = new System.Drawing.Size(207, 13);
			this.descriptiveLabel.TabIndex = 0;
			this.descriptiveLabel.Text = "Choose which program you want to launch.";
			// choiceLabel
			this.choiceLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.choiceLabel.AutoSize = true;
			this.choiceLabel.Location = new System.Drawing.Point(36, 50);
			this.choiceLabel.Name = "choiceLabel";
			this.choiceLabel.Size = new System.Drawing.Size(39, 13);
			this.choiceLabel.TabIndex = 1;
			this.choiceLabel.Text = "&Choice:";
			// MainMenu
			this.AcceptButton = this.OKButton;
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(345, 80);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
			this.Name = "MainMenu";
			this.Text = "Main Menu";



        private System.Windows.Forms.ComboBox subprogramSelect;
        private System.Windows.Forms.Button OKButton;
        private System.Windows.Forms.Label descriptiveLabel;
        private System.Windows.Forms.Label choiceLabel;


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
United States United States
Mr. Shah is a reclusive C++/C# developer lurking somewhere in the depths of the city of London. He learnt physics at Kings' College London and obtained a Master in Science there. Having earned an MCAD, he teeters on the brink of transitioning from C++ to C#, unsure of which language to jump to. Fortunately, he also knows how to use .NET interop to merge code between the two languages (which means he won't have to make the choice anytime soon).

His interests (apart from programming) are walking, football (the real one!), philosophy, history, retro-gaming, strategy gaming, and any good game in general.

He maintains a website / blog / FAQ / junk at, where he places the best answers he's written to the questions you've asked. If you can find him, maybe you can hire Mr. Shah to help you with anything C++[/CLI]/C#/.NET related Smile | :) .

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170118.1 | Last Updated 1 Jul 2005
Article Copyright 2005 by oshah
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid