Sunday, February 9, 2014

Paint Application Code in C#




Write a C# Application and make a paint using system. Drawing

using System.Drawing;

namespace Paint_App
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        bool Paint = false;
        SolidBrush SB = new SolidBrush(Color.Black);
        private void btn_ColorChange_Click(object sender, EventArgs e)
        {
            colorDialog1.ShowDialog();
            SB.Color = colorDialog1.Color;
        }
        private void btn_Clear_Click(object sender, EventArgs e)
        {
            Graphics g = Panel_Paint.CreateGraphics();
            g.Clear(Panel_Paint.BackColor);
        }
        private void Panel_Paint_MouseDown(object sender, MouseEventArgs e)
        {
            Paint = true;          
        }
        private void Panel_Paint_MouseUp(object sender, MouseEventArgs e)
        {
            Paint = false;
        }
        private void Panel_Paint_MouseMove(object sender, MouseEventArgs e)
        {
            if (Paint)
            {
                Graphics g2 = Panel_Paint.CreateGraphics();
                g2.FillEllipse(SB, e.X, e.Y, Trak_Brush.Value, Trak_Brush.Value);
                g2.Dispose();
            }

        }
    }
}



Wednesday, January 29, 2014

Selection Sort Code in C++



Selection Sort Method Which sort an array using selection sort.......... 

void SelectionSrt(int A[10])
       {     
              int i,j;
              int temp;
              for(i=0; i<10; i++)
              {
                     for(j=i; j<10; j++)
                     {
                           if(A[i]>A[j])
                           {
                                  temp=A[i];
                                  A[i]=A[j];
                                  A[j]=temp;
                           }
                     }
              }

Wednesday, January 22, 2014

Bubble Sort Code in C++



Bubble Sort Method Which sort an array using bubble sort..........

void BubbleSrt(int A[10])
       {     
              int i,j;
              int temp;
              for(i=0; i<10; i++)
              {
                     for(j=i+1; j<10; j++)
                     {
                           if(A[i]>A[j])
                           {
                                  temp=A[i];
                                  A[i]=A[j];
                                  A[j]=temp;
                           }
                     }
              }
              cout<<"Sorted values after bubble sort"<<endl;
              for(i=0; i<10;i++)
              {
                     cout<<A[i]<<"";
              }
       }

Saturday, January 18, 2014

How to Make a USB Bootable

1. (Open Command Prompt as an Administrator) from start manue or by writing cmd in Run window.

2. (Open the disk management utility) by typing diskpart command in command prompt and then press enter.


3. (Display the connected disk to the pc) by typing list disk command in command prompt and then press enter your's USB is also listed here.


4. (Select the USB drive) by typing the select disk # , command in command prompt and then press enter (replace the # with the disk number of USB in previous step).


5. (Clean the flesh drive) by typing the clean command and then press enter.


6. (Create a bootable partition) by typing create partition primary command and then press enter.


7. (Select the new partition) by typing select partition 1 command and then press enter after receiving confirmation message, type active command and then press enter this will activate the partition. 


8. (Format USB Drive) by typing format fs=fat32 command and then press enter (this format peocess may be slow that take an hour) .


9. (Assign the USB a drive letter) by typing assign command and then press enter to give a letter designation. then type exit to end disk management utility.


10. (Copy the operating system) now copy the files of the operating system into the bootable USB drive you may also copy the drivers into the USB drive for your's easyness.


Thaks for visiting us Plz write your's comments bellow.........:)