Browsed by
Tag: C#

Getting local IP address programmatically in Windows 7

Getting local IP address programmatically in Windows 7

I created a small client app for my company that required the local IP address (assigned by DHCP) to determine what site it was on. It reads the second octet value, which is consistent with each of our buildings in our enterprise. From here, I can determine what content to load so no matter where the PC is placed, it automatically grabs content only specific to that location. Anyway, when testing this application on Windows 7 it doesn’t load any…

Read More Read More

Excellent article on getting AD info using C#

Excellent article on getting AD info using C#

I’m always getting, updating, and validating against AD info at my company, and today I needed to pull several different schema attributes in one method, and kept running into more and more trouble. Code got bigger and bigger, and I thought there had to be a way to simplify this. I then ran across a CodeProject article definitely worth mentioning. The author, Rajasekhara Sambangi does an excellent job of demonstrating a simplified way of pulling just about anything from AD…

Read More Read More

New code library site

New code library site

I created a basic code library site to host all of the code snippets I’ve gathered and/or created over time. Go here to visit the site. It’s pretty basic and empty right now, I’ll dress it up a little more as time goes on. I’m also trying to determine a better way of sub-categorizing the code in each of the language tabs. I welcome suggestions. Enjoy!

Setting a Silverlight slider control at initialization

Setting a Silverlight slider control at initialization

I recently ran into a problem where I needed a Silverlight slider control pre-populated with a specific value when the page loaded, but if you use the slider`s ValueChanged event in the code behind file, it dies. Why? Because as the page loads and initializes, the code behind is trying to run and the slider control hasn`t finished being created yet. Putting the values I wanted them to start at worked fine, as long as you put them after the…

Read More Read More