borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (How can I send a web page as a email to any body by asp, please inform me.)Next Topic (Viewing Form whilst running Debug-Step Into) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Help /w SystemShutdown API Call
Poster Message
Killa4Hire_ShoGuN
Level: Guest


icon Help /w SystemShutdown API Call

The code at AndreaVB.com is inncorrect, me and my VB have taken a look and havn't found good source code, we have the .DLL file so that isn't the problem. Can someone please post a workable snippit or a working model with code (Project - Not EXE).

22-05-2002 at 02:00 AM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1616
icon Re: Help /w SystemShutdown API Call

Did the code not work on NT, or 9x?


Regardless, the following is code:

Class Module:

' Shutdown Flags
    Private Const EWX_LOGOFF = 0
    Private Const EWX_SHUTDOWN = 1
    Private Const EWX_REBOOT = 2
    Private Const EWX_FORCE = 4
    Private Const SE_PRIVILEGE_ENABLED = &H2
    Private Const TokenPrivileges = 3
    Private Const TOKEN_ASSIGN_PRIMARY = &H1
    Private Const TOKEN_DUPLICATE = &H2
    Private Const TOKEN_IMPERSONATE = &H4
    Private Const TOKEN_QUERY = &H8
    Private Const TOKEN_QUERY_SOURCE = &H10
    Private Const TOKEN_ADJUST_PRIVILEGES = &H20
    Private Const TOKEN_ADJUST_GROUPS = &H40
    Private Const TOKEN_ADJUST_DEFAULT = &H80
    Private Const SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
    Private Const ANYSIZE_ARRAY = 1
    Private Type LARGE_INTEGER
        lowpart As Long
        highpart As Long
    End Type
    Private Type Luid
        lowpart As Long
        highpart As Long
    End Type
    Private Type LUID_AND_ATTRIBUTES
        'pLuid As Luid
        pLuid As LARGE_INTEGER
        Attributes As Long
    End Type
    Private Type TOKEN_PRIVILEGES
        PrivilegeCount As Long
        Privileges(ANYSIZE_ARRAY) As LUID_AND_ATTRIBUTES
    End Type
    Private Declare Function InitiateSystemShutdown Lib "advapi32.dll" Alias "InitiateSystemShutdownA" (ByVal lpMachineName As String, ByVal lpMessage As String, ByVal dwTimeout As Long, ByVal bForceAppsClosed As Long, ByVal bRebootAfterShutdown As Long) As Long
    Private Declare Function OpenProcessToken Lib "advapi32.dll" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long
    Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
    Private Declare Function LookupPrivilegeValue Lib "advapi32.dll" Alias "LookupPrivilegeValueA" (ByVal lpSystemName As String, ByVal lpName As String, lpLuid As LARGE_INTEGER) As Long
    Private Declare Function AdjustTokenPrivileges Lib "advapi32.dll" (ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, NewState As TOKEN_PRIVILEGES, ByVal BufferLength As Long, PreviousState As TOKEN_PRIVILEGES, ReturnLength As Long) As Long
    Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
    Private Declare Function GetLastError Lib "kernel32" () As Long

