Wednesday, May 2, 2012

COM in c#


Com: =Microsoft Shell Controls and Automation
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Shell32;

namespace WindowsFormsApplication1
{
    public partial class com : Form
    {
        public com()
        {
            InitializeComponent();
        }

        private void com_Load(object sender, EventArgs e)
        {

        }
        ShellClass sc = new ShellClass();
        private void button1_Click(object sender, EventArgs e)
        {
            sc.ShutdownWindows();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            sc.RefreshMenu();

        }


        private void button4_Click(object sender, EventArgs e)
        {
            sc.SetTime();
          

        }

        private void button5_Click(object sender, EventArgs e)
        {
            sc.FindComputer();
            sc.FindFiles();
            sc.FileRun();
            sc.Help();
            sc.MinimizeAll();
            sc.ControlPanelItem("C://");
            sc.EjectPC();
            sc.GetHashCode();
            sc.Windows();
            sc.Suspend();
            sc.UndoMinimizeALL();
            sc.TrayProperties();

        }
    }
}

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...