Killing a process

99 times out of 100 you can kill any process from within task manager, but what about that 100th time when it just doesn’t work?

That’s when it’s time to get out the command prompt.

In task manager, you need to first get the PID.  Click View -> Select Columns and put a check next to PID (Process Identifier).  This will show you the PID in the task manager Processes tab.

Now, open command prompt and run:

Kill -f PID

If the process you want to kill was started by a scheduled task you need to run:

AT HH:MM <path>kill -f PID


Soon <path>kill -f PID



Veracruz Spanish Immersion School

I am in the process of looking for a spanish school for this winter when I will be traveling to the Yucatán Peninsula.

I had meant to write something on here about my last trip to Mexico when we went to Veracruz.

We stayed at the Veracruz Spanish Immersion School.  Well, actually because we were there during their most busy week and we requested an odd schedule they put us up in one of their other houses, which was a short bus ride (or walk) from the school. 

The school is run by an American couple, who I think have setup a great program in Veracruz.  They meet you at the airport to make sure you arrive without issue.  Our rooms were nice, and all the rooms had A/C, which was extremely important as it was the hight of the summer.  Wireless internet access turned out to be equally important as some things with one of my clients meant that I needed to have internet access from my laptop to assist them, and I was able to do this without problem.

We met a lot of interesting people who were staying at the school.  I think probably the idea of language immersion programs might bring out some slightly odd people, and there were some for sure :), but we met a lot of nice people and spent a good amount of time hanging out with them.

The instructors were mostly in their early 20s.  Based on talking with some of the other students who had been doing these immersion programs for a while, it seemed like that might be different from most other programs, where older more experienced instructors were used, but I thought it was great.  I enjoyed talking with all our teachers, and they were all immensely friendly and helpful. 

All the instructors and students ate breakfast and lunch together, which gave you a chance to meet some of the other students/instructors that you might not have in your classes.  They also have one of the instructors during non-lesson hours from 5am to 9pm in the common area/living room.  This is a great idea, because if nothing is going on you can go hang out and practice your spanish, or just listen to others if you don’t feel like talking.

The other thing they do, which is a really great idea, is that for 2 hours a day you go out on the town with one of the instructors.  You can use this time to practice your spanish, to learn about the city, to learn the bus system, to see sites, or in our case, to go find out how we can buy tickets for the upcoming futbol game between Cruz Azul and Los Tiberones Rojos.

One day a week is a day long trip to one of a number of destinations.  This is when we went to see some ruins.  We walked into the local town for lunch, and walked across a suspension bridge.  It was fun.

Veracruz was a nice place.  Safety was not an issue during our trip.  We were our walking around the city past midnight, and it was no big deal.  The buses that run up and down the main road were really easy to use and we took them several times a day to get all over the place.

The only problems we had were that I got sick (sore throat/cold) and then near then end of our trip got “sick” (montezuma’s revenge!).  I probably had some bad ice somewhere.  Next time I’ll bring some medicine in case that happens.  But overall, it wasn’t that big of a deal. 

We have a few other places we would like to visit, but I would definitely go back.  We had fun and I think we learned a lot even though we were only there for a week.


Sub Sub Notebooks

This is really pretty cool. 

It’s really really small: 95mm by 65mm by 15.5mm, but with a resolution of QVGA, I don’t see it doing all that well among people who really would consider using this for their email/internet access.


But this does pose an interesting question, will we ever have a smartphone that is able to run a normal OS and standard resolutions when connected to a doc?  My phone has more processing power than my old laptop did.  Why can’t it run a real OS and standard apps?

Master of Science

This week I received a notification that I had been awarded a letter of commendation from the University of Chicago.

I realized that I never posted anything on here about my graduation.  I graduated this summer with the degree of Master of Science in Computer Science.

I’m obviously proud to have been able to graduate from such a well regarded school. 

I know that I learned a lot of valuable things while I was going to class, in areas that I probably would not have entered otherwise.

Best news is, I paid it all as I went.  So I have no debt!  🙂


Problems Extending Winforms Combobox

On a recent project, one of my developers was trying to extend the combobox in a winforms project.  We wanted to reuse the same combobox in several places. 

The combobox would always have the same objects bound to it, and we wanted a few functions extra functions on the combobox that would centralize some functionality.

So we inherited from combobox, and in the constructor of our class we created the 5 objects that we need in the dropdown and we added them to the combobox items collection.

So far so good.

But we found that when we made a change in the designer for a form that uses this combobox, the designer put stuff in the designer.vb file.  Lines that were trying to add items to our combobox.

It used the .items.AddRange(…) function and tried to add 1 item for every item that we add in the contructor.

Basically it was looking like the designer instantiated the control, and then was trying to serialize the items in the combobox when we would change anything on the form.

This would eventually cause the designer to blow up, as well as a similar error when we tried to run the compiled code.

The solution was elusive and quite a pain.

Some credit needs to go to Andre for his post.

Basically we needed a way to tell in our code if the control was being hosted in the VS designer.  If it was, then we skipped the part where we populated this dropdown.

So first thing we did was create 2 functions to figure out where the control is hosted:

Private Function IsDesignerHosted() As Boolean
    Return Me.IsControlDesignerHosted(Me)
End Function
Private Function IsControlDesignerHosted(ByVal ctrl As Control) As Boolean
    If ctrl IsNot Nothing Then
        If ctrl.Site IsNot Nothing Then
            If ctrl.Site.DesignMode Then
                Return True
                Return IsControlDesignerHosted(ctrl.Parent)
            End If
            Return IsControlDesignerHosted(ctrl.Parent)
        End If
        Return False
    End If
End Function

Then, because it turns out that testing the DesignMode is useless when you are doing the testing from the constructor, so I had to move the databinding into it’s own function along with a instance variable to make sure we only do this one time.

Private cbInit As Boolean = False
Private Sub MyControl_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged
    If Not cbInit Then
        cbInit = True
        If Not Me.IsDesignerHosted Then
            '*** add items here
        End If
    End If
End Sub

There it is!


Getting Date For Batch Files

There are lots of times when you might be setting up a batch file or nightly job where it would be nice to have the date in a format that you can use as part of a log file name.  i.e. ErrorLog021508.log (feb 15, 2008).

This is a script I found from a guy who goes by seamonkey, so I left his ownership line intact.

echo on
@REM Seamonkey's quick date batch (MMDDYYYY format)
@REM Setups %date variable
@REM First parses month, day, and year into mm , dd, yyyy formats and then combines to be MMDDYYYY
FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B
FOR /F "TOKENS=1,2 DELIMS=/ eol=/” %%A IN ('echo %CDATE%') DO SET dd=%%B
FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B
SET date=%mm%%dd%%yyyy%
echo %date%

Removing The Dell Login Background Image

On Dell machines running Windows Server 2003 they are nice enough to stick an ugly bitmap on your background.  So when you VPN and RDP into the server, you get to sit and wait as it paints this image:

Thankfully, you can remove it.

Just use regedit and navigate to:

HKEY_USERS.DEFAULTControl PanelDesktop

Then delete the key for WallPaper.

It’s that simple!


White Sox Winner

I went to the last 2 Sox games: the make up “must win” game to force a tiebreaker, and the tiebreaker with the Twins, which the Sox won 1-0.  Great result!

The game was a “black out” where all the fans wore black, and while I expected only 50% or so to do so, I was amazed to see almost everyone was wearing black.

It was electric!