How To Empty Recycle Bin Using C#


hey everyone , we going to learn how to empty the recycle bin using c# this pretty an easy way out . you just need to a button or lets say click event or anything that can do something now you just have to add this codes into your form1 code , i will put whole of my codes here so i am using a button to do the work

here is the codes


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;
using System.Runtime.InteropServices;

//Author : Mohamed Shimran
//Blog : http://www.ultimateprogrammingtutorials.blogspot.com

namespace RecycleBin
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        enum RecycleFlags : uint
        {
            SHERB_NOCONFIRMATION = 0x00000001,
            SHERB_NOPROGRESSUI = 0x00000001,
            SHERB_NOSOUND = 0x00000004
        }

        [DllImport("Shell32.dll", CharSet = CharSet.Unicode)]
        static extern uint SHEmptyRecycleBin(IntPtr hwnd, string pszRootPath,
        RecycleFlags dwFlags);
               private void button1_Click(object sender, EventArgs e)
        {
            uint result = SHEmptyRecycleBin(IntPtr.Zero, null, 0);
        }
    }
}
enjoy

How To Make A Sound Recorder In C#

sound recorder

hey ,today i will let you know how to create a sound recorder in c# by the way this is just a simple tutorial but this will let you know about the recording so you can make a  advanced recording application ok now first create a new project and name it and you need three buttons and one label so drag and and drop them from tool box into your form and now change the text of the each button as below

Button 1 - Record
Button2 - Stop And Save
Button3 - Play

now just keep the label 1 text empty now just double click your form and erase everything and add the whole code there

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;
using System.Runtime.InteropServices;

//Author : Mohamed Shimran
//Blog : http://www.ultimateprogrammingtutorials.blogspot.com

namespace soundrecorder
{
    public partial class Form1 : Form
    {
        [DllImport("winmm.dll")]
        private static extern int mciSendString(string MciComando, string MciRetorno, int MciRetornoLeng, int CallBack);

        string musica = "";
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            label1.Visible = true;
            mciSendString("open new type waveaudio alias Som", null, 0, 0);
            mciSendString("record Som", null, 0, 0);
        
        }

        private void button2_Click(object sender, EventArgs e)
        {
            label1.Visible = false;
            mciSendString("pause Som", null, 0, 0);

          

            SaveFileDialog save = new SaveFileDialog();

            save.Filter = "wave|*.wav";


            if (save.ShowDialog() == DialogResult.OK)
            {

                mciSendString("save Som " + save.FileName, null, 0, 0);
                mciSendString("close Som", null, 0, 0);
            }
            
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (musica == "")
            {
                OpenFileDialog open = new OpenFileDialog();
                open.Filter = "Wave|*.wav";
                if (open.ShowDialog() == DialogResult.OK) { musica = open.FileName; }
            }
            mciSendString("play " + musica, null, 0, 0);
        }

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


    }
}


now debug and enjoy .

How To Make A Header Marquee Effect in HTML

A Header Marquee Effect

hey guys finally i am up to a simple HTML tutorial but i hope this will be useful to you ok now you don't need to waste time just some lines of codes and your done . you can see how this works in the image what you could see in the top but i'd say it's a GIF i mean a recorded one so it can't show you how actually this works naturally . so to begin making this open your most favorite text editor or just use the notepad and add the usual tags



now just this is code of the recorded GIF



so you have the codes now you can edit everything

How To Make A Simple Custom Google Search Engine Using Basic HTML


Hello everybody. So, today I will teach how to make a google search box in HTML. you can see some google search embed on websites even our website has one but we are going to make a simple one i meant very simple one

So, lets get started. Open your html editor (I will be using notepad for quick and easy editing.) and now add this codes



How To Draw Circular Progress Bar On Form In VB.NET

circular progress bar preview

hello i think the title says what this tutorial is about but i have to explain it for you okay now this cannot be used instead of progress bar what you see in the toolbox but this is like a animation . this just draws lines using system.drawing.drawing2D okay now lets begin making this you don't need to do much things just create a new project and just go to the coding place and add this codes

How To Get All System Information In VB.NET

Hdisplay system infor

