How To Make A IP Analyzer In VB.NET

ultimate programming

This is a good one but its a in console but i hope you will like it and it has not alot code . the program works like when you enter a IP address and press enter key in your keyboard then you will see the class of the ip address and subnet mask and IP binary and network address and at last broadcast address so i hope you will like the features and dont forget you can also make alot features for this if you made anything dont forget to comment it ok lets begin making it now make a console project and name it and when it loading successful then add this code down

How To Draw Border At PictureBox Border In C#


hello i am up with this but this is something very small but very useful ok now what this is about , theres are 2button and a openfiledialog and when you click open the openfiledialog will be up so you just can go ahead and select a image and you click the draw button the picturebox out border will be green color .

How To Create A Folder Using C#

hello this is a simple tutorial not actually a tutorial but yah lets begin this is a console application so you dont need any forms you know that ok so create a new console application project and name it now when the coding part is loaded now you just need to understand the code first of all this is the whole code and this is a picture of the application

How To Get SQL Instance Using C#

hello guys this a simple tutorial that will give you the list of SQL servers available on your lan . ok lets begin making this just open c# and make a new project and name it whatever and after form finished loading add a button and change the text  to refresh and add combobox and at last add a label to make the ui beautiful now  add a class and name it getsql.cs
how to get sql instance using c# - adding class getsql

ok now you will see the class in the side bar ok now go to getsql.cs and add this codes

using System;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

//Author : Mohamed Shimran
//Blog :

namespace DBGrep
 public class SqlLocator
  private static extern short SQLAllocHandle(short hType, IntPtr inputHandle, out IntPtr outputHandle);
  private static extern short SQLSetEnvAttr(IntPtr henv, int attribute, IntPtr valuePtr, int strLength);
  private static extern short SQLFreeHandle(short hType, IntPtr handle); 
  private static extern short SQLBrowseConnect(IntPtr hconn, StringBuilder inString, 
   short inStringLength, StringBuilder outString, short outStringLength,
   out short outLengthNeeded);

  private const short SQL_HANDLE_ENV = 1;
  private const short SQL_HANDLE_DBC = 2;
  private const int SQL_ATTR_ODBC_VERSION = 200;
  private const int SQL_OV_ODBC3 = 3;
  private const short SQL_SUCCESS = 0;
  private const short SQL_NEED_DATA = 99;
  private const short DEFAULT_RESULT_SIZE = 1024;
  private const string SQL_DRIVER_STR = "DRIVER=SQL SERVER";
  private SqlLocator(){}

  public static string[] GetServers()
   string[] retval = null;
   string txt = string.Empty;
   IntPtr henv = IntPtr.Zero;
   IntPtr hconn = IntPtr.Zero;
   StringBuilder inString = new StringBuilder(SQL_DRIVER_STR);
   StringBuilder outString = new StringBuilder(DEFAULT_RESULT_SIZE);
   short inStringLength = (short) inString.Length;
   short lenNeeded = 0;

    if (SQL_SUCCESS == SQLAllocHandle(SQL_HANDLE_ENV, henv, out henv))
      if (SQL_SUCCESS == SQLAllocHandle(SQL_HANDLE_DBC, henv, out hconn))
       if (SQL_NEED_DATA ==  SQLBrowseConnect(hconn, inString, inStringLength, outString, 
        DEFAULT_RESULT_SIZE, out lenNeeded))
        if (DEFAULT_RESULT_SIZE < lenNeeded)
         outString.Capacity = lenNeeded;
         if (SQL_NEED_DATA != SQLBrowseConnect(hconn, inString, inStringLength, outString, 
          lenNeeded,out lenNeeded))
          throw new ApplicationException("Unabled to aquire SQL Servers from ODBC driver.");
        txt = outString.ToString();
        int start = txt.IndexOf("{") + 1;
        int len = txt.IndexOf("}") - start;
        if ((start > 0) && (len > 0))
         txt = txt.Substring(start,len);
         txt = string.Empty;
   catch (Exception ex)
    //Throw away any error if we are not in debug mode
#if (DEBUG)
    MessageBox.Show(ex.Message,"Acquire SQL Servier List Error");
    txt = string.Empty;
    if (hconn != IntPtr.Zero)
    if (henv != IntPtr.Zero)
   if (txt.Length > 0)
    retval = txt.Split(",".ToCharArray());

   return retval;

The Switch Case Statement In Visual C# .Net

The switch case statement is also used for making decision, unlike the if else statement , we can not test conditions like "greater than" or "less than" . in switch case we can test the value of a variable and decide what to do if a particular value is stored in the variable.

the syntax for switch statement below

