how start a MSN messenger from my program

on button_click event i want start a MSN messenger chat with known contact. Can anyone help me how to start MSN messenger and open a conversation window?

Comments

  • Hi,

    If you want to start Messenger from your application,you should go to your toolbox and select the components Tab and drag a Process to your application window.
    Under the properties of the created process1, you can set under StartInfo the FileName of Messenger to be opened.
    After this you create a button and create an Event, let's say Start Messenger.
    Hit the Enter tab and type process1.open();
    After debugging your application should open your Messenger Login screen.

    With friendly greetings,


    Yepper65
    =======================================================================
    using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;

    namespace MessengerStart
    {
    ///
    /// Summary description for Form1.
    ///
    public class Form1 : System.Windows.Forms.Form
    {
    private System.Windows.Forms.Button button1;
    private System.Diagnostics.Process process1;
    ///
    /// Required designer variable.
    ///
    private System.ComponentModel.Container components = null;

    public Form1()
    {
    //
    // Required for Windows Form Designer support
    //
    InitializeComponent();

    //
    // TODO: Add any constructor code after InitializeComponent call
    //
    }

    ///
    /// Clean up any resources being used.
    ///
    protected override void Dispose( bool disposing )
    {
    if( disposing )
    {
    if (components != null)
    {
    components.Dispose();
    }
    }
    base.Dispose( disposing );
    }

    #region Windows Form Designer generated code
    ///
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    ///
    private void InitializeComponent()
    {
    this.button1 = new System.Windows.Forms.Button();
    this.process1 = new System.Diagnostics.Process();
    this.SuspendLayout();
    //
    // button1
    //
    this.button1.Location = new System.Drawing.Point(72, 32);
    this.button1.Name = "button1";
    this.button1.TabIndex = 0;
    this.button1.Text = "Start";
    this.button1.Click += new System.EventHandler(this.StartMessenger_Click);
    //
    // process1
    //
    this.process1.StartInfo.FileName = "C:\Program Files\MSN Messenger\msnmsgr.exe";
    this.process1.SynchronizingObject = this;
    //
    // Form1
    //
    this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    this.ClientSize = new System.Drawing.Size(224, 86);
    this.Controls.Add(this.button1);
    this.Name = "Form1";
    this.Text = "Start Messenger";
    this.ResumeLayout(false);

    }
    #endregion

    ///
    /// The main entry point for the application.
    ///
    [STAThread]
    static void Main()
    {
    Application.Run(new Form1());
    }

    private void StartMessenger_Click(object sender, System.EventArgs e)
    {
    process1.Start();
    }
    }
    }
    =======================================================================
  • thnx man!
  • : on button_click event i want start a MSN messenger chat with known contact. Can anyone help me how to start MSN messenger and open a conversation window?
    :

    Simply on button click,

    Use http reqest object,
    in that pass the username, password, to have access to your msn messenger.

    Then read the entire list of friends, either match with the one whom you want to send the message to,

    Try calling the send message function,
    and there you go.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories