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 :
        public Boolean top_ = true;
        public Boolean left_ = true;
        public int Speed =25;
        private void timer1_Tick(object sender, EventArgs e)
                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;
                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)

        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 , 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 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 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 or c-sharp it's veru easy to make beeb sound.

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

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

using Microsoft.VisualBasic;
using System.Media;


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.

How To Make A Addition Calculator In Java Using JOption

How To Make A Addition Calculator In Java Using JOption
Okay guys today i will be teaching you how to make a simple addition calculator using Joption in java, I saw someone wrote some codes to calculate addition also it uses Java Scanner. This is that program .
import java.util.Scanner;

class basic_cal
  public static void main(String args[])
   Scanner shim = new Scanner(;
   double first_number,second_number,answer;
   System.out.println("Enter First Number : ");
   first_number = shim.nextDouble();
   System.out.println("Enter Second Number : ");
   second_number = shim.nextDouble();
   answer = first_number + second_number;
   System.out.println("Answer : " + answer);
Okay now i saw that and got an idea to make the same thing with Joption , Joption is like the messagebox we have in c# and ok , this is the program i wrote :

Android Studio : An IDE For Android Developers

Android Studio Released : An IDE For Android

Google has released an IDE for android developers based on IntelliJ IDEA , before Android Studio we had to use Eclipse to develop Android apps but now the Android Studio comes in handy , it has a really cool interface and a lot of features are available , Google has added a referral tracking (an analytics service has been added) also Google has announced that there will be a place for optimization and development tips etc.

This video by Android Developers explains everything

How To Make Unicode String Reader In VB.NET

How To Make Unicode String Reader In VB.NET
hey guys , today i was searching for some old things and i found out a simple program i wrote before two years and it's a unicode string reader , it has a simple interface i have used a richtextbox and a button and of course a openfiledialog in code . when you click the button the openfiledialog dialog comes up and you just go ahead and select any file and click ok and you have the unicode string of the file in the richtextbox by the way you will laugh this program has three lines of codes :D , ok now go create a new project and add a button and change the text property to "open" and then add a rich text box and now it's time for codes , double click button and add these code

        If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
            Dim data() As Byte = System.IO.File.ReadAllBytes(OpenFileDialog1.FileName)
            RichTextBox1.Text = System.Text.Encoding.Unicode.GetString(data)

now debug and try it here is a preview :

  How To Make Unicode String Reader In VB.NET

it doesn't looks like unicode or whatever

How To Get Windows Product Key In C#

How To Get Windows Product Key In C#
I wrote a tutorial before months on how to get windows product key in Today we are going to do the same thing in c#.

First of all add these namespaces :
using Microsoft.Win32;
using System.Collections;

After that add this function.:

How To Print A Triangle In Java Using For Loop

hello guys , i remember what kind of homeworks in java students get at the start so i started to post solutions in this even i had to do this when i was doing java (a diploma) our sir asked us to make a program that prints out a triangle using For Loops so i created my own answer but my sir showed us a different one it doesn't even looks like a triangle but it has the triangle shape but mine is exactly a triangle .

this is my answer , NOTE : the easiest and the best way to print a real triangle

How To Make Label Typing Effect In VB.NET

For this tutorials we will need a timer and a label and a public string and a public integer thats all we need to begin add a label and add a timer now lets go do coding i have written the codes so no need to write one by one

Cryptographic Algorithms For VB.NET

I wanted to share some Cryptographic Algorithms with you all and by the way cryptographic is a very important resource for programmers all the way .

Triple DES - triple data encryption (3DES)

Imports System.Text
Imports System.Security.Cryptography

Public Class 3_DES
    Public Shared Function Encrypt(ByVal toEncrypt As String, ByVal key As String, ByVal useHashing As Boolean) As String
  Dim keyArray As Byte()
  Dim toEncryptArray As Byte() = UTF8Encoding.UTF8.GetBytes(toEncrypt)

  If useHashing Then
    Dim hashmd5 As New MD5CryptoServiceProvider()
    keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key))
    keyArray = UTF8Encoding.UTF8.GetBytes(key)
  End If

  Dim tdes As New TripleDESCryptoServiceProvider()
  tdes.Key = keyArray
  tdes.Mode = CipherMode.ECB
  tdes.Padding = PaddingMode.PKCS7

  Dim cTransform As ICryptoTransform = tdes.CreateEncryptor()
  Dim resultArray As Byte() = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length)

  Return Convert.ToBase64String(resultArray, 0, resultArray.Length)
    End Function
End Class