Skip to content

Sam Jenkins' website

Improving every day

Menu

  • Reading List
  • Digital Resume
  • About me

Month: August 2010

Get the username of the currently logged in user

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

Satal 17 August 2010 All, Computer, Programming, Uncategorized No Comments Read more

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

Satal 17 August 2010 All, Computer, Programming, Uncategorized No Comments Read more

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

Satal 17 August 2010 All, Computer, Programming, Uncategorized No Comments Read more

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

Satal 15 August 201022 August 2017 All, Computer, Programming, Uncategorized No Comments Read more

Using a ListView as a multi column ListBox

Viewing the ListView's available tasks

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

Satal 9 August 20104 September 2017 All, Computer, Programming, Uncategorized 4 Comments Read more

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

Satal 7 August 2010 All, Computer, Programming, Uncategorized No Comments Read more

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

Satal 4 August 2010 All, Computer, Programming, Uncategorized No Comments Read more

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

Satal 4 August 201022 August 2017 All, Computer, Programming, Uncategorized No Comments Read more

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

Satal 4 August 2010 All, Computer, Programming, Uncategorized No Comments Read more

Categories

  • All
  • Career
  • Computer
  • Excel
  • Marketing
  • Programming
  • Security
  • Soft Skills
  • Uncategorized
  • Websites

Archives

  • August 2017
  • July 2017
  • May 2017
  • March 2017
  • February 2017
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • August 2011
  • June 2011
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
© Sam Jenkins. Powered by Solutions Delivered
Copyright © 2021 Sam Jenkins' website. All rights reserved. Theme Spacious by ThemeGrill. Powered by: WordPress.