Posts

Image
Sending SMS Via Windows Form Application Using any Android Smart 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 sms { 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; t…

Sending SMS with C sharp using mobile phone

Image
Sending SMS Via Windows Form Application Using any Android Smart 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 { …

arithmetic operators in c# console application using class

Image
arithmetic operations in C# like Add Subtract Divide and Multiply using a  Class Named Here Math Class. 



Main Program

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Classes { class Program { static void Main(string[] args) { Console.Write("Enter Your First Number = "); int x = int.Parse(Console.ReadLine()); Console.Write("Enter Your 2nd Number = "); int y = int.Parse(Console.ReadLine()); math operation = new math(); operation.Add(x, y); operation.Sub(x, y); operation.divide(x, y); operation.multi(x, y); Console.ReadLine(); } } } Math Class With Operations
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Classes { class math { public …

C sharp windows clipboard text

Image
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

Image
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 Arithmetic operations Via Classes

In c sharp console application we can use all arithmetic operations via classes. first of you have to create a separate class by going to solution explorer right click on project > Add > Class and Name your class i.e Operations. (following is Source code of our  operations.cs class)

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication6 { class operations { public int add(int x ,int y ) { int sum = x + y; Console.Write("Your Sum is = " + sum); return 0; } public int substract(int x, int y) { int sub=x-y; Console.Write("Substraction of Your Numbers = " + sub); return 0; } public int multiply(int x, int y) { int muliplication = x * y; Console.Write("Multiplication of your Numbers = " + muliplication…

csharp windows gadget

Image
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&…