welcome to my blog
The best place on the internet for random code!
www.therealgromer.com









Archive for April, 2007

Apr
30
    
Posted (Mike) in Vista on April-30-2007

Wired networks > wireless networks. You really can’t deny it. I have no idea why Microsoft puts the wireless network adapter above the wired adapter in the priority list. Some of you may have changed this in Windows XP, pretty easy finding the Network Connections folder, going to Advanced -> Advanced Settings and reordering the adapters in there. It’s the same way in Vista…once you find the Advanced menu. Windows Vista made a lot of changes to some of the control panel, so it takes some time finding everything.

I’m sure there is a way to actually click on a menu item to open the Network Connections folder, but I think it’s easier to go to the Start menu and type in ncpa.cpl and hit enter.

Start -> ncpa.cpl

The Network Connections window in Vista looks almost the same as in XP, just a few little things. One of them is the lack of a menu bar. To get the menu bar showing, you need to click on Organize and then click on Layout which expands a menu and then click Menu Bar. Now the menu bar should be showing.

Layout menu

Now you can setup the connection order the same way as in XP. Go to the Advanced menu, click on Advanced Settings and you can highlight network adapters and click the up and down arrows to move the order around.

Advanced settings window.

You should be good to go now. Also, if anyone knows how to get to the Network Connections window without typing in ncpa.cpl in Start menu, please leave a comment.



Apr
27
    
Posted (Mike) in C#, Coding on April-27-2007

If any of you code in Visual Studio 2005, you might have seen this exception thrown before.

Loader Lock Detected

It can be really frustrating if you don’t have the answer. Let me take that stress away. All you need to do is press Ctrl + Alt + E and you will get this window:

Exceptions Window

Expand Managed Debugging Assistants and then scroll down until you see the LoaderLock checkbox. All you need to do is uncheck it.

Loader Lock Checkbox

Hit Okay and you won’t see this problem in this current project again. It will come back in other projects though. I’ve heard there are registry hacks to fix this, but I have yet to try. If anyone has, please comment on the success of it!



Apr
27
    
Posted (Mike) in C#, Coding on April-27-2007