Public Function InitiateShutdownMachine(ByVal Machine As String, Optional Force As Variant, Optional Restart As Variant, Optional AllowLocalShutdown As Variant, Optional Delay As Variant, Optional Message As Variant) As Boolean
    Dim hProc As Long
    Dim OldTokenStuff As TOKEN_PRIVILEGES
    Dim OldTokenStuffLen As Long
    Dim NewTokenStuff As TOKEN_PRIVILEGES
    Dim NewTokenStuffLen As Long
    Dim pSize As Long
    If IsMissing(Force) Then Force = False
    If IsMissing(Restart) Then Restart = True
    If IsMissing(AllowLocalShutdown) Then AllowLocalShutdown = False
    If IsMissing(Delay) Then Delay = 0
    If IsMissing(Message) Then Message = ""
    'Make sure the Machine-name doesn't start with ''
    If InStr(Machine, "") = 1 Then
        Machine = Right(Machine, Len(Machine) - 2)
    End If
    'check if it's the local machine that's going to be shutdown
    If (LCase(GetMyMachineName) = LCase(Machine)) Then
        'may we shut this computer down?
        If AllowLocalShutdown = False Then Exit Function
        'open access token
        If OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES Or TOKEN_QUERY, hProc) = 0 Then
            MsgBox "OpenProcessToken Error: " & GetLastError()
            Exit Function
        End If
        'retrieve the locally unique identifier to represent the Shutdown-privilege name
        If LookupPrivilegeValue(vbNullString, SE_SHUTDOWN_NAME, OldTokenStuff.Privileges(0).pLuid) = 0 Then
            MsgBox "LookupPrivilegeValue Error: " & GetLastError()
            Exit Function
        End If
        NewTokenStuff = OldTokenStuff
        NewTokenStuff.PrivilegeCount = 1
        NewTokenStuff.Privileges(0).Attributes = SE_PRIVILEGE_ENABLED
        NewTokenStuffLen = Len(NewTokenStuff)
        pSize = Len(NewTokenStuff)
        'Enable shutdown-privilege
        If AdjustTokenPrivileges(hProc, False, NewTokenStuff, NewTokenStuffLen, OldTokenStuff, OldTokenStuffLen) = 0 Then
            MsgBox "AdjustTokenPrivileges Error: " & GetLastError()
            Exit Function
        End If
        'initiate the system shutdown
        If InitiateSystemShutdown("" & Machine, Message, Delay, Force, Restart) = 0 Then
            Exit Function
        End If
        NewTokenStuff.Privileges(0).Attributes = 0
        'Disable shutdown-privilege
        If AdjustTokenPrivileges(hProc, False, NewTokenStuff, Len(NewTokenStuff), OldTokenStuff, Len(OldTokenStuff)) = 0 Then
            Exit Function
        End If
    Else
        'initiate the system shutdown
        If InitiateSystemShutdown("" & Machine, Message, Delay, Force, Restart) = 0 Then
            Exit Function
        End If
    End If
    InitiateShutdownMachine = True
End Function

Private Function GetMyMachineName() As String
    Dim sLen As Long
    'create a buffer
    GetMyMachineName = Space(100)
    sLen = 100
    'retrieve the computer name
    If GetComputerName(GetMyMachineName, sLen) Then
        GetMyMachineName = Left(GetMyMachineName, sLen)
    End If
End Function

Module (any routine really):

Option Explicit

Private Sub Main()
    Dim Shutdown As New CShutdown

    Set Shutdown = New CShutdown

    Shutdown.InitiateShutdownMachine "Computer Name", True, True, True, 60, "You initiated a system shutdown..."
    
    Set Shutdown = Nothing
    End ' It's a delay, so terminate the program
End Sub

22-05-2002 at 02:52 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Killa4Hire_ShoGuN
Level: Guest

icon Re: Help /w SystemShutdown API Call

So 2 questions...
Does this work on Windows98?

And all I do is put this code in the Module and it will work?

22-05-2002 at 03:50 PM
| Quote Reply
Killa4Hire_ShoGuN
Level: Guest

icon Re: Help /w SystemShutdown API Call

So 2 questions...
Does this work on Windows98?

And all I do is put this code in the Module and it will work?

22-05-2002 at 03:50 PM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1616
icon Re: Help /w SystemShutdown API Call

It's listed as NOT supported on 9x lines (although the Class module goes in the class module, the part that calls the class module can go anywhere).

On 9x machines the following works:

'In general section
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
'reboot the computer
    ExitWindowsEx EWX_FORCE Or EWX_REBOOT, 0
End Sub


[Edited by JLRodgers on 22-05-2002 at 09:59 AM GMT]

22-05-2002 at 03:58 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Killa4Hire_ShoGuN
Level: Guest

icon Re: Help /w SystemShutdown API Call



Could you send me a working model of the system shutdown? Not as a .ExE but as a project so I could look at the code and such, this would be great, if you need my Email it's

EEvilTheKrazyKat@cs.com

Thanks

I want this to BigBrother the computers for my class. being able to shutdown all the computers at once would be relle great.     

[Edited by Killa4Hire_ShoGuN on 22-05-2002 at 04:11 PM GMT]

22-05-2002 at 04:08 PM
| Quote Reply
Killa4Hire_ShoGuN
Level: Guest

icon Re: Help /w SystemShutdown API Call

This is all I want to accomplish...

I want to use the SystemShutdown API to be able to shut my computer down and other computers over the network. If you could post a compleat code or a working project model this would be great, I used the code you provided for me - putting the class module code in a class and putting the module code in the module. I ran it and nothing happened. Should I have added a button saying Call ShutDown or something

22-05-2002 at 04:17 PM
| Quote Reply
godspeed
Level: Guest

icon Re: Help /w SystemShutdown API Call

It's not that hard to put it to work:

'---start---'

'Put this code at the top of the forms general section'

Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long

'Add a command button (Command1):

Private Sub Command1_Click()
'reboot the computer
    ExitWindowsEx EWX_FORCE Or EWX_REBOOT, 0
End Sub

'---end---'

Just double click your form, delete all that is in it, and paste the above code.

22-05-2002 at 04:22 PM
| Quote Reply
Killa4Hire_ShoGuN
Level: Guest

icon Re: Help /w SystemShutdown API Call

I need to be able to shutdown Computers over the NETWORK, this ExitWindowsEx is for you own computer rite? or am I wrong.

22-05-2002 at 04:25 PM
| Quote Reply
Killa4Hire_ShoGuN
Level: Guest

icon Re: Help /w SystemShutdown API Call

This is what I have:

In Class Module:
' Shutdown Flags
    Private Const EWX_LOGOFF = 0
    Private Const EWX_SHUTDOWN = 1
    Private Const EWX_REBOOT = 2
    Private Const EWX_FORCE = 4
    Private Const SE_PRIVILEGE_ENABLED = &H2
    Private Const TokenPrivileges = 3
    Private Const TOKEN_ASSIGN_PRIMARY = &H1
    Private Const TOKEN_DUPLICATE = &H2
    Private Const TOKEN_IMPERSONATE = &H4
    Private Const TOKEN_QUERY = &H8
    Private Const TOKEN_QUERY_SOURCE = &H10
    Private Const TOKEN_ADJUST_PRIVILEGES = &H20
    Private Const TOKEN_ADJUST_GROUPS = &H40
    Private Const TOKEN_ADJUST_DEFAULT = &H80
    Private Const SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
    Private Const ANYSIZE_ARRAY = 1
    Private Type LARGE_INTEGER
        lowpart As Long
        highpart As Long
    End Type
    Private Type Luid
        lowpart As Long
        highpart As Long
    End Type
    Private Type LUID_AND_ATTRIBUTES
        'pLuid As Luid
        pLuid As LARGE_INTEGER
        Attributes As Long
    End Type
    Private Type TOKEN_PRIVILEGES
        PrivilegeCount As Long
        Privileges(ANYSIZE_ARRAY) As LUID_AND_ATTRIBUTES
    End Type
    Private Declare Function InitiateSystemShutdown Lib "advapi32.dll" Alias "InitiateSystemShutdownA" (ByVal lpMachineName As String, ByVal lpMessage As String, ByVal dwTimeout As Long, ByVal bForceAppsClosed As Long, ByVal bRebootAfterShutdown As Long) As Long
    Private Declare Function OpenProcessToken Lib "advapi32.dll" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long
    Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
    Private Declare Function LookupPrivilegeValue Lib "advapi32.dll" Alias "LookupPrivilegeValueA" (ByVal lpSystemName As String, ByVal lpName As String, lpLuid As LARGE_INTEGER) As Long
    Private Declare Function AdjustTokenPrivileges Lib "advapi32.dll" (ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, NewState As TOKEN_PRIVILEGES, ByVal BufferLength As Long, PreviousState As TOKEN_PRIVILEGES, ReturnLength As Long) As Long
    Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
    Private Declare Function GetLastError Lib "kernel32" () As Long

