How Make A PictureBox Bounce Everywhere In C#

How Make A PictureBox Bounce Everywhere In C#
Okay I think you have seen this thing in VB.NET or Visual Basic 5.0/6.0 :) so i was at my class and one of my class guy asked me how he could make a picturebox bounce everywhere in your screen so i was bulbed what i mean from bulb-ed is i got an idea , so i gave him the codes and i wanted to give you all the codes too so lets start you can use a picturebox in this program


Add a image to the picturebox and change the form property Form_BorderStyle = NONE and double and you need a timer so drag and drop one and set it's interval to 0 , now click your form and add these codes ,
        
        //Author : Mohamed Shimran
        //Blog : http://ultimateprogrammingtutorials.blogspot.com
        public Boolean top_ = true;
        public Boolean left_ = true;
        public int Speed =25;
        private void timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                if (top_ == true) Form1.ActiveForm.Top += Speed; else Form1.ActiveForm.Top -= Speed;
                if (left_ == true) Form1.ActiveForm.Left += Speed; else Form1.ActiveForm.Left -= Speed;

                if (Form1.ActiveForm.Top >= Screen.PrimaryScreen.Bounds.Height - 40) top_ = false;
                if (Form1.ActiveForm.Left >= Screen.PrimaryScreen.Bounds.Width - 37) left_ = false;
                if (Form1.ActiveForm.Top < -5) top_ = true;
                if (Form1.ActiveForm.Left < -5) left_ = true;
            }
            catch
            {
                timer1.Enabled = false;
            }
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }

        private void Form1_Deactivate(object sender, EventArgs e)
        {
            timer1.Enabled = false;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Hide();
        }

        private void Form1_Activated(object sender, EventArgs e)
        {
            timer1.Enabled = true;
        }

now debug and see it in action

Useful Google Chrome Extensions For Developers

Useful Google Chrome Extensions For Developers

Google Chrome extensions are also known as Google Chrome apps , so today i will write down some Google Chrome extensions that are useful for developers doesn't matter web dev or software dev .


Web Developer
web developer is an extension created by chrispederick.com , it has vaious web developer tools .

Google Chrome

you can download Web Developer from here


The QR Code Generator
The QR Code Generator helps you to generate your own QR codes with text , phone numbers , URLs , SMS messages etc


Google Chrome


you can download The QR Code Generator from here


How To Make A MP3 Player In VB.NET

How To Make A MP3 Player In VB.NETSomeone requested me to write a tutorial about making a mp3 player in vb.net by the way i actually don't have time to do it but i am here to do a simple one because i don't want to deny his request or late .. first of all right click on your toolbox and select Choose Items and a window will come up move to COM tab page in that window and search for Windows Media Player when you found it tick it and click ok button .

How To Make A MP3 Player In VB.NET

Then you will see any tool in your toolbox that should be this (Windows Media Player)

How To Make A MP3 Player In VB.NET

How To Make A Shutdown Manager In VB.NET

Today I went through my old project and I found a project and wanted to create a tutorial about it so it's a shutdown manager. I couldn't test and make it so much advanced because I don't have time so I will just write down the basic codings .

To Shutdown Computer you can use 

        Shell("shutdown -s")

To Log off Computer you can use

            Shell("shutdown -l")

To Restart Computer you can use

            Shell("shutdown -r")

you can also use System.Diagnostics.Process.Start() 

:)

How To Use Microsoft Office Word Spell Checker In Your Project In VB.NET

How To Use Microsoft Office Word Spell Checker In Your Project In VB.NET
Last night i was thinking on how to do this (title) then i came with an idea , i did a program that converts Docx(Microsoft Office Document) to DOC(Microsoft Office Word 98-2003 Document) so i used the same method but had to tweak . for this you don't need to have any classes or dll's i have created two functions that will do the work , to make this first you need a button and a textbox then double click the form and add these code(s).

How To Eject And Close CD/DVD Drive In C#

How To Eject And Close CD/DVD Drive In C#
Okay guys i was doing a program about managing the system things so i had to figure out eject and closing CD/DVD Drive so i did and here is the code for this .

first of all you need to import a interop service it's

   [DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi)]
        protected static extern int mciSendString(string lpstrCommand,
        StringBuilder lpstrReturnString,
        int uReturnLength,
        IntPtr hwndCallback);
        
after importing it add the namespace using System.Runtime.InteropServices; , then add this code to eject CD/DVD Drive

            int ret = mciSendString("set cdaudio door open", null, 0, IntPtr.Zero);

now to close CD/DVD Drive use this code


            int ret = mciSendString("set cdaudio door closed", null, 0, IntPtr.Zero);

Hope it helped you ..

How To Set Up Python In Windows

How To Set Up Python In Windows 7
I did a tutorial on how to set up java in windows so on i also have python installed so i thought it would be nice to make a tutorial about doing the same thing for python first of all i want say that interpreted languages only has compiler(most of) like java,python,pascal etc that's why we need to set up the compiler for the OS .

Go download Python at http://www.python.org and install it as usual now like what we did in java go ahead and right click on My Computer and select Advanced System Properties

How To Set Up Java In Windows

I saw many people having problems in setting up the java compiler so I just thought of doing a tutorial on this so on here i am .. , first of all download the latest version of java by the way remember to download it from oracle website and not from other websites also you should download JDK(Java Developer(s) Kit) , then install it as usual. After installing go for a restart then after the next switch in go ahead and right click My Computer and select Advanced System Properties .

How To Make Beeb Sound On Each Word In Java

How To Make Beeb Sound On Each Word In Java
hello guys , so you all know what is a beeb sound so on in vb.net or c-sharp it's veru easy to make beeb sound.

if you want to make beeb sound in vb.net here is the code
 Microsoft.VisualBasic.Interaction.Beep()

if you want to make beeb sound in c# here is the code

using Microsoft.VisualBasic;
using System.Media;

SystemSounds.Beep.Play();

ok now let's turn to java side

here is the codes that i wrote to do this , i am using arrays and a for loop and a thread.

actually i had to write this for a homework.