Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Automatically Starting Your Application on Windows Mobile

, 31 Jul 2008
An article discussing the various methods that you can use to automatically start an application on Windows Mobile, either by schedule or in reaction to a system event.
WiMoAutoStart_Source.zip
ShowCommandLine
bin
Debug
ShowCommandLine.exe
Win32.dll
Properties
ShowCommandLine.csproj.user
TimedStart
bin
Debug
TimedStart.exe
Win32.dll
Properties
TimedStart.csproj.user
WakeUpStart
bin
Debug
WakeUpStart.exe
Win32.dll
Properties
WakeUpStart.csproj.user
Win32
bin
Debug
Win32.dll
Properties
Win32.csproj.user
namespace WakeUpStart
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        private System.Windows.Forms.MainMenu mainMenu1;

        /// <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))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #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.mainMenu1 = new System.Windows.Forms.MainMenu();
            this.label1 = new System.Windows.Forms.Label();
            this.txtAppPath = new System.Windows.Forms.TextBox();
            this.button1 = new System.Windows.Forms.Button();
            this.cmdClear = new System.Windows.Forms.MenuItem();
            this.CmdAccept = new System.Windows.Forms.MenuItem();
            this.panel1 = new System.Windows.Forms.Panel();
            this.chkActiveSyncEnd = new System.Windows.Forms.CheckBox();
            this.chkAcPowerOff = new System.Windows.Forms.CheckBox();
            this.chkAcPowerOn = new System.Windows.Forms.CheckBox();
            this.chkNetworkConnected = new System.Windows.Forms.CheckBox();
            this.checkBox1 = new System.Windows.Forms.CheckBox();
            this.chkWakeUp = new System.Windows.Forms.CheckBox();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // mainMenu1
            // 
            this.mainMenu1.MenuItems.Add(this.CmdAccept);
            this.mainMenu1.MenuItems.Add(this.cmdClear);
            // 
            // label1
            // 
            this.label1.Location = new System.Drawing.Point(3, 1);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(100, 20);
            this.label1.Text = "Application Path";
            // 
            // txtAppPath
            // 
            this.txtAppPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtAppPath.Location = new System.Drawing.Point(3, 23);
            this.txtAppPath.Name = "txtAppPath";
            this.txtAppPath.Size = new System.Drawing.Size(204, 21);
            this.txtAppPath.TabIndex = 1;
            this.txtAppPath.Text = "\\Windows\\Calc.exe";
            // 
            // button1
            // 
            this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.button1.Location = new System.Drawing.Point(210, 23);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(27, 20);
            this.button1.TabIndex = 2;
            this.button1.Text = "...";
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // cmdClear
            // 
            this.cmdClear.Text = "&Clear";
            this.cmdClear.Click += new System.EventHandler(this.cmdClear_Click);
            // 
            // CmdAccept
            // 
            this.CmdAccept.Text = "&Accept";
            this.CmdAccept.Click += new System.EventHandler(this.CmdAccept_Click);
            // 
            // panel1
            // 
            this.panel1.AutoScroll = true;
            this.panel1.Controls.Add(this.chkWakeUp);
            this.panel1.Controls.Add(this.checkBox1);
            this.panel1.Controls.Add(this.chkNetworkConnected);
            this.panel1.Controls.Add(this.chkAcPowerOn);
            this.panel1.Controls.Add(this.chkAcPowerOff);
            this.panel1.Controls.Add(this.chkActiveSyncEnd);
            this.panel1.Controls.Add(this.label1);
            this.panel1.Controls.Add(this.button1);
            this.panel1.Controls.Add(this.txtAppPath);
            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel1.Location = new System.Drawing.Point(0, 0);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(240, 268);
            // 
            // chkActiveSyncEnd
            // 
            this.chkActiveSyncEnd.Location = new System.Drawing.Point(3, 84);
            this.chkActiveSyncEnd.Name = "chkActiveSyncEnd";
            this.chkActiveSyncEnd.Size = new System.Drawing.Size(234, 20);
            this.chkActiveSyncEnd.TabIndex = 3;
            this.chkActiveSyncEnd.Text = "Active Sync Complete";
            // 
            // chkAcPowerOff
            // 
            this.chkAcPowerOff.Location = new System.Drawing.Point(3, 110);
            this.chkAcPowerOff.Name = "chkAcPowerOff";
            this.chkAcPowerOff.Size = new System.Drawing.Size(234, 20);
            this.chkAcPowerOff.TabIndex = 4;
            this.chkAcPowerOff.Text = "AC Power Disconnected";
            // 
            // chkAcPowerOn
            // 
            this.chkAcPowerOn.Location = new System.Drawing.Point(3, 136);
            this.chkAcPowerOn.Name = "chkAcPowerOn";
            this.chkAcPowerOn.Size = new System.Drawing.Size(234, 20);
            this.chkAcPowerOn.TabIndex = 5;
            this.chkAcPowerOn.Text = "AC Power Connected";
            // 
            // chkNetworkConnected
            // 
            this.chkNetworkConnected.Location = new System.Drawing.Point(3, 162);
            this.chkNetworkConnected.Name = "chkNetworkConnected";
            this.chkNetworkConnected.Size = new System.Drawing.Size(234, 20);
            this.chkNetworkConnected.TabIndex = 6;
            this.chkNetworkConnected.Text = "Network Connected";
            // 
            // checkBox1
            // 
            this.checkBox1.Location = new System.Drawing.Point(3, 188);
            this.checkBox1.Name = "checkBox1";
            this.checkBox1.Size = new System.Drawing.Size(234, 20);
            this.checkBox1.TabIndex = 7;
            this.checkBox1.Text = "Device/Memory Card Changed";
            // 
            // chkWakeUp
            // 
            this.chkWakeUp.Checked = true;
            this.chkWakeUp.CheckState = System.Windows.Forms.CheckState.Checked;
            this.chkWakeUp.Location = new System.Drawing.Point(3, 58);
            this.chkWakeUp.Name = "chkWakeUp";
            this.chkWakeUp.Size = new System.Drawing.Size(234, 20);
            this.chkWakeUp.TabIndex = 8;
            this.chkWakeUp.Text = "Wake Up";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.AutoScroll = true;
            this.ClientSize = new System.Drawing.Size(240, 268);
            this.Controls.Add(this.panel1);
            this.Menu = this.mainMenu1;
            this.MinimizeBox = false;
            this.Name = "Form1";
            this.Text = "WakeUp Example";
            this.panel1.ResumeLayout(false);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.TextBox txtAppPath;
        private System.Windows.Forms.MenuItem cmdClear;
        private System.Windows.Forms.MenuItem CmdAccept;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.CheckBox chkActiveSyncEnd;
        private System.Windows.Forms.CheckBox chkAcPowerOff;
        private System.Windows.Forms.CheckBox chkAcPowerOn;
        private System.Windows.Forms.CheckBox chkNetworkConnected;
        private System.Windows.Forms.CheckBox checkBox1;
        private System.Windows.Forms.CheckBox chkWakeUp;
    }
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Joel Ivory Johnson
Software Developer Razorfish
United States United States
I attended Southern Polytechnic State University and earned a Bachelors of Science in Computer Science and later returned to earn a Masters of Science in Software Engineering.
 
For the past few years I've been providing solutions to clients using Microsoft technologies for web and Windows applications.
 
While most of my CodeProject.com articles are centered around Windows Phone it is only one of the areas in which I work and one of my interests. I also have interest in mobile development on Android and iPhone. Professionally I work with several Microsoft technologies including SQL Server technologies, Silverlight/WPF, ASP.Net and others. My recreational development interest are centered around Artificial Inteligence especially in the area of machine vision.
 
Follow on   Twitter

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 31 Jul 2008
Article Copyright 2008 by Joel Ivory Johnson
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid