Showing posts with label Windows Form Applications. Show all posts
Showing posts with label Windows Form Applications. Show all posts

Sending SMS with C sharp using mobile phone

Sending SMS Via Windows Form Application Using any Android Smart Phone 

Sending SMS with C sharp using mobile phone

Sending SMS with C sharp using mobile phone

Source Code 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GsmComm.GsmCommunication;
using GsmComm.Interfaces;
using GsmComm.PduConverter;
using GsmComm.Server;
using System.IO;
using System.Data.OleDb;
using System.Management;
namespace Helper
{
    public partial class Form1 : Form
    {

        public static Int16 Comm_Port = 0;
        public static Int32 Comm_BaudRate = 0;
        public static Int32 Comm_TimeOut = 0;
        public static GsmCommMain comm;
        DataSet dataSet, dataSet1 = new DataSet();
        
        public Form1()
        {
            InitializeComponent();
        }


        private void button1_Click(object sender, EventArgs e)
        {

            string CELL_Number, SMS_Message;

            SmsSubmitPdu pdu1;

            try
            {

                if (comm.IsConnected() == true)
                {
                    if (Cell_Num.Text.ToString() == "")
                    {
                        MessageBox.Show("Kindly Add Cell Number\r\n\nFor Example\n\n+9231234567", "Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        return;
                    }
                    else if (SMS_Text.Text.ToString() == "")
                    {
                        MessageBox.Show("Kindly Add Your Message Text", "Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        return;
                    }

                    CELL_Number = Cell_Num.Text.ToString();
                    SMS_Message = SMS_Text.Text.ToString();

                    MessageBox.Show("Kindly Re-Check Your SMS & CELL NUMBER \r\n\nCELL # : " + CELL_Number + "\r\n\nMESSAGE TEXT : "+SMS_Message ,"SMS INFO", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

                    try
                    {
                        Cursor.Current = Cursors.WaitCursor;

                        pdu1 = new SmsSubmitPdu(SMS_Message, CELL_Number, "");

                        comm.SendMessage(pdu1);

                        Cursor.Current = Cursors.Default;

                        MessageBox.Show("M E S S A G E - S E N T", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    }

                    catch (Exception E5)
                    {

                        MessageBox.Show("Error Sending SMS To Destination Address\r\n\n Connection Has Been Terminated !!!\r\n\n", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        comm.Close();
                        button9.Enabled = true;
                        button10.Enabled = false;
                        Single_SMS.Enabled = false;
                        dataGridView3.Rows.Clear();

                    }
                    
                }
                else
                {
                    MessageBox.Show("No GSM Phone / Modem Connected", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
            catch (Exception E10)
            {
                MessageBox.Show("CONNECTION ERROR", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            }           

        }

        private void Form1_Load(object sender, EventArgs e)
        {            
          
            button10.Enabled = false;
         
        }

        private void label30_DoubleClick(object sender, EventArgs e)
        {
            MessageBox.Show(":-)\r\n\nLet The SMS Begin...!!!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        
        private void button9_Click(object sender, EventArgs e)
        {
            //Setting the column grid for fetched data

            dataGridView3.ColumnCount = 5;
            dataGridView3.Columns[0].Name = "COM Port";
            dataGridView3.Columns[1].Name = "Connected Device";
            dataGridView3.Columns[2].Name = "Max Baud Rate";
            dataGridView3.Columns[3].Name = "Time Out";
            dataGridView3.Columns[4].Name = "Status";
            dataGridView3.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_SerialPort");                                       

                foreach (ManagementObject queryObj in searcher.Get())
                {

                    if (queryObj != null)
                    {
                        object captionObj = queryObj["DESCRIPTION"];
                        object capdeviceid = queryObj["DEVICEID"];
                        object MaxBaudRate = queryObj["MAXBAUDRATE"];
                        object connstatus = queryObj["STATUS"];
                        string timeoutsec = "100";
                        dataGridView3.Rows.Add(capdeviceid, captionObj, MaxBaudRate, timeoutsec, connstatus);
                    }
                }

            }

            catch (Exception e15)
            {
                MessageBox.Show("An error occurred while querying for WMI data: " + e15.Message);
            }

            Cursor.Current = Cursors.Default;
            button9.Enabled = false;
            button10.Enabled = true;
        }
        

        private void dataGridView3_CellClick(object sender, DataGridViewCellEventArgs e)
        {

            DataGridViewCellStyle style = new DataGridViewCellStyle();

            style.Font = new Font(dataGridView3.Font, FontStyle.Bold);            
            style.BackColor = Color.Green;
            style.ForeColor = Color.White;
            

                int i = dataGridView3.CurrentRow.Index;
                

                try
                {
                    Comm_Port =     Convert.ToInt16(dataGridView3.Rows[i].Cells[0].Value.ToString().Substring(3));
                    Comm_BaudRate = Convert.ToInt32(dataGridView3.Rows[i].Cells[2].Value.ToString());
                    Comm_TimeOut =  Convert.ToInt32(dataGridView3.Rows[i].Cells[3].Value.ToString());
                }
                catch (Exception E1)
                {
                   // MessageBox.Show("Select a phone Model", "Check COM Port Values", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                comm = new GsmCommMain(Comm_Port, Comm_BaudRate, Comm_TimeOut);

                try
                {

                        comm.Open();
                        if (comm.IsConnected())
                        {

                          //  pictureBox3.Image = imageList1.Images[1];

                            MessageBox.Show("Connected Successfully To Mobile ", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            dataGridView3.Rows[i].Cells[4].Value = "Connected";
                            dataGridView3.Rows[i].DefaultCellStyle = style;
                            dataGridView3.ClearSelection();
                            Single_SMS.Enabled = true;

                        }

                        try
                        {
                            //Phone_Name.Text = comm.IdentifyDevice().Manufacturer.ToUpper().ToString();
                            //Phone_Model.Text = comm.IdentifyDevice().Model.ToUpper().ToString();
                            //Revision_Num.Text = comm.IdentifyDevice().Revision.ToUpper().ToString();
                            //Serial_Num.Text = comm.IdentifyDevice().SerialNumber.ToUpper().ToString();
                        }
                        catch (Exception e50)
                        {
                            MessageBox.Show("Error Retriving COM Port Phone Information", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    

                }
                catch (Exception E2)
                {
                    //MessageBox.Show("Error While Connecting To GSM Phone / Modem", "Information", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    dataGridView3.ClearSelection();

                }
        }


        private void button10_Click_1(object sender, EventArgs e)
        {
            try
            {
                if (!comm.IsConnected())
                {
                    MessageBox.Show("No Phone Connected", "Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
                else
                {

                    comm.Close();
                
                    button9.Enabled = true;
                    button10.Enabled = false;
                    Single_SMS.Enabled = false;
                    dataGridView3.Rows.Clear();
                   
                   
                    MessageBox.Show("Disconnected Successfully", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);

                }
            }

            catch (Exception No_Conn)
            {

                MessageBox.Show("No Phone Connected!!\r\n\n" + No_Conn, "Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

            }
        }
        

        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            try
            {
                if (comm.IsOpen() == true)
                {                    
                    comm.Close();
                }
            }
            catch (Exception E16)
            {               
                Application.Exit();
            }

            Application.Exit();
        }
        

        private void SMS_Text_TextChanged(object sender, EventArgs e)
        {
           // label4.Text = "Characters Left : "+(160 - SMS_Text.Text.Length).ToString();
        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void SMS_Text_Click(object sender, EventArgs e)
        {
            SMS_Text.Text = "";
        }

        private void comboBox1_Click(object sender, EventArgs e)
        {
            comboBox1.DroppedDown = true;
        }

        private void SMS_Text_Click_1(object sender, EventArgs e)
        {
            SMS_Text.Text = "";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Single_SMS_Click(object sender, EventArgs e)
        {

            string CELL_Number, SMS_Message;

            SmsSubmitPdu pdu1;

            try
            {

                if (comm.IsConnected() == true)
                {
                    if (Cell_Num.Text.ToString() == "")
                    {
                        MessageBox.Show("Kindly Add Cell Number\r\n\nFor Example\n\n+9231234567", "Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        return;
                    }
                    else if (SMS_Text.Text.ToString() == "")
                    {
                        MessageBox.Show("Kindly Add Your Message Text", "Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        return;
                    }

                    CELL_Number = Cell_Num.Text.ToString();
                    SMS_Message = SMS_Text.Text.ToString();

                   // MessageBox.Show("Kindly Re-Check Your SMS & CELL NUMBER \r\n\nCELL # : " + CELL_Number + "\r\n\nMESSAGE TEXT : " + SMS_Message, "SMS INFO", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

                    try
                    {
                        Cursor.Current = Cursors.WaitCursor;

                        pdu1 = new SmsSubmitPdu(SMS_Message, CELL_Number, "");

                        comm.SendMessage(pdu1);

                        Cursor.Current = Cursors.Default;

                        MessageBox.Show("Message Sent Successfully!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    }

                    catch (Exception E5)
                    {

                        MessageBox.Show("Error Sending SMS To Destination Address\r\n\n Connection Has Been Terminated !!!\r\n\n", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        comm.Close();
                    
                        button9.Enabled = true;
                        button10.Enabled = false;
                        Single_SMS.Enabled = false;
                      

                    }


                }
                else
                {
                    MessageBox.Show("No GSM Phone / Modem Connected", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
            catch (Exception E10)
            {
                MessageBox.Show("CONNECTION ERROR", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            }           

        }

        private void Single_SMS_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Enter)
            {
                Single_SMS.PerformClick();
              
            }
        }
        }
    }

C sharp windows clipboard text



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 WindowsFormsApplication8

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        private void button1_Click(object sender, EventArgs e)

        {
            String cbtext = textBox1.Text;
            Clipboard.SetText(cbtext);

        }

    }

}


How to get text from windows clipboard in windows form application



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 WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

     
              private void button1_Click(object sender, EventArgs e)
     
      {
            String cbtext = Clipboard.GetText();
            label2.Text = cbtext;
           
           
        }
    }
}


csharp windows gadget



Using C# you can have your  own Windows 7. Desktop Google Gadget. Now you can  Search any web , image , Android application or even a  You tube Video directly from Your Desktop. In this tutorial we will teach you to build your own Windows 7 Desktop Google Gadget.

 First of all you may notice that above form is border less and if you make your form border less  you  won't  be able to move it after debugging your application. so for this you have to study one of our  Tutorial on  how to move Borderless form.

using System.Diagnostics;
//Design  your form  and then  you have to  following code in  Go button .
private void gobtn_Click_1(object sender, EventArgs e)     
  {
         if (webrbtn.Checked == true)
Process.Start("https://www.google.com.pk/?gws_rd=cr&ei=qHlKUobnMqSN4ATH_4CIBQ#q=" + txt.Replace(" ", "+"));

else if
                (img_rbtn.Checked == true)

Process.Start("https://www.google.com.pk/search?q="+txt+"l&um=1&ie=UTF-8&hl=en&tbm=isch&source=ogsa=Ntab=wi&ei=FnxKUrbqDKbR4QT5z4DQBw#hl=en&q=" + rep + "&tbm=isch&um=1");

else if
               
           (playrbtn.Checked == true)
Process.Start("https://play.google.com/storehl=en&q="+rep+ "&bav=on.2,or.r_cp.r_qf.&bvm=bv.53371865,d.bGE,pv.xjs.s.en_US.i8jRULGL-Ys.O&biw=1280&bih=913&dpr=1&ie=UTF-8&sa=N&tab=i8");


      else if
(youtuberbtn.Checked ==true)

Process.Start("https://www.youtube.com/results?search_query="+rep+"&oq="+rep+"&"gs_l=youtube.3..0l10.711.3520.0.3682.16.10.0.0.0.0.694.3126.3j0j1j5-4.8.0...0.0...1ac.1.11.youtube.kzRdIqQpQ-Y");

}

private void searchtb_KeyDown(object sender, KeyEventArgs e)
    {
       if (e.KeyCode == Keys.Enter)
       {
       gobtn_Click_1((object)sender, (EventArgs)e);
        }
    }

C sharp two combo boxes


Source Code 

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;



namespace ComboBox

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        private void Form1_Load(object sender, EventArgs e)

        {

            comboBox1.Items.Add("BATA");

            comboBox1.Items.Add("SERVICE");
         }



        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)

        {

               comboBox2.Items.Clear();

               if (comboBox1.SelectedItem == "BATA")

            {

                comboBox2.Items.Add("BATA MALE SHOES");

                comboBox2.Items.Add("BATA LADIES SHOES");

                comboBox2.Items.Add("BATA KIDS SHOES");

            }

            else if (comboBox1.SelectedItem == "SERVICE")

            {

                comboBox2.Items.Add("SERVICE LADIES SHOES");

                comboBox2.Items.Add("SERVICE MALE SHOES");

                comboBox2.Items.Add("SERVICE KIDS SHOES");

            }

        }

    }

}


c sharp Linked List Implementation


SOURCE CODE 


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace linklist
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }


                   LinkedList<string> LinkedList = new LinkedList<string>();

          

        private void button1_Click(object sender, EventArgs e)
        {

            listBox1.Items.Clear();
            textBox1.Text = "";
            foreach (var item in LinkedList)
            {
                listBox1.Items.Add(item);
           
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
           
          
        }

        private void button2_Click(object sender, EventArgs e)
        {
            string add = textBox1.Text;
             
            if (FirstRb.Checked)
            {
                string find = listBox1.SelectedItem.ToString();

                LinkedListNode<string> node = LinkedList.Find(find);

                LinkedList.AddAfter(node, add);
               
           
            }
           
            else if(secRb.Checked)


            {
             
                string find = listBox1.SelectedItem.ToString();

                LinkedListNode<string> node = LinkedList.Find(find);

                LinkedList.AddBefore(node, add);
            }

            else


            LinkedList.AddLast(textBox1.Text);
            statusLabl.Text = "Status : " + textBox1.Text + "  Added to List";
           
  }

   
        private void button3_Click(object sender, EventArgs e)
        {
           
           
            try
            {


                string RemoveItem = listBox1.SelectedItem.ToString();

                // LinkedList.RemoveLast();
                LinkedList.Remove(RemoveItem);
                statusLabl.Text = "Status : " + RemoveItem + "  Removed  From List";

             
            }
            catch (Exception ) { MessageBox.Show("Please! Select A Value in List","Stop"); }
        }

                  private void textBox1_Click(object sender, EventArgs e)
        {
                             textBox1.Text = "";
        }
    }

}

c sharp Transparent Windows Form

 
Using C#  you can have a transparent Form by using the following program. the following code is called in Form load event of windows form.

Soruce Code :


 private void Myform_Load(object sender, EventArgs e)
        {

            this.TransparencyKey = Color.Black;
            this.BackColor = Color.Black;
        }

c sharp Group Box

Group Box Control :

Group box control in C# windows form Application Group the similer controls and apply same properties on all control inside group box . using a Group box  is very time saving  , you dont have to set font  , size color  properties of all control you have to just set it once and  will be applied to all control in that group Box.

As you can see in above example the font size property is set once  of group box and all control in the group box are  having the same property (font size) same Date&Time Picker is placed under the group box which have default properties.  
Date and Time Picker 
in C# windows Form application Date & time picker control provide the current date in time in C# windows form applications. the date and time is picked by the users system on which  your program will run .  used to keep time and date of operations performed in  Database applications.

c sharp Web Browser

C# windows form application allow you to browse any webpage in windows form application.  for doing so just add webbrowser Control to your form and set a text box  for URL where user will enter there URL. Drop a button when user click that button so that your form's web Browser should navigate to the  URL in text box in form.

 Now  to navigate to a web page use the following Program . Web Browser navigation works as  follow:

Go to onclick Event of the button used in your program to start navigation now use the following code

  webbrowser1.navigate(textbox1.text);
and this how your  URL from Textbox1 will be navigated in Browser.

NOTE :  You can also add Go back and go Forward  Buttons to your new web Browser for that purpose  use the following code.

if(webbrowser1.CanGoBack)
{
    webbrowser1.GoBack();

}

if(webbroswer1.CanGoForward)
{
   webbroswer1.GoForward();

}

c sharp Progress Bar

C# using Progress bar in windows form application  show the progress of Downloading or uploading file from C# windows application or other operations which performs behind the scenes of program execution

Progress Bar can be drop form tool box  in order to use it in C# windows form applications
inside click event of button from where you want start your progress set some of the following values. let say your progress bar is progressbar1.

progressbar1.Maximum=100;
progressbar1.minimum=0;

for(int x =0 ; <100 ; x++)
{
       progressbar1.value=x++;
 }

when user clicks on that button your progress bar will be start automatically and will goes up to your maximum value set in progress bar 's Maximum.

c sharp tab control

C# windows form application allow  you to create multi tabs in a single  windows form appllications.
Tab control is  simple just drag it out of or click on tab control in tool box inside Visual studio . you can add other controls too .  each tab in tab Control.
 As shown in above pic  you can add separate controls to tab 1 and same in tab 2.  when a user runs your program and he clicks on tab 1 the tab 1 contents will be show to him or if he click  on tab 2 then  the tab1 will hide its content and tab 2 's contents will be show to him .

c sharp Open File Dialog Box

OpenFileDialog allows users to browse folders and select files. It is available in Windows Forms and can be used with C# code. It displays the standard Windows dialog box. The results of the selection can be read in your C# code.

You can open the OpenFileDialog that is in your Windows Forms program. The dialog will not open automatically and it must be invoked in your custom code. You will want to use an event handler to open the dialog in your C# code.
Here: We will use a button in this tutorial, which when clicked will open the dialog.
You can add a Button control—this can be clicked on to call into the OpenFileDialog window. To add a Button, find the Button icon in the Toolbox and drag it to an area in your Windows Forms window.

c sharp print Dialog Box

A Print Dialog control is used to open the Windows Print Dialog and let user select the printer, set printer and paper properties and print a file. A typical Open File Dialog looks like Figure 1 where you select a printer from available printers, set printer properties, set print range, number of pages and copies and so on. Clicking on OK button sends the document to the printer. 
 
PrintDlgImg1.jpg
Figure 1
Creating a PrintDialog
We can create a PrintDialog at design-time as well as at run-time.
Design-time
To create a PrintDialog control at design-time, you simply drag and drop a PrintDialog control from Toolbox to a Form in Visual Studio. After you drag and drop a PrintDialog on a Form, the PrintDialog looks like Figure 2. 



Creating a PrintDialog control at run-time is simple. First step is to create an instance of PrintDialog class and then call the ShowDialog method. The following code snippet creates a PrintDialog control.
PrintDialog PrintDialog1 = new PrintDialog();
PrintDialog1.ShowDialog();

Printing Documents


PrintDocument object represents a document to be printed. Once a PrintDocument is created, we can set the Document property of PrintDialog as this document. After that we can also set other properties.  The following code snippet creates a PrintDialog and sends some text to a printer.
private void PrintButton_Click(object sender, EventArgs e)
{
    PrintDialog printDlg = new PrintDialog();
    PrintDocument printDoc = new PrintDocument();
    printDoc.DocumentName = "Print Document";
    printDlg.Document = printDoc;
    printDlg.AllowSelection = true;
    printDlg.AllowSomePages = true;
    if (printDlg.ShowDialog() == DialogResult.OK)
        printDoc.Print();
 
}

c sharp panel control

The Panel Control is a container control to host a group of similar child controls. One of the major uses I have found for a Panel Control is when you need to show and hide a group of controls. Instead of show and hide individual controls, you can simply hide and show a single Panel and all child controls. so for this purpose you have two panel on the following form .

 if you want to hide panel one  you can do as follow on any button click event or   on form load .

 to show panel 1    use  Panel1.show(); method or to show panel 2 Use panel2.show() on any button's click event

c sharp menu strip

MenuStrip adds a menu bar to your Windows Forms program. With this control, we add a menu area and then add the default menus or create custom menus directly in Visual Studio. We demonstrate the MenuStrip and provide some usage tips.


To begin, please open the Toolbox window in Visual Studio in a Windows Forms project. Then, locate the MenuStrip entry and double-click it or drag it to the window of your form.
Insert standard items. This is an optional step but one that may help speed up the development of many programs. Select the "Insert Standard Items" link in the popup that appears in Visual Studio. This will add the File, Edit, Tools and Help menus with standard sub-menu items.
Note: Please be aware that none of these entries will actually have any effect if you click on them. This will be fixed in the next step.

Click handlers

To add actions to the items in your MenuStrip, double click them and then a Click event handler for that ToolStripMenuItem will be inserted. Then, you can add your custom C# code to that method's body.

c sharp labels c sharp link labels

labels are you used For naming other Control in C# windows form applications . For example if you have a text.box in your project and you named it user name now when ever user run the  your program he will never know  what you call user name and where to Enter user name .

labels can be added as normal control from tool box in Visual studio.

In above form Text box 1 is named  as student name which  guide the user to enter his student and  textbox2 is named password same case tell user to enter their Password.

Link label this will provide a hyperlink to a webpage may be for more information about the software he is using or  some time used for developer own web site or company to details about  his software.

Using Link Label : In order to use link label first  use a name space called.

using System.Diagnostics;

Now go to the link label's click on click event and do as follow,

   private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
              process.start(" here provide your website link") ;
        }


this will open your system Default browser with the link you provided in Parameters.

c sharp picture box

Picture box control is used in C# Form applications to display A  Picture in C# windows Form Application. Like all controls To use Picture in C# Windows Form just click on Picture box in control box .
Now by giving to its properties select a source picture or logo .


PictureBox class represents a PictureBox control. The following code snippet creates a PictureBox, sets its width and height and adds control to the Form by calling Controls.Add() method. 

SizeMode
SizeMode property is used to position an image within a PictureBox. It can be Normal, StretchImage, AutoSize, CenterImage, and Zoom. The following code snippet sets SizeMode property of a PictureBox control.

c sharp list box c sharp combo box

A ComboBox control is a combination of a TextBox and a ListBox control. Only one list item is displayed at one time in a ComboBox and other available items are loaded in a drop down list.
Creating a Combo Box:
We can create a ComboBox control using a Forms designer at design-time or using the ComboBox class in code at run-time.
To create a ComboBox control at design-time, you simply drag and drop a ComboBox control from Toolbox to a Form in Visual Studio. After you drag and drop a ComboBox on a Form, the ComboBox looks like Figure 1. Once a ComboBox is on the Form, you can move it around and resize it using mouse and set its properties and events. 
A list box is a GUI widget that allows the user to select one or more items from a list contained within a static, multiple line text box. The user clicks inside the box on an item to select it, sometimes in combination with the Shift key or Control key[1] in order to make multiple selections. "Control-clicking" an item that has already been selected, unselects it.

Setting ComboBox Properties:
After you place a Combo Box control on a Form, the next step is to set properties.
The easiest way to set properties is from the Properties Window. You can open Properties window by pressing F4 or right click on a control and select Properties menu item. The Properties window looks like Figure 2. 



Using List box In your Project will let User to select a Value from give list which is whole visible to user.  Combobox is same but used for Design Purpose all other values will be hide on form will be visible when a user clicks on Combo box.
 

c sharp Check boxes chsarp list Check boxes

Check boxes is used in C# Windows Form applications to select multiple choices form a group of choice. this allow a user the he/she can select more then one choice in all choices.



The ListBox has the capability to show checkboxes for each item in a list. Each item can be checked and unchecked by clicking the checkbox or by using the ‘checkIndex’ and ‘uncheckIndex’ methods. Users are allowed to check any number of items, including none.

check box is a stand alone check box  You have to set each and every property of  every check box when you are using more 1 check boxes in your project.

while on other hand checklist box  is a  collection of check box in list. In the  Check box  list you can set property of all list at once.

Sending SMS Via Windows Form Application Using any Android Smart Phone  Source Code  using System ; using System . C...