Public Function InitiateShutdownMachine(ByVal Machine As String, Optional Force As Variant, Optional Restart As Variant, Optional AllowLocalShutdown As Variant, Optional Delay As Variant, Optional Message As Variant) As Boolean
    Dim hProc As Long
    Dim OldTokenStuff As TOKEN_PRIVILEGES
    Dim OldTokenStuffLen As Long
    Dim NewTokenStuff As TOKEN_PRIVILEGES
    Dim NewTokenStuffLen As Long
    Dim pSize As Long
    If IsMissing(Force) Then Force = False
    If IsMissing(Restart) Then Restart = True
    If IsMissing(AllowLocalShutdown) Then AllowLocalShutdown = False
    If IsMissing(Delay) Then Delay = 0
    If IsMissing(Message) Then Message = ""
    'Make sure the Machine-name doesn't start with ''
    If InStr(Machine, "") = 1 Then
        Machine = Right(Machine, Len(Machine) - 2)
    End If
    'check if it's the local machine that's going to be shutdown
    If (LCase(GetMyMachineName) = LCase(Machine)) Then
        'may we shut this computer down?
        If AllowLocalShutdown = False Then Exit Function
        'open access token
        If OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES Or TOKEN_QUERY, hProc) = 0 Then
            MsgBox "OpenProcessToken Error: " & GetLastError()
            Exit Function
        End If
        'retrieve the locally unique identifier to represent the Shutdown-privilege name
        If LookupPrivilegeValue(vbNullString, SE_SHUTDOWN_NAME, OldTokenStuff.Privileges(0).pLuid) = 0 Then
            MsgBox "LookupPrivilegeValue Error: " & GetLastError()
            Exit Function
        End If
        NewTokenStuff = OldTokenStuff
        NewTokenStuff.PrivilegeCount = 1
        NewTokenStuff.Privileges(0).Attributes = SE_PRIVILEGE_ENABLED
        NewTokenStuffLen = Len(NewTokenStuff)
        pSize = Len(NewTokenStuff)
        'Enable shutdown-privilege
        If AdjustTokenPrivileges(hProc, False, NewTokenStuff, NewTokenStuffLen, OldTokenStuff, OldTokenStuffLen) = 0 Then
            MsgBox "AdjustTokenPrivileges Error: " & GetLastError()
            Exit Function
        End If
        'initiate the system shutdown
        If InitiateSystemShutdown("" & Machine, Message, Delay, Force, Restart) = 0 Then
            Exit Function
        End If
        NewTokenStuff.Privileges(0).Attributes = 0
        'Disable shutdown-privilege
        If AdjustTokenPrivileges(hProc, False, NewTokenStuff, Len(NewTokenStuff), OldTokenStuff, Len(OldTokenStuff)) = 0 Then
            Exit Function
        End If
    Else
        'initiate the system shutdown
        If InitiateSystemShutdown("" & Machine, Message, Delay, Force, Restart) = 0 Then
            Exit Function
        End If
    End If
    InitiateShutdownMachine = True
End Function

Private Function GetMyMachineName() As String
    Dim sLen As Long
    'create a buffer
    GetMyMachineName = Space(100)
    sLen = 100
    'retrieve the computer name
    If GetComputerName(GetMyMachineName, sLen) Then
        GetMyMachineName = Left(GetMyMachineName, sLen)
    End If
End Function

On Form:
Private Sub Command1_Click()
Dim Shutdown As New Class1

    Set Shutdown = New Class1

    Shutdown.InitiateShutdownMachine "Q4683", True, True, True, 5, "You initiated a system shutdown..."
    Shutdown.InitiateShutdownMachine "", True, False, True, 0, "You're Dead"
    
    Set Shutdown = Nothing
    'End ' It's a delay, so terminate the program
End Sub

Me and my teach think that there is no need for the module, but to instead use a button to call the shutdown. shutdown or whatever.

22-05-2002 at 04:56 PM
| Quote Reply
godspeed
Level: Guest

icon Re: Help /w SystemShutdown API Call

I think I see an easier way. I think that you should make a client and server program. Put the client on every computer you want to shutdown and have it run at startup. Then make the server send the command "shutdown" or something like that. When the client recieves the command, have it run the code that was posted earlier (the one that I put up). You would just have to have the server establish a connection with each computer momentarily and they would then just shutdown. That is if you know the basic Winsock functions (DataArrival, ConnectionRequest, and SendData).

22-05-2002 at 05:51 PM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1616
icon Re: Help /w SystemShutdown API Call

The Win 9x code will only shut down the pc it's on, (the client/server would be the only way I believe given a 9x to shut down all PCs,). Which means you'd have to have the program running/installed on every PC you need to shutdown.

The first code I supplied (the one with a class module) will only work on a NT computer (your computer AND all other computers have to be NT).

The code itself can be put anyhere, with minor modifications as to hot to initiate it. Although code is normally centralized.  

Class modules makes it easier to maintain code that almost never changes (without using a DLL). Although the Class module code can be put in a reguar module, or even a form with minor modifications. which is why the code was in a class module, it's how it's stored on my PC.

22-05-2002 at 06:07 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Killa4Hire_ShoGuN
Level: Guest

icon Re: Help /w SystemShutdown API Call

So only windowsNT has the power of SystemShutdown beween computers on a network?

22-05-2002 at 07:37 PM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1616
icon Re: Help /w SystemShutdown API Call

As far as I know. Win 9x don't have that many networking abilities really (well as far as API calls, and stuff).

Never been able to successfully shutdown one network wise, well, other than the client-server method; but that involves installation of the program.



