If you want to get the username for the currently logged in user you can use the following code; Public Shared ReadOnly Property Username() As String Get Return System.Environment.UserName End Get End Property
Check whether the application is currently being debugged
If you want to know whether the application is currently being debugged you can use the following code; Public Shared ReadOnly Property DebugMode() As Boolean Get Dim rtn As Boolean = False #If DEBUG Then rtn = True #End If
Check whether the current user is an administrator
An extremely simple way to check whether the currently logged in user has administrative rights on the local machine; Public Shared ReadOnly Property IsUserAdmin() As Boolean Get Return My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) End Get End Property
Stop someone from pasting into a TextBox
This article goes hand in hand with my article called “Restrict characters entered into textbox” and I shall use pretty much the same example as I used before. If you wanted to stop a user from entering anything but numbers
Using a ListView as a multi column ListBox

In order for you to get the ListView to act like a multicolumn ListBox you need to set the following properties Property Name New Value Reason FullRowSelect True If FullRowSelect is left on its default value of False then when
Restrict characters entered into textbox
If I had a pound for every time I saw someone post asking how to do this on a forum, I would be a rather rich man. Lets assume you wanted to have a textbox that would only allow for
Check to see whether a form exists at runtime
If you want to check whether a form exists in your project at runtime you can use the following method, you will need to ensure that you import System.Reflection in order for this to work. ''' <summary> ''' This method
Get an instance of a form dynamically at runtime
There is sometimes a need for you to be able to dynamically choose a form to load at runtime, in order to achieve this you’re able to use the following code, you will need to ensure that you import System.Reflection
Dynamically adding and later referencing control
This is something that was asked how to do in one of the forums I post help in. Basically the user wanted to know how to dynamically add controls to your form and then refer to them later in the