How To Make A Advance Calculator In VB.NET

Today we are going to make an advanced calculator(no), this is how our calculator looks like after designing it.

To begin open your visual basic 2008/2010 and make a new project and name it whatever you want and go to your form properties and change size to 258, 269 also change the form text .

Now add 2 group boxes and re-size them as below

How To Convert Numbers To Text Using VB.NET




hello this a tutorial which helps you now what this actually do is , when you enter some numbers ie:1000 and click the button you will one thousand in the converted richtextbox so i am using a class here and i have 2 richtextbox and a button ok now lets make it add two rich textbox and a button now change button text to convert and add labels to make the program look good and now add a class and name it convert.vb add this codes inside the convert.vb

How To Make A Password Generator In Java

generate


hello today i am going to teach you to create a password generator in java first of all make sure you read this - http://ultimateprogrammingtutorials.blogspot.com/2013/02/starting-with-java-programming.html ok now what this program will do is we have string alphabets now when we run the program it will generate a password by the way this is not a GUI program so now here is the code

Starting With Java Programming

java programming

In this post I will tell you what I know about java and how to make a hello world program in java ok, now java is a great programming language, it was introduced in 1995. From my experience java is nothing without classes because everything works with classes in java programming, java is a language that can be used in web and desktop, the syntax of java is exactly the same as c# and also the codes are similar to c# too if you go through the java programming history you will see java programming language is a tradition of C & C++, the newest version is JDK 7.
Java originally doesn't have an IDE(Integrated Development Environment) it just have compiler, below is a hello world program in java
public class HelloWorldApp {

    public static void main(String[] args) {
            System.out.println("Hello World - ultimate programming tutorials");
    }

}
The code is for the hello world program now you can see public class HelloWorldApp its the class name, the program should start off with public static void main(string[] args).

I hope you learned something, share with your friends and please let me know if theres any questions.

Java Tutorials

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#

s

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 : http://www.ultimateprogrammingtutorials.blogspot.com

namespace DBGrep
{
 public class SqlLocator
 {
  [DllImport("odbc32.dll")]
  private static extern short SQLAllocHandle(short hType, IntPtr inputHandle, out IntPtr outputHandle);
  [DllImport("odbc32.dll")]
  private static extern short SQLSetEnvAttr(IntPtr henv, int attribute, IntPtr valuePtr, int strLength);
  [DllImport("odbc32.dll")]
  private static extern short SQLFreeHandle(short hType, IntPtr handle); 
  [DllImport("odbc32.dll",CharSet=CharSet.Ansi)]
  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;

   try
   {
    if (SQL_SUCCESS == SQLAllocHandle(SQL_HANDLE_ENV, henv, out henv))
    {
     if (SQL_SUCCESS == SQLSetEnvAttr(henv,SQL_ATTR_ODBC_VERSION,(IntPtr)SQL_OV_ODBC3,0))
     {
      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);
        }
        else
        {
         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");
#endif 
    txt = string.Empty;
   }
   finally
   {
    if (hconn != IntPtr.Zero)
    {
     SQLFreeHandle(SQL_HANDLE_DBC,hconn);
    }
    if (henv != IntPtr.Zero)
    {
     SQLFreeHandle(SQL_HANDLE_ENV,hconn);
    }
   }
 
   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;
break;

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

*
*
default:
statements if none of the values match;
break;
}

example

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