Click here to Skip to main content
15,895,142 members
Articles / Mobile Apps / Windows Mobile

Windows Mobile Interprocess Communication with Message Queues in .NET

Rate me:
Please Sign up or sign in to vote.
4.81/5 (17 votes)
15 Nov 2008CPOL11 min read 83.7K   1.1K   41  
Wrapper demonstrating the use of native message queues within managed code.
namespace J2i.Net.ReaderWriterClient
{
    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.miExit = new System.Windows.Forms.MenuItem();
            this.label1 = new System.Windows.Forms.Label();
            this.txtSourceMessage = new System.Windows.Forms.TextBox();
            this.lstReceivedMessages = new System.Windows.Forms.ListBox();
            this.cmdSend = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // mainMenu1
            // 
            this.mainMenu1.MenuItems.Add(this.miExit);
            // 
            // miExit
            // 
            this.miExit.Text = "E&xit";
            this.miExit.Click += new System.EventHandler(this.miExit_Click);
            // 
            // label1
            // 
            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.label1.Location = new System.Drawing.Point(3, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(234, 20);
            this.label1.Text = "Message";
            // 
            // txtSourceMessage
            // 
            this.txtSourceMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtSourceMessage.Location = new System.Drawing.Point(3, 23);
            this.txtSourceMessage.Name = "txtSourceMessage";
            this.txtSourceMessage.Size = new System.Drawing.Size(234, 21);
            this.txtSourceMessage.TabIndex = 1;
            // 
            // lstReceivedMessages
            // 
            this.lstReceivedMessages.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.lstReceivedMessages.Location = new System.Drawing.Point(3, 76);
            this.lstReceivedMessages.Name = "lstReceivedMessages";
            this.lstReceivedMessages.Size = new System.Drawing.Size(234, 184);
            this.lstReceivedMessages.TabIndex = 2;
            // 
            // cmdSend
            // 
            this.cmdSend.Location = new System.Drawing.Point(3, 50);
            this.cmdSend.Name = "cmdSend";
            this.cmdSend.Size = new System.Drawing.Size(72, 20);
            this.cmdSend.TabIndex = 3;
            this.cmdSend.Text = "Send";
            this.cmdSend.Click += new System.EventHandler(this.cmdSend_Click);
            // 
            // 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.cmdSend);
            this.Controls.Add(this.lstReceivedMessages);
            this.Controls.Add(this.txtSourceMessage);
            this.Controls.Add(this.label1);
            this.Menu = this.mainMenu1;
            this.Name = "Form1";
            this.Text = "Reader/Writer";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
            this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.Form1_HelpRequested);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.MenuItem miExit;
        private System.Windows.Forms.TextBox txtSourceMessage;
        private System.Windows.Forms.ListBox lstReceivedMessages;
        private System.Windows.Forms.Button cmdSend;
    }
}

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)


Written By
Software Developer
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. I've largely developed solutions that are based on a mix of Microsoft technologies with open source technologies mixed in. I've got an interest in astronomy and you'll see that interest overflow into some of my code project articles from time to time.



Twitter:@j2inet

Instagram: j2inet


Comments and Discussions