Saturday, June 23, 2007

How to Configure DHCP in Your PC?


Dynamic Host Configuration Protocol (DHCP) is the configuration of your Internet Protocol (IP) address, subnet mask, DNS servers, domain name suffix and about 200 other possible options to let your computer communicate with a network automatically via a server or router. It sounds complicated, but once set up, it can make connecting to a network much easier.
Steps

1. Log into Windows XP with administrator rights. This makes setting up the network for you, and other users, easier as you can make all the necessary changes to settings.
2. Look for the Network Neighborhood or My Network Places icon in your desktop. If it is not there, try your Start Menu.
3. Right-click the Network Neighborhood/My Network Places icon. A drop-down menu will appear.
4. Choose the "Properties" option, generally found at the bottom of the menu.
5. Look for an icon named "Local Area Connection". The icon looks like a pair of computer connected by a link. Double-click this icon.
6. Click the "General" tab, if it is not already selected. You will see a list of protocols to choose form.
7. Scroll down and choose Internet Protocol (TCP/IP), and then click the button that is labeled "Properties".
8. Again, click the "General" tab, it it is not alreay selected. You will see two choices:

1. "Obtain an IP address Automatically"
2. "Use the following IP address..."
9. Choose option 1.
10. You have effectively configured DHCP for your PC. When your computer obtains the IP address, it will also obtain DNS server information automatically. This is provided by your dhcp server.


Tips

* Make sure your NIC (Network Card)is working properly.
* Make sure you are connected directly to a router, switch or hub.
* Make sure the Link light is on. (small green light where the cable plugs into the computer)
* If you are connected to a LAN, make sure that you have a router that will give addresses away, since the address will be obtained by the PC from the router.
* If you have a Server on the LAN such as Windows 2000 or 2003, make sure the server is configured DHCP enabled as well.




Technorati :

Setting up a VPN in Windows is a two step process.


Setting up a VPN in Windows is a two step process.

1. Set up one computer to share files (server).
2. Set up another computer to access them (client).

Begin by setting up the server:

1. Open Internet Explorer and go to www.whatismyip.com. Write down the IP address. You will need it to configure the client.
2. Click the Start button and click Run.
3. Type control and hit Enter.
4. Click Network and Internet Connections.
5. Click Network Connections.
6. Click Create a New Connection, which is the first option on the left toolbar.
7. The New Connection Wizard will open. Click Next.
8. Choose Set up an advanced connection, the last element on the list. Click Next.
9. Choose Accept incoming connections. Click Next.
10. You will see the Devices for Incoming Connections screen. Do not select anything on this screen. Click Next.
11. Select Allow virtual private connections. Click Next.
12. Select to whom you want to give access. Click Next. If a user is not listed, you will have to add an account. See "Related Wikihows" for more information.
13. Do not change anything on the Networking Software screen. Click Next.
14. That's it! Your computer is now set up to allow for VPNs. Click Finish to complete the wizard.

Now proceed to connect the client:

1. Click the Start button and click Run.
2. Type control and hit Enter.
3. Click Network and Internet Connections.
4. Click Network Connections.
5. Click Create a New Connection, which is the first option on the left toolbar.
6. The New Connection Wizard will open. Click Next.
7. Select Connect to the network at my workplace and click Next.
8. Select Virtual Private Network connection and click Next.
9. Type the name of your network in the blank box. Click Next.
10. Enter the IP address you wrote down earlier and click Next.
11. Select Add a shortcut to this connection to my desktop and click Finish.


Tips

* Both computers must be connected to the internet.
* The user name and password must be entered exactly as you saved them.
* The IP address must be written exactly as listed on the screen.
* If the VPN doesn't work, turn off your firewall.


Warnings

* Do not give access to the "guest" account. It does not require a password, allowing anyone to access the VPN.




Technorati :

Sunday, June 17, 2007

Visual Basic 6.0 Tips and Tricks


Visual Basic 6.0 Tips and Tricks



  1. Conditional Compilation to bypass Form_Paint Event

    The following code uses a conditional compilation trick such that the form's paint event will be triggered according to the value of the constant cTRIGGERPAINT. This is very useful in debugging forms that have code written in the paint event. For many times, during debugging, we may think of some events in our VB apps, that if it wont trigger this time. We may face it very difficult if an unnecessary event trigger during our debugging and consumes a good part of our valuable time. Hereby I am sharing a tip to avoid such condtion. For me, in the app I used to debug have code written in the Form_Paint event in all forms. This event prevents us to debug as it will be triggered every time the form is activated. A solution for this is to use conditional compilation. see the example below




    #Const cTRIGGERPAINT = 0 'The paint event runs according to the value set here. You can also try with variables

    #If cTRIGGERPAINT = 1 Then
    Private Sub Form_Paint()
    'your code
    End Sub
    #End If



  2. Code to determine whether in Visual Studio Debug mode

    It will be a useful thing sometimes if we want to determine whether we are executing the project from Visual Studio IDE or from its exe. This can be done using a trick. You may know about the Debug.Print method that is commonly used for debugging. The code will be executed only in debug mode (Visual Studio execution).This can be made useful for the purpose. We shall try to generate an error in the debug.print part. If it is running under Visual Studio, then the error can be tapped. Try the code first in IDE and then make exe.


    Function IsExecutedbyVisualStudioIDE()
    On Error Resume Next

    Debug.Print 1 / 0 'generates error.... but runs only in Visual studio.
    If Err <> 0 Then IsExecutedbyVisualStudioIDE= True

    End Function








Technorati :

Monday, June 4, 2007

Adventures With Sql Server


My Adventures With Sql Server