I've been using WinCHM (by SoftAny) since v3.5 ... it's now up to v4. It does have the occasional quirk when switching between straight edit and html edit but nothing serious. It might serve your needs.
Peter Trevor
Posts
-
Online help vs. CHM help -
Files in a VB.NET project to put under Version controlCDMTJX wrote:
I think .resx is generated by Visual Studio...
.resx files are resource files. They can potentially contain images, icons, strings, and other data necessary for your program. If .vb is source code then .resx is source ‘non-code’.
-
Files in a VB.NET project to put under Version controljschell wrote:
However one would then also expect that there would be a process step(s) which is specific to building as well. And it should start with a clean extract.Consequently one would not check in source/proj/etc files at the same time as deliverables.
Quite correct, sorry if that wasn’t clear. Overall in SCM (software configuration management) *final* deliverables are under version control but that does not mean that those deliverables are tracked in interim stages. (Depending on the specifics of the SCM plan being used ‘candidate’ final builds may also be version controlled.) As you point out, candidate final deliverables are usually built from a clean extract (and usually on a clean build machine) after the developer has checked in his changes. I wasn’t trying to explain SCM in detail, merely make the OP aware of its existence.
jschell wrote:
Better to figure out what files are actually required. It becomes obvious with a clean extract.
But if you aren’t following an SCM process it is better to err on the side of caution. Especially if (as is the case with the OP) you aren’t sure what you need to track to begin with ... you can always fine tune by dropping items over time as you gain a better understanding. It’s harder to fine tune the other way.
-
Files in a VB.NET project to put under Version controlAs with so many things: it depends. If you are just doing hobby projects (which it sounds like you are) then excluding the output from compiles (the obj and bin folders) is absolutely fine. However, in a professional setting you may sometimes encounter a discipline called “configuration management”. (This is, essentially, management of the whole software lifecycle and integrates “change management”, “repository management”, “release management”, etc, into a coherent whole.) In configuration management it is common to include the final deliverables (*.exe, *.dll, etc) under version control. The reasoning being that the state of the build machine can have an impact on the final deliverable ... add a patch and the compiler might produce something subtly different. It is also common under configuration management best practices to place documentation (program specs, user guides, operations manuals, etc) under version control too. As general advice I’d say, unless you are short of disk space, if in doubt add it in. Better to have an unnecessary file in the repository than to discover after the fact that you’ve lost the specific version of a key file.
-
What would you do?From the replies some people consider it theft. But is it? The first company isn't denied the use of the code simply because the second company has the same (or similar) code. (There is a whole philosophical debate raging on this issue regarding copyright at the moment.) I accept that if a company has invested in some development it feels gives them a competative edge over a rival then it will want to protect that investment. So the question becomes is the second company in this case a rival to the first? If not then where's the harm? And as a practical matter, unless every developer is given an amnesia pill at the end of their employment then they will always be taking some of a company's code with them when they leave. Usually not whole solutions, but code snippets and approaches (in their head at least). And all companies benefit from this when they hire experienced staff. I'm not saying what this person did wasn't wrong. It's not theft in the proper use of the term, but it *may* be harm. Any response should be based on how much. More specifically, if there is harm, or you think there may be harm, then flag this issue up with your line manager. That is your duty and responsibility as an employee.
-
Need help devising interview questions for a juniorFirst, I'd go with spoons: anything you can eat with chopsticks you can eat with a spoon but not the other way round. Second, whatever happened to the spork? Third, ask them about IDisposable ... when and why would you use it. And ask them if you ever need to explicitly call the Dispose method of a winform (and if so, when).
-
Anyone getting tired of todays video games?First there was Space War, Galaga, Crazy Climber, TRON, and Luna Lander. Then there was the original Tomb Raider, original Sim City, original Mech Warrior, and FF7. Hmmm, apart from FF7 it was always the original version of a game that was great, not the later versions. I guess that tends to support the original assertion.
-
C# threading question: Invoke() fails with ObjectDisposedExceptionI'm not sure how to satisfy Luc's issue over mixing sync and async behaviours, but how about this variation:
public void SetProgressValue(int value)
{
MethodInvoker method = delegate
{
if (!formClosed)
{
m_progressBar.Value = value;
}
};if (InvokeRequired) BeginInvoke(method); else method.Invoke();
}
First, you don't need to worry about keeping the delegate's parameters aligned with the method's parameters (makes maintenance easier). Second, you shouldn't test boolean values against true/false (just take their value). Third, it uses the async BeginInvoke when not on the GUI thread.
-
Which Antivirus?Agree about the problem with pre-installed trial software. And another vote for Symantec. It is often berated in these sorts of topics but I’ve used it for years without complaint. I use the full “Internet Security” suite on multiple machines and so far I’ve not had a reason not to like it. YMMV. However, as “someone in computers” I’ve had to do my share of random PC support for relatives, friends, friends of friends, etc. When it comes to computer security I’ve noticed this: Novice users typically don’t update their AV data files. They feel safe because they have AV software. Yes, most AV software will update itself regularly but this can be switched off. (I was once asked to switch off updates to AVG because the user didn’t like to see the notification window popup.) Without regular updates it doesn’t matter which AV software you go with. McAfee seems fine unless/until the user buggers up their subscription. Typically it’s because a newbie user entered their email address wrong or something similar. Thereafter, no more updates. Ever. Novice user sometimes switch off AV software altogether because doing so makes their computer run faster. If not running it doesn’t matter which AV software you go with. Security should be “in depth”. That means regularly applying important O/S patches, using AV software (and using it properly), getting a decent firewall, using something like Spybot S&D to protect the browser, and not opening every damned attachment that gets emailed your way. So I’m always nervous when someone asks which is the best AV. AV is only one piece of the solution, and then only is used right. (Sorry if this is obvious to everyone here, just my rant for the day.)
-
Hierarchical domain object creation not SOLIDI have a project where the data is intended to be hierarchical in nature. The obvious solution seemed to be to create a hierarchical set of domain objects: when you instantiate the root object (with its key) it goes to the database to get its properties and a list of children. It then instantiates a child object for each and maintains them in a collection. As each child object is instantiated the process repeats itself recursively. All well and good. Except it doesn’t follow the principles of SOLID: these domain objects contain data access code. What is the correct design (or design pattern) here? - Do I ignore SOLID in this case? - Have a parallel hierarchy of data access helper objects (one for each domain object)? - Do I keep all the data access code in the object that created the root domain object (ensuring it is thread-safe) and reference it from the domain objects using callbacks? - Encapsulate the data access code in a thread-safe singleton helper? - Is my basic approach flawed? - Something else? (The database hasn’t been designed yet, and the domain objects will need to be able to save changes ... more data access code. These domain objects will be accessed a number of ways including via a treeview in the UI.) Surely this is something that must have come up many times before.
-
Enterprise Library Configuration toolI thought I'd have a play with Enterprise Application Blocks (an add-on for VS2008 from Microsoft). But I'm getting something odd. I installed it (v4.1), added the necessary references to my project, and used the Enterprise Library Configuration tool to set up a simple ExceptionHandler with logging. Then to test it I hard-wired a divide-by-zero error into my application code (inside a try-catch block). Everything compiles okay but when I get to the deliberate error it crashes with a message about not being able to load an assembly due to a mismatch in the manifest. I tried different ways of referencing the DLLs and cleaned the solution but without success. But then I found if I manually edit the app.config (which the Enterprise Library Configuration tool modifies) and remove the version, culture, and public key token from all the 'type' attributes ... it works! (I noticed the supplied QuickStart samples didn't have this in their app.config which is what led me to try the same in my application. Also, an eyeball check of the DLL metadata implied I have the correct versions.) Thing is, every time I go back into the Enterprise Library Configuration tool it adds these bits back in. Am I doing something wrong or is this a bug in the tool? Anyone else have experience of this?
-
Interviewing / candidate qualifying tipsI once interviewed at (and was accepted) a place with an interesting technique. The development manager there felt that the usual technical tests really only measured if you’d read the manual recently. He felt that that was unimportant because when you were working you’d have access to the manual (and Google, etc). What he really wanted to know was how you think. So he posed a simple programming problem ... He started with a 30 second overview of prime numbers (in case you’d forgotten them from high school) and then, on a white board, asked you to write a function that, given ‘n’, would return the first n prime numbers. (Hard coding an array of prime numbers inside the function was not acceptable.) He explained that it didn’t matter if you didn’t get the syntax exactly right, just the overall logic. And he wanted you to explain your thinking as you worked. I watched him run this test on a number of other candidates since and it was surprising how many ‘gurus’ (who know the IDE inside out, know every control and their properties) are unable to complete this simple task! He had a similar task for testing database design skills (requiring designing a few tables). So in your position I would you could try this technique. And back it up with a few technical discussion points too ... I’d like to ask what the candidate understands of the Dispose method. Have they ever implemented IDisposable on one of their classes? And an important trick question: Do you ever need to call the Dispose method of a form? If so when and why, if not why not? (Get that wrong and their code will memory leak.) Too bad you are in the US (according to your profile), I’m a C# winform developer looking for work right now but in Canada. :sigh:
-
Change voteI was reading the comments on an interesting article and clicked the '2' at the bottom to see the next page ... and then realised that actually I'd just rated the article '2' instead. D'oh! How do I undo my vote?
-
Annoying signs...All those signs might indicate the staff’s level of frustration with public idiots. I remember back in my college days I used to work part time at a 24 hour convenience store. We had a self-serve microwave for hot food covered with multiple signs saying “don’t put metal in the microwave.” Despite that, 2 or 3 times every shift .... ZORT! ... “Hey, dude. I think there’s something wrong with your microwave.”
-
Transparent antialias text problemOkay. After playing around with a number of options without luck I decided to try a completely different approach. What I did was to create a second (temporary) bitmap with the same dimensions as the transparent target but with a white background. I then wrote on it in black. Finally I merged this into the transparent bitmap by examing each pixel in my second bitmap and setting the corresponding pixel in the target with RGB set to the target colour and the 'A' byte set to 255 - ((old R + old G + old B) / 3). Surprisingly, this worked and gives me true antialias to transparent. :-D If anyone's interested I've posted the code here [^]
-
Transparent antialias text problemI want to add text to a transparent bitmap (in C# 2.0). The text can be black, white, or red. But it seems that when I use the DrawString method of the Graphics object it antialias the text with black. This works okay when I have white or red text and the transparent bitmap is shown over a mainly black background, but looks crap when I have black or red text and the transparent bitmap is shown over a mainly white background. (White text looks blurred, red text has black bits round edges.) Does anyone know how to antialias to white on a transparent graphic? Or antialias to transparent properly? (I have tried setting the bitmap to white first. Then after the text has been added, floodfilling back to transparent. Sort of works except all the closed loops in letters like o, d, b, p ... etc.)
-
Magical persistenceOkay, I've found the root of the problem. Even though this thread is now old I figure I should post here anyway in case someone gets a similar problem and finds this thread in a Google search. (Don't you just hate googling for a problem and find loads of other people asking the same questions years before and then they stop without telling you what solution they eventually used?) The third party controls I was using were placing data in Isolated Storage. Specifically (on Vista) ...
AppData
/Local
/IsolatedStorage
/(gibberish)
/(gibberish)
/Url.(gibberish)
/StrongName.(gibberish)
/Files
/SyncfusionToolsStateInfo.bin.This file had become corrupted. According to the component authors deleting this file should solve the problem (a new version is recreated). However, in my case my Windows set up had become unstable so I reinstalled the whole of Windows instead. Regardless, Isolated Storage is another place to look when you have these kinds of problems. (I hope this helps somebody, someday.)
-
Magical persistenceAnother piece of the puzzle: whatever is bringing back these dynamic menus (that I no longer create but still appear) is happening after the form's Load method has run and before the first time the form's Activate method is run. (This was determined by stepping through the code and looking at the number of submenus listed in the IDE's "Locals" window on the last line of the Load and the first line of the Activate ... 14 submenus had been added between these two points.)
-
Magical persistenceI can't see anything suspicious in the database. Besides, all access is screened through stored procedures and I never coded for menus to be stored or retreived from the database (just a simple function that returned a list of strings from which the 'magical' menus were built - that code has since been removed). But just to be sure I took the database offline: the 'magical' menus still appear.
-
Magical persistenceNope. I've commented out large swathes of code so that now all that happens is the form's constructor calls InitialiseComponents. I've verified this by stepping through every line in debug. Additionally, while the text of the original menus can be found using the IDE's search function, the text of the 'magical' menus cannot be found.