switch(varable to test)


case value 1 :
statements if value 1 stored in the variable;

case value 2 :
statements if value 2 stored in the variable;

statements if none of the values match;


the user will enter a weekday number( 1 to 7 ) and the program will display the name of the corresponding day

How To Make A Awesome Calender Using HTML,CSS,JQUERY

hello guys , i am going to write here on how to make a calender i am gonna use html and css  first of all you need the codes

you need jquery 1.6.2

jquery ui mouse

How To Add Facebook Share Buttons To Your Website

I wouldn't call this a tutorial but i hope this is helpful for you in some ways in this post I am featuring facebook share buttons.

1 - small icon with text(share on facebook):
    function fbs_click() {
        u = location.href;
        t = document.title;'' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
        return false;
    html .fb_share_link {
        padding:2px 0 0 20px;
        background:url( no-repeat top left;
onclick="return fbs_click()"

2 - text(share on facebook)
function fbs_click() {
    u = location.href;
    t = document.title;
        '' +
        encodeURIComponent(u) +
        '&t=' +
    return false;
<a href=";url%3E" onclick="return fbs_click()" rel="nofollow" target="_blank">Share

3 - icon(facebook)
function fbs_click() {
    u = location.href;
    t = document.title;'' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer',
    return false;
html .fb_share_button {
    display: -moz-inline-block;
    padding:1px 20px 0 5px;
    border:1px solid #d8dfea;
    background:url( no-repeat top right;
html .fb_share_button:hover {
    background:#3b5998 url( no-repeat top right;
<a class="fb_share_button" href=";url%3E" onclick="return fbs_click()" rel="nofollow" style="text-decoration: none;"


How To Make A Contact Form In PHP

this is a simple contact form that many websites use in their website for a contact for , we can make this with html and php , html is form and php is to send the email.

What Is Pseudocode

Pseudo Code is structured english like way of representing the solution to a problem. it is considered a first draft because pseudocode eventually has to be translated in to a programming language. although pseudo code is like english and has some precision to it,it does not have the very definite precision of a programming language. a computer cannot execute pseudocode , when using pseudocode it is easy to plan a program, concentrate on the logic and do not worry the rules of a specific language most people find that it is more difficult to change the logic

What Is Flowchart

A flowchart is a diagrammatic representation of the processes involved in arriving at a solution to a problem. while many symbols are included in its notation, you can see the most important below

What Is Object Oriented Programming (OOP)

Object oriented programming (oops ) is an emerging major programming paradigm. much of its approach to program and system design is owned to concepts which also gave rise to structured programming , an object is a particular instance of a class and consists, essentially, of data which defines its characteristics and current status together with procedures, or methods , which operates the object

How To Display Time In Javascript

ok this is a simple clock i mean its a digital one but its real time , the javascript is down here

How To Display Date In Javascript

i am making this as very small because i have many things to post oj here is the code

you can place any where in your html page easily

How To Disable And Enable Task Manager In VB.NET

this only works in windows xp . you will need two buttons , add two buttons and double click form and add this and change the button1 text to enable and button 2 disable 

How To Display IP In PHP

this is a simple tut about getting the ip in php , the script is

How To Make A Password Generator In C++

i am new to c++ and this is a interesting thing ok now this is a preview of my code

ok now heres the code

How To Open Cashier Drawer In VB.NET

the code below will open the cashier drawer using either
LPT or COM port

if you use LPT port this is the right way of code

How To Convert Numbers To Normal Text In PHP

i am up with a simple php thing this convert number  to text for instance if you enter 100 in the textbox and click the button the label will show the text form of 100 , hundred . below is the full code(s)

form code
php code

How To Login And Logout With Session In PHP

this is a simple tutorial for beginners by the way this is also a good way to login and logout
lets make the index.php

How To Block And Unblock USB Using VB.NET

this is something very interest but this is the best way to lock usb and unblock usb because i am using registry so anyone can change the registry by the way lets just make it

you will need two buttons thats it

button1 - block
button2 - unblock

now double click your button1 and add this code

How To Make A Simple Login In VB.NET

A login form is a form which is used to give access to other form for instance lets take you have a login form and you have two textboxes in login form and a button so if your username textbox and password textbox text is correct then when you click the button you will have access to other forms

make a new form and make another form as well now go to form1 and add two textbox and a button now change the textproperty of button to login now make the form look like this

you can add labels and make the form look good now its time to code

How To load Availale Drives In Combobox In VB.NET

I saw on some forums, many people asking how to get the available drives in a combobox or whatever in VB.NET, here is the code that get's the available drives in a combobox, you can change combobox to listbox and etc.