If you are a programmer, I’m sure you have used try/catch blocks in your code to hopefully eliminate any dreadful unhandled exceptions. We all know they usually happen only when giving a presentation and that’s no good! You could go by throwing generic exceptions all day long…

  1. throw new Exception(“Hey, you broke my program :(”);

That’s a bit generic though. This is where custom exceptions come in. It’s more intuitive and much less generic than throwing Exception() every time. It will also give you better control over choosing what to do when any exception is thrown. Instead of having one catch block, you’ll have the catch blocks for your custom exceptions with the generic Exception() last to catch anything that got past.

First thing you’ll need to do is create a Windows Library project. I named mine CustomExceptions.

Create project window.

When the new project is open, you’ll have a file called Class1.cs which you can rename to the name of the exception you are going to create. When you do this, you will see a window like this:

Rename file popup.

Just click the Yes button and your class name will change throughout your project. Now we’re ready to do the actual coding. When creating custom exceptions, we must extend the ApplicationException class.

  1. public class IllegalInputException : ApplicationException
  2. {
  3. }

Now we need to create the instance variables to be used in your exception. We’ll need one for the severity level, one for the log level, one for the inner exception and one for the message.

  1. private int severityLevelOfException;
  2. private int logLevelOfException;
  3. private Exception innerException;
  4. private string customMessage;

The severity and log levels allow you to give a bit more information about the type and severity of the exception you are throwing. If your exception was caused by another exception, it will store the original exception data as the inner exception. Last, the custom message is what you put in it to be used when it is caught. Read the rest of this entry »



Apr
26
    
Posted (Mike) in Vista on April-26-2007

I have Vista Business installed on my desktop at home and love it so I decided I would install it on it’s own partition on my IBM T60p because I wanted to keep XP around just in case some of our school software didn’t work with it, I’d have the option to reboot into XP. I’m sure most of you might want that too so you’d also be going the dual boot route. The annoying problem I faced when I was done setting up Vista on its partition was when the boot menu comes up after POST, the two options are Microsoft Windows Vista and An Earlier Version of Windows. I found that annoying and then found out I couldn’t access boot.ini through msconfig or the System Properties so I did a little searching. What I found was there are two options: an easy one and a hard one. In case you’d like to do more research, the hard option is opening a command prompt (Start -> type in cmd and hit enter) and running BCDEDIT. It’s all command line and pretty confusing.

The easy way around this is downloading EasyBCD by NeoSmart Technologies. Once installed, you simply run it and click the Configure Boot button:

EasyBCD Configure Boot window.

In the bottom half on the right, select An Earlier Version of Windows in the Choose an OS to change the associated settings drop down menu. You can then change the name in the Name text box. Hit the Save Settings button, reboot and your boot menu will now have the new name and Windows Vista!



Apr
25
    
Posted (Mike) in BG Alert, Coding, Projects on April-25-2007

In addition to being a student at Neumont, I own a company named BG Alert, L.L.C. It provides parents of type 1 diabetics with ease of mind by keeping them up to date on their child’s blood glucose levels while at school, at a friend’s house, basically anywhere without parents. The child enters in their blood glucose level and sometimes some other important information about their health and they get an instant response from the database that instructs them what to do based on the numbers entered.

The best thing about this system is the parents create these messages and they are custom based on the time of day and their blood sugar at that time in the day. Once the system tells the child what to do, it sends an email and a text message to the parent(s). This eliminates the need for the parent to call the school every hour to see what’s going on and to tell them what to do. It allows the parents to have more freedom and not worry as much.

Right now, the website is not complete, but getting there. The ETA on completion is May 6th. The database is created as are most of the stored procedures used in it. The data and business layers are about 70% done as of tonight and the website has a layout that just needs the company’s copy and forms entered into. Fortunately, I’ve been able to have help from some of my good friends:

  1. Josh Arnold
  2. Dan Marolt
  3. Ryan Abreu
  4. Tommy English

Without these 4 guys, I would have an ETA of May 6th next year! If you have the opportunity to work with any of them, jump on that chance, you will not regret it.

Also, if you know of any parents of type 1 diabetics, tell them about my site and give them my email address (mike@bgalert.com), I’m going to need testers soon!



Apr
25
    
Posted (Mike) in Neumont, Projects on April-25-2007

One of the problems with people like me is I don’t remember to turn things in. I’ll finish the assignment a few days early and then I’ll start working on something else. The next week, someone asks what I got on said assignment and I remember…I never turned it in! This will all change at the end of this quarter. Our group is creating two things:

  1. A module that can be used by anyone to create applications that can securely access Neumont’s Learning Management System (LMS), called RemoteLMS.
  2. An application that a student can install on their computer that will use pop-up notifications from the system tray that tell the students when assignments have been graded or a teacher has posted lecture notes to the LMS and many other types of notifications, called DesktopLMS.

DLMS will allow for students to receive text messages and email alerts as well for due dates. A student will be allowed to tell the system to send them a text message 2 hours before the assignment is due.

We are hoping this project is something that everyone at Neumont will find useful. We are also planning on keeping it an open project on Sourceforge so other’s can help us add onto it after the initial application has been released. This is a project we all see continuing after the quarter is over.



Apr
25
    
Posted (Mike) in General, Neumont on April-25-2007

So I caved and I’m writing a blog now . I figured I could post all the cool stuff I find for my various software and web projects here to make it a bit easier for others to find answers to their questions. It’s sucked having to search Google for 30 minutes to find answers for what seemed to be little things.

So a little about me…my name is Mike Gromer and I go to school at Neumont University. It’s a fast-paced computer science school that puts a lot of emphasis on working on projects with teams. It’s been here in Salt Lake for a few years now and the graduates have had enormous success in the field. Luckily, Neumont is partnered up with companies like Microsoft and IBM which helps keep the school technologically superior to many other school. I was in CS at the University of Texas and in my first quarter at Neumont, I had learned more than in 3 semesters at UT.

Hopefully I will stay up to date and keep my blog up to date. Like I said, my goal is to keep an easy to access list of coding tricks so people don’t have to search hard like I did. Have a good one!