What is the meaning of external navigation and internal navigation.How to develop internal and external navigations.What are the uses of start(),show()&hide() methods.
Windows Forms Example
Process.Start():process is a predifined class which is part of System.Diagnostics; baseclass library
start() is a predefined static member method of process class. This method will open a webpage based on given url.
Show()&Hide():
- Those two are predefined members of form class
- Show() will open a concern windows form
- Hide() will hide the concern windows form
Q)Example to implement internal navigation and external navigation?
Form1.cs[Design]Form1.cs
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 System.Diagnostics;
namespace linklabel
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start( "http://www.facebook.com");
}
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Form2 obj = new Form2();
obj.Show();
this.Hide();
}
}
}
Form2.cs[Design]
Form2.cs
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;
namespace linklabel
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Form1 obj = new Form1();
obj.Show();
this.Hide();
}
}
}
Output:
Whenever we Click On VisitFacebook link it will open the facebook loginpage
Whenever we Click On Next link it will open the Form2.cs window
Whenever we Click On Previous link it will open theForm1.cs window
Friend You Like My Post Please Share To Your Friends through Facebook,Twitter,Google+ etc and you feel free comment on Post.
0 comments:
Post a Comment