To Getting List of All Printers First of all add a namespace System.Drawing.Printing use Foreach Loop: foreach(string printer in PrinterSettings.InstalledPrinters) { Combobox1.Items.Add(Printer.ToString()); } using this you get list of all printer install on your system |
basically this is a a my own blog to help ma students and friends with sharing useful information with the. information regarding C language code. .net applications, .net projects. general technical information. notes.
Sunday, 25 December 2011
Get List Of All Printers
Saturday, 24 December 2011
Select Second Maximum From a Table in Sql
Q.Find Second Maximum From a Table in Sql |
select max(duration) from course where duration<(select max(duration) from course) OR
|
Wednesday, 7 December 2011
EditTable Listbox
To create a edittable list box take a list box and enter items in it.now select the list box double click event from event list.
|
Tuesday, 22 November 2011
Interchange Values of Two numbers Without using third variable
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter First number=");
scanf("%d",&a);
printf("Enter Second number=");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is=%d\n",a);
printf("b is=%d",b);
getch();
}
Earn upto Rs. 9,000 pm checking Emails. Join now!
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter First number=");
scanf("%d",&a);
printf("Enter Second number=");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is=%d\n",a);
printf("b is=%d",b);
getch();
}
Interchange Values of Two numbers
#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter First number="); scanf("%d",&a); printf("Enter Second number="); scanf("%d",&b); c=a; a=b; b=c; printf("a is=%d\n",a); printf("b is=%d",b); getch(); } Earn upto Rs. 9,000 pm checking Emails. Join now! |
Monday, 21 November 2011
Write a Program to calculate area of a Rectangle
#include<conio.h> #include<stdio.h> void main() { int length,breadth,area_of_rectangle; clrscr(); printf("Enter the Length="); scanf("%d",&length); printf("Enter the Breadth="); scanf("%d",&breadth); area_of_rectangle=length*breadth; printf("Area of rectnagle is=%d",area_of_rectangle); getch(); } |
Write a Program to calculate area of a circle
#include<conio.h> #include<stdio.h> void main() { double radius,area_of_circle; clrscr(); printf("Enter the radius="); scanf("%lf",&radius); area_of_circle=3.14*radius*radius; printf("Area of Circle is=%lf",area_of_circle); getch(); } |
Tuesday, 15 November 2011
Sunday, 13 November 2011
If a five-digit number is input through the keyboard,write a program to reverse the number?
/*Reverse a Number*/ #include<stdio.h> #include<conio.h> void main() { int number,reverse_number; clrscr(); printf("Enter the Number you want to reverse:"); scanf("%d",&number); /*we use while loop and '%' to seprate a number*/ printf("Reverse number is:"); while(number>0) { reverse_number=number%10; number=number/10;//update number printf("%d",reverse_number); } getch(); } |
If a five-digit number is input through the keyboard ,write a program to calculate the sum of its digit?
/*Sum of Digit of a Number*/ #include |
Concept of Strong name
strong name is used for unique id for.net assembly. it is used when we need to deploy assembly in Gac(global Assembly cache). How to generate Strong namego to visual studio tools> Visual studio Command Prompt There is command prompt window With C:\program files\visual studio 9.0\Vc\ to create strong name type sn.exe -k "c:\test.snk" C:\program files\visual studio 9.0\Vc\sn.exe -k "c:\test.snk" -k is key value parameter and "c:\test.snk" is location to save file after that press enter nd u get key pair return to "path" For using strong Name in Class libraryin Visual Studio go to Projects > Class library1 properties. > signing make use a key radio button Checked nd browse Location of test.snk nd use test.snk in your Class Library |
Different Methods to Pass Values between Web Forms
Different Methods to Pass Values between Web FormsCross page posting means to post data from one page to another page.this is an important concept in web development.there are many methods to perform this task.some of Them are following. Cookies:A small piece of information or message sent by the web server to User's web browser during a request, which is stored on user's system in the form of a text file(mostly as notepad file). How to use a cookie. HttpCookie samplecookie = new HttpCookie("mycookie"); samplecookie.Value = TextBox1.Text; samplecookie.Expires = DateTime.Now.AddHours(1); Response.Cookies.Add(samplecookie); Response.Redirect("default2.aspx"); ON Second pageRetrive value using cookies.Label1.Text = Request.Cookies["mycookie"].Value; Query Stringthis is another way to pass value between pages.in it we have to use a question mark (?) as separator. "&" is use to pass multiple query strings. how to use querystring Response.Redirect("default2.aspx?pass="+TextBox2.Text); Retrieve value using Querystring Label2.Text = Request.QueryString["pass"] Sessionsit is server side state management method.this is most secure and most acceptable way of cross page postinghow to use session on page.Session["user"] = txtName.Text; on second pagestring str=Session["user"].ToString(); |
Wednesday, 9 November 2011
Top Ten List of Ebook Websites
|
Subscribe to:
Posts (Atom)