hey everyone so again a vb.net tutorial actually a console application tutorial but you will learn a lot from this things okay now i will tell you what information's you will be getting on the console
  • Your Operating System Full Name
  • Your Operating System Platform
  • Your Operating System Version
  • Your Windows Bit (32,64)
  • Your Computer Name
  • Your Computer Current Language Name
  • Your Computer Current Date And Time
  • Your Computer Manufacturer
  • Your Computer Model
  • Your Operating System Version
  • Your System Type
  • Your Windows Directory
  • Your Number Of Processes 
  • Your Computer Display Information
  • Your Ram Memory
  • Physical Memory
  • Virtual Memory
okay now lets create the program just create a console application and you will see the model 1 now add a class and name it WMI and add this codes into the WMI class

Most Sophisticated Computer Mice in 2013

Most Sophisticaded Computer Mice in 2013 Infographic

Are you a fan of the traditional computer mouse? Do you make a point of carrying one of these peripherials in your laptop bag, because the touchpad in your laptop just doesn't feel comfortable? We can understand those feelings. When you have to spend a lot of time working in the computer, a mouse is simply the best pointing device you can get. That's why we created this infographic - to pay homage to the most advanced mice currently available on the market. As you can see, there is something for every taste and personal need:
Some of these mice were created specifically for people suffering from arm related injuries; models with special functions to please the most demanding gamers; and of course, there are some sophisticated designs meant for those whose work involves spending long sessions in front of the computer. Some of these mice are ideal for travelers and business people. Check out the following infographic and let us know which one you like best!

If you enjoyed this Infographic, we recommend checking out Dom's Tech Blog for the latest tech related news.

How To Make A Text To Binary Converter In VB.NET



hey guys and girls today i am going to teach you how to make a binary to text converter or binary to text converter in vb.net simply you dont have to waste much time in this tutorials . first of all you should have known what is binary so take a look at this page and come back ok now i will explain how this works . you have two text box and you have two buttons now you need to add text in text box1 and click button1 to convert your text box1 text to binary and the binary code for the text will be shown in text box2 ok so lets make it now create a new project and add two text box and two buttons and change the button1 text to convert to binary and change the button2 to convert to text and dont forget text box is for text and text box2 is for binary . i can say make your application look like this

How Get Information's About Your Internet In VB.NET

Today i will show you how you can obtain the computers mac address, local ip and outgoing ip
First create a new project


1. Open Visual Studio or Visual Basic.
2. Create a new windows form project and name it whatever you want.

Now to add the controls.
1. Add 3 textboxes, name the first outtext the second iptext and the last mactext.
2. add 4 buttons, name the first copyout the second copyip and the last copymac, you dont need to rename
the last its just to get all the information.
3. Set the text on the copy buttons to copy.

Now to the code first you add at the top of your code.

Imports System.Net

then you add this below public class.
 Dim ip As New WebClient

Now add this so that when you click on the buttons you copy it
    Private Sub CopyOut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyOut.Click
        Clipboard.SetText(OutText.Text)
    End Sub

    Private Sub CopyIp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyIp.Click
        Clipboard.SetText(IPtext.Text)
    End Sub

    Private Sub CopyMac_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyMac.Click
        Clipboard.SetText(MACText.Text)
    End Sub
Now we will add the code that gets the mac address the outgoing ip and the local ip, add this to your code.
Private Sub getoutip()
'Get outgoing ip
        Try
            OutText.Text = ip.DownloadString("http://www.networksecuritytoolkit.org/nst/tools/ip.php/")

        Catch ex As Exception
            OutText.Text = "No connection"
        End Try
    End Sub

    Private Sub obtip()
        'MAC Address
        For Each nic As System.Net.NetworkInformation.NetworkInterface In System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
            MACText.Text = String.Format("{2}", nic.Description, Environment.NewLine, nic.GetPhysicalAddress())
            Exit For
        Next
'Get local ip
        Dim host As String = System.Net.Dns.GetHostName()
        Dim LocalHostaddress As String = System.Net.Dns.GetHostByName(host).AddressList(0).ToString()
        IPtext.Text = LocalHostaddress
    End Sub