Category Archives: C# Programing

C# Programing

How to send SMS using Android mobile Or GSM Modem

By | March 21, 2018

169 ViewsDear viewer we will discuss a very impotent topic sending sms using  mobile phone and GSM modem, most demanding module by client.I have experience developing collection of software we used GSM modem and mobile for sending sms every where.o we developed a small application that runs on the server and sends a SMS whenever… Read More »

How to generate Barcode in Windows Forms Application using C#

By | March 17, 2018

96 ViewsNamespaces using System.IO; using System.Drawing.Imaging; Code private void btnGenerate_Click(object sender, EventArgs e) { string barCode = txtCode.Text; Bitmap bitMap = new Bitmap(barCode.Length * 40, 80); using (Graphics graphics = Graphics.FromImage(bitMap)) { Font oFont = new Font(“IDAutomationHC39M”, 16); PointF point = new PointF(2f, 2f); SolidBrush blackBrush = new SolidBrush(Color.Black); SolidBrush whiteBrush = new SolidBrush(Color.White); graphics.FillRectangle(whiteBrush,… Read More »

How to Find Previous Month’s First and Last Day C#

By | March 13, 2018

58 ViewsHere’s a simple query that gives you the first and last day of the previous month. static void Main(string[] args) { var yr = DateTime.Today.Year; var mth = DateTime.Today.Month; var firstDay = new DateTime(yr, mth, 1).AddMonths(-1); var lastDay = new DateTime(yr, mth, 1).AddDays(-1); Console.WriteLine(“First day Previous Month: {0}”, firstDay); Console.WriteLine(“Last day Previous Month: {0}”,… Read More »