Geeks With Blogs
Jim Lahman's Blog Fortitude|Endurance|Faith|Teamwork September 2010 Entries
Creating a service via Visual Studio
These are my notes on creating a windows service using Visual Studio. Another post will show the code; this just deals with the Visual Studio IDE Add new project -> Windows -> Windows Service Rename service source name Create the installer View service in designer mode Right-click in designer to display menu; choose Add Installer Add Service Process Installer Define parent as Installer Set account as LocalSystem Add Service Installer Set display name Set serviceName; this is what appears in ......

Posted On Monday, September 6, 2010 7:28 PM

Using C# structs between classes
I use structures to group data, such as messages or data records. I also use structures to pass groups of data between functions so that I don't have a long parameter list. Ususually, structures are used within the same class, but I use them to between classes. To allow more than one class to use the structure, I encapsulate the structure(s) within another class that is used by all the classes that use the structure. In this example, I pass a structure from a function in one class to another function ......

Posted On Monday, September 6, 2010 3:59 PM

Synchronous event threads
C# supports what I call waitForEvent threads or formally known as synchronous event threads. This is a thread that is fired whenever an event in another thread occurs. I use this type of thread to perform an action when a bit transitions from true to false, a variable transitions above/below a limit. The reason for doing this is because we do not want to interrupt the timer thread which checks these values on a 1-sec basis with the chore of building & sending messages, updating database tables, ......

Posted On Monday, September 6, 2010 3:47 PM

ListView.TopItem property is buggy
I have a listView that is populated every 1/2 sec and when I set the TopItem to an ListItem whose index > visible items, then the list jumped between the topItem and back 2 spots. To correct the problem, I set the TopIterm AFTER the call to EndUpdate as shown in this code snippet: 1: lvB.EndUpdate(); 2: lvI.EndUpdate(); 3: lvR.EndUpdate(); 4: 5: if (lstEntryInts.Items.Count > 0) lstEntryInts.TopItem = lstEntryInts.Items[iTopVisI... 6: if (lstEntryBools.Items.Count > 0) lstEntryBools.TopItem ......

Posted On Monday, September 6, 2010 3:38 PM

Evolution, faith and an intellectually satisfied Lutheran
Tonight, while I was reading Darwin's Origin of Species, I came across his discussion about variation in nature. What particularly struck my attention is how there is variation even across the same species: It would never have been expected that the branching of the main nerves close to the great ganglion of an insect would have been variable in the same species...the muscles in the larvae of certain insects are far from uniform (p 54 - Origin of Species) So, this started me thinking on the special ......

Posted On Sunday, September 5, 2010 11:58 PM

Copyright © Jim Lahman | Powered by: GeeksWithBlogs.net