locked
navigation in 6.5 mobile apps ? RRS feed

  • Question

  • How to navigate from one form to other form ?how to pass varieables from one form to another form in that 6.5 apps.

    can u tell me i'm new in 6.5 apps developement.

    Friday, August 27, 2010 5:51 AM

Answers

  • How to navigate from one form to other form ?how to pass varieables from one form to another form in that 6.5 apps.

    can u tell me i'm new in 6.5 apps developement.

    NOTE: First thing you must be choosing appropriate forum for asking relevant questions. This forum category is dedicated for Device Emulator.

    There is way to navigate forms, one form to another form such as if you want to go Form1 to Form2 and also want to pass some values in form2 then you have to write your own contractor with parameters. And if you want to use some use global variable in through out the application the you can use public static variables in your application to pass the value one form to another form.

    See below code snippet:

    Form1.CS

    private

     

    void OpenNewForm()
    {
    Form2 oFrm = new Form2(1, 2, "PassValue");
    oFrm.Show();
    }

     

    Form2.CS
    public partial class Form2 : Form
    {
    int intValues1, intValues2;
    string sValue1;

     

    }

    Cheer

    Hope this may be help.

     


    If you find my post is helpful for you then mark as a answer.

    default constructor
    public
    Form2()
    {
    InitializeComponent();
    }


    public Form2(int values1, int values2, string strValue1)
    {
    intValues1 = values1;
    intValues2 = values2;
    sValue1 = strValue1;
    InitializeComponent();
    }

     

     

     

    Friday, August 27, 2010 7:58 AM
  • Hi Windows phone7,

    Offcourse you need pass parameters to constructor , In addition to Wmdev's reply please see the thread below that shows how to achieve this by using global static vaiables..

     

    http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/9c24bf2d-7b2e-4038-a367-b6250dbb063b

     

    For constructor related details check this

    http://www.codeproject.com/KB/dotnet/ConstructorsInCSharp.aspx


    Thanks, Mohsin Shaikh. If you find my post is helpful for you then mark it as answer.
    Monday, August 30, 2010 8:40 AM

All replies

  • How to navigate from one form to other form ?how to pass varieables from one form to another form in that 6.5 apps.

    can u tell me i'm new in 6.5 apps developement.

    NOTE: First thing you must be choosing appropriate forum for asking relevant questions. This forum category is dedicated for Device Emulator.

    There is way to navigate forms, one form to another form such as if you want to go Form1 to Form2 and also want to pass some values in form2 then you have to write your own contractor with parameters. And if you want to use some use global variable in through out the application the you can use public static variables in your application to pass the value one form to another form.

    See below code snippet:

    Form1.CS

    private

     

    void OpenNewForm()
    {
    Form2 oFrm = new Form2(1, 2, "PassValue");
    oFrm.Show();
    }

     

    Form2.CS
    public partial class Form2 : Form
    {
    int intValues1, intValues2;
    string sValue1;

     

    }

    Cheer

    Hope this may be help.

     


    If you find my post is helpful for you then mark as a answer.

    default constructor
    public
    Form2()
    {
    InitializeComponent();
    }


    public Form2(int values1, int values2, string strValue1)
    {
    intValues1 = values1;
    intValues2 = values2;
    sValue1 = strValue1;
    InitializeComponent();
    }

     

     

     

    Friday, August 27, 2010 7:58 AM
  • Hi Windows phone7,

    Offcourse you need pass parameters to constructor , In addition to Wmdev's reply please see the thread below that shows how to achieve this by using global static vaiables..

     

    http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/9c24bf2d-7b2e-4038-a367-b6250dbb063b

     

    For constructor related details check this

    http://www.codeproject.com/KB/dotnet/ConstructorsInCSharp.aspx


    Thanks, Mohsin Shaikh. If you find my post is helpful for you then mark it as answer.
    Monday, August 30, 2010 8:40 AM