22-05-2002 at 08:21 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
LabViolator
Level: Guest

icon Re: Help /w SystemShutdown API Call

I think i figured it out.  I will tell you in class tomorrow.  If you see this tonight start a new topic and i will watch for it and tell you how.

23-05-2002 at 12:02 AM
| Quote Reply
LabViolator
Level: Guest

icon Re: Help /w SystemShutdown API Call

call the new topic server and client.

23-05-2002 at 12:05 AM
| Quote Reply
Chewie
Level: Guest

icon Re: Help /w SystemShutdown API Call

Hi. This is my first post so please take it easy.
I want to make a problem to replace the shutdown.exe app that comes with Windows 2000 SP3.
The code above was helpful and can do all as shutdown.exe except 2 things.
1). Perform at a scheduled time.
I suppose a timer or something can be used fr this.

2). Answer yes to all. This is supposed to "answer yes" to all apps being shutdown when the PC is being shut down. How can this effect be captured use code as above?

05-01-2003 at 10:03 PM
| Quote Reply
Chewie
Level: Guest

icon Re: Help /w SystemShutdown API Call

Is there a way to shutdown a PC over the net if you have it's username and password?

05-01-2003 at 10:06 PM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1616
icon Re: Help /w SystemShutdown API Call

If you tell it to "foce app shutdown" it should terminate all programs (losing any work in progress in them), if you mean to allow the programs to be shut down (like a user would), you would have to NOT force the shutdown.

You could then, theoritically, use sendkeys to send the keys to the apps. Although you'd have to know exactly what key combo to send to which app; which would be difficult, since not all apps have the same "shutdown with work in progress" messages. Then you'd have to send messages for where to save files, along with filenames, with even more dialog boxes... not really feasible.

Normally you'd  either:
1) use a timer and check the time
2) schedule the program to run (like the AT command, or task scheduler)

Although if you have the shutdown.exe app with windows, I'd just use it with the AT command.

For the second post, 'can you shutdown over net', if you mean on a local network, not internet, it's the code supplied.

For the latter, extremely doubtful unless a client program is installed to handle it.

Without a client program you'd have to be on the same network with permissions (NT computer for it to work). Any other way would be a security breach - which would be treading in the realm of hacking/virus writing.



____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

05-01-2003 at 10:44 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Chewie
Level: Guest

icon Re: Help /w SystemShutdown API Call

Shuting down over the net can't be don without a client program even if it's your PC and you have full access to it?

05-01-2003 at 11:05 PM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1616
icon Re: Help /w SystemShutdown API Call

I've modified this numerous times to make it as clear as possible, in as little space as possible.

If you don't have a static IP, you might as well give up now. Infinate # of PC's can have the same domain/computername. Everything online for accessing PC's is IP based. No static IP, no accessing your PC.

--- If the above is true, you can stop reading ---

Computers don't know who owns it. It could be you, or someone who stole your password.

To allow a user to shutdown a PC over the internet without a client program is a great security breach. Government PC's could be shutdown, Hospitals, whatever, just if you have a username and password.

For a login, administrator and guest exist on all NT machines, all a potential hacker needs is a password and they'll guess at it.

The easiest way would be to use Microsoft Netmeeting, it allows you to control a remote PC by logging into it, and sending you the screen.

Unless you have NT login with a 14 digit password with upper/lower alpha characters and numbers with no actual words that you change bi-weekly/monthly, I'd be careful attempting it. Also you'd want to set a password for the administrator account, all other accounts, lockout the guest account...

Any option though also depends on what the ISP blocks from being transmitted. Firewalls by default will block all IM programs (Netmeeting being one of them).


[Edited by JLRodgers on 05-01-2003 at 05:49 PM GMT]

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

05-01-2003 at 11:48 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
coshx
Level: Guest

icon Re: Help /w SystemShutdown API Call

I know this thread's old, but just in case someone google's for it (like me), I believe that in the code:
'Make sure the Machine-name doesn't start with ''
    If InStr(Machine, "") = 1 Then
        Machine = Right(Machine, Len(Machine) - 2)
    End If

"" should be replaced with """" (4 double quotes), or am I missing something?

24-06-2003 at 02:17 PM
| Quote Reply
AndreaVB Forum : VB General : Help /w SystemShutdown API Call
Previous Topic (How can I send a web page as a email to any body by asp, please inform me.)Next Topic (Viewing Form whilst running Debug-Step Into) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder