Tuesday, July 13, 2010 |
|
|
I ran into a situation where I needed to know what control was gaining focus in the Leave() event of another control. The situation I was working with is as follows; I have a multi-line text box that when it gains focus I want a listview of potential values to popup below it. When the textbox loses focus, the listview should be hidden. The user should be able to click on the listview to select items to input into the textbox. The problem was when the user clicked on the listview, the textbox lost focus and was hiding the listview. Enter the ActiveControl property on the form. This handy property allows me to check, in the Leave() event, what is the new active control with focus. Thus I can check to see if the textbox lost the focus to the listview control and if so, skip the hiding of it. Here we have the textbox named txtComplaint, when it gets the focus we make listView visible. private void txtComplaint_Enter(object sender, System.EventArgs e)
{
listView.Visible = true;
}
When the textbox loses focus we see if the ActiveControl is the listView, if not we hide it. private void txtComplaint_Leave(object sender, System.EventArgs e)
{
if (ActiveControl.Name != "listView")
treeComplaint.Visible = false;
} |
Tuesday, July 13, 2010 3:56:56 PM (Eastern Daylight Time, UTC-04:00) | | .NET | Code
|
|
|
|
Wednesday, May 12, 2010 |
|
|
Thought it was about time I start these back up. Simply a few links I find interesting, perhaps some short brief thoughts that don’t necessarily deserve their own post, or whatever tidbits I may find interesting. - I hate nulls, I hate checking for them, I hate having to muddy my code up testing for null. In code that I write I try to avoid return nulls as much as possible. John Sonmez seems to agree with me in this nice article.
- I love enums… I love using them, I love the readability they give me… I love the aspect of limiting my choices on values so I don’t have to worry about bad values, I love not having to check for nulls…I could go on, but it seems once again John Sonmez agrees with me. Read his article.
- I love var….ok, that is an exaggeration….I do like it though. Resharper suggests strongly that I use it (by default anyway), so I got in the habit of doing so. I’m not extreme, I only use it when the type of the variable is evident from surrounding code. Yes, here again John writes and speaks of his conversion to the var side.
- jQuery is just cool. The plugins people create are incredible. Here is a cool one I found today, jQuery Circulate. That’s one I just want to find a use for.
|
Wednesday, May 12, 2010 10:51:05 PM (Eastern Daylight Time, UTC-04:00) | | Midnight Snack
|
|
|
|
Thursday, December 31, 2009 |
|
|
Well here I am again, if I blog nothing else each year, I have always opened the year with a post to reflect on the past year and to look ahead to next. Let’s take a look at 2009 and see what my goals were and see how I ended up. Recap of 2009 (Last Years Post) - Last year I stated I wanted to become more Christ like and to become a better father and husband. Not sure how well I succeeded in that, guess you’ll have to ask my wife and kids. I do know that I love my wife and kids more and more each day. And while I falter like any human and don’t always show it like I should, my love for Christ has not lessened.
- Last year I stated I refused to participate in a recession. Well I think I’ve succeeded in that to a degree. Business has been great, perhaps better this year than in recent history. On the other hand, I’ve been more careful with my purchases and have been hesitant to make any purchases beyond the essentials. I think this stems from the uncertainty of where our current administration is leading us more than anything.
- I wanted to develop more tools and products – well I’ve failed miserably there. No progress at all on this, though in the last few months I’ve come up with some ideas that might actually work (we’ve all said that haven’t we.)
- In 2009 I wanted to read more. In that, I have more than exceeded my expectations. I typically read between 20-30 books each year, mostly fiction with a few non-fiction sprinkled in. In 2009, I finished the year with 42 (if I counted correctly) So I’m quite happy. To see the books I’ve read (as well as my buddy Todd) go to www.wordsforwords.com.
- I vowed to blog more in 2009. I’ve failed miserably there, other than my increased book reviews due to my reading 42 books.
- I wanted to get my wife started in a business. Well, that didn’t work out so well either. The idea we had just never got out of the idea stage. The good news is, it didn’t cost us anything and very little time was invested.
- I wanted to continue to get in shape. Well I failed miserably there as well. I put on the 30 pounds that I lost in 2008 and failed to follow through with my marathon hopes.
In general however, I did enjoy 2009 much better than 2008 and it was a very good year. Anyone who knows us knows that are children are very involved in sports. I got to see my oldest son play varsity football as a freshman (limited Friday night time, but did start on the JV team), my second son had a good year in his first year of tackle football and his team made it to the championship game (which we lost, but we were very proud of the team), youngest son too young for sports yet, but becoming quite the little person. Our daughter was involved in competition dance the first part of the year and did quite well and has the trophies to prove it. We did pull her off the team this year because of the financial and time commitments was just too great for the family. Looking forward to 2010 – my goals for 2010 are much the same as they are every year. - As always my number one priority above all else is to honor God each every day, as well as becoming the husband and father that my family needs.
- Continue to grow and expand my business. We have some great plans here that are already in the works. I hope that this time next year I can come back to you and report success.
- I do have an idea for a tool that not only would I use every day in my work, but may just be something I can make a little from.
- I read 40+ books in 2009, I want to at least stay at that level if not exceed it. I do have some work related books that I want to read as well this year to expand my knowledge in my field.
- Ok, ok….I’ll say it again. Blog more.
- Get myself in shape and improve my healthy lifestyle (or start living one at least)
- I’ll get slight political here….I want to work towards bringing our nation out of the mess it is in and work towards restoring our republic. Return our nation to one where the constitution mattered and people worked hard to achieve what they obtain…I feel we’ve moved away from what made this nation great over the last year and I want to work in my own small way to restore that. End of my political rant.
- I want to become more self-reliant. What do I mean by this? Well garden more, raising my own crops and livestock (starting with chickens – have one already), and putting more food up by canning, freezing or whatever. Here’s a great magazine / website I’ve found with lots of great articles to help towards this goal.
- Work towards becoming debt free.
I’m sure there are goals here that I will not succeed at or at least not to the level I may have hoped, but I always feel goals are worth having. If you set your sights high and work towards that, then even if you only make it halfway, you’ve at least moved closer. God bless you all and here’s hoping that you all have an awesome 2010. |
Thursday, December 31, 2009 10:23:09 AM (Eastern Standard Time, UTC-05:00) | |
|
|
|
|
Thursday, July 23, 2009 |
|
|
We're meeting for Code and Coffee at the Canton Arabica tomorrow (Friday) at 7am. We trying to move quickly through Ruby Koans. |
Thursday, July 23, 2009 8:49:14 AM (Eastern Daylight Time, UTC-04:00) | | Code and Coffee
|
|
|
|
Thursday, June 18, 2009 |
|
|
Code and Coffee in Canton set for Friday June 18th at 7am at the Canton Arabica. Check out Darrell's post on getting started with Ruby Koans if you're interested in working through it with us. Hope to see you there. |
Thursday, June 18, 2009 10:56:21 AM (Eastern Daylight Time, UTC-04:00) | | Code and Coffee
|
|
|
|
Thursday, June 04, 2009 |
|
|
We have another Code and Coffee scheduled for tomorrow (6/5) at the Canton Arabica on Dressler. We'll be there around 7 staying for about an hour or so. Darrell, Eric and I have been working through Ruby Koans and are working through the array's section. Please feel free to join us, you can start from the beginning and catch up to us or work on something else if you're so inclined. If nothing else, drop by have a coffee and say hello. |
Thursday, June 04, 2009 1:51:34 PM (Eastern Daylight Time, UTC-04:00) | | Code and Coffee
|
|
|
|
Friday, May 22, 2009 |
|
|
Three of us made it for Code and Coffee in Canton this morning. Always good to see Darrell and Eric. We're starting to work through Ruby Koans to learn the Ruby language. Very cool stuff and a very neat way to learn a language. Would be a good idea to see something like this for C#, VB.net or any other language for that matter. If I had time, maybe I'd work on something for C#. Anyway, our next get together is schedule for Friday June 5th. Same place, same time. We'll probably continue to work through Koans (we were working through about_arrays when we called it quits this morning). Feel free to come jump in and join us or if there is something else you'd rater work on that's cool too. |
Friday, May 22, 2009 3:21:44 PM (Eastern Daylight Time, UTC-04:00) | | Code and Coffee
|
|
|
|
Thursday, May 21, 2009 |
|
|
We're meeting for code and coffee again at Canton Arabica on Dressler in Belden at 7:00 am Friday, May 22. Four of us there last week ( Darrell Mozingo, Eric Schliffka, Josh Clark and myself). Last time we decided we're all interested in doing some Rails. That's way out of my comfort zone so should be fun. I'm looking forward to this week to see what we get started. Come out and join us! |
Thursday, May 21, 2009 8:34:54 PM (Eastern Daylight Time, UTC-04:00) | | Code and Coffee
|
|
|
|
Friday, May 08, 2009 |
|
|
A few weeks back I read about the Code and Coffee meetup in the Columbus Ohio area that Jeff Blankenburg mentioned. Sounded like a great idea to put together for those of located in the Stark County region in Northeast Ohio. Darrell Mozingo expressed an interest in at as well and helped to get this first one organized. What is the purpose of this? To get together for some great coffee (or other preferred morning beverage) and do some pairing in the hopes of pushing the comfort zone and learning some new stuff. Our hopes are to keep this very informal and casual with really no agenda, just working on some things that are interesting and helping us all grow. Idea is to pair, so no need to bring laptop if you don't have one, just come and we'll all hopefully learn something. First meetup for the Stark County Code and Coffee will be Friday May 15th at the Canton Arabica on Dressler in Belden. We'll be there at 7am and try to get the old brain functioning that early. Since everyone is busy, we'll try to keep this to about an hour so most anyone can be back to work by 8:30. I'm an independent so there is a great possibility that I may stick around longer, so if you can too, we'll keep on working. Unless we come up with something better, we'll probably keep this first one to more of a meet and greet to see where everyone's interest lies. But we'll pretty much play it by ear and just wing it. If you're interested or have any more questions, contact either myself or Darrell. Otherwise, we hope to see you there! |
Friday, May 08, 2009 11:43:31 PM (Eastern Daylight Time, UTC-04:00) | | Code and Coffee
|
|
|
|
|
|
|
| Archive |
| July, 2010 (1) |
| May, 2010 (1) |
| December, 2009 (1) |
| July, 2009 (1) |
| June, 2009 (2) |
| May, 2009 (3) |
| March, 2009 (1) |
| January, 2009 (1) |
| November, 2008 (1) |
| July, 2008 (1) |
| March, 2008 (3) |
| January, 2008 (1) |
| November, 2007 (1) |
| October, 2007 (4) |
| March, 2007 (4) |
| February, 2007 (5) |
| January, 2007 (19) |
| December, 2006 (1) |
| May, 2006 (2) |
| April, 2006 (1) |
| March, 2006 (2) |
| February, 2006 (7) |
| January, 2006 (8) |
| December, 2005 (8) |
| November, 2005 (4) |
|
|
|
|
| Themes |
| Pick a theme:
|
|
|
|