Well, for a brief moment, it seems I can come out from underneath the
rock mountain that was placed atop my head. The more I use them, the more I like the
code templates that are part of
BDS® 2006. They can be a great savings when it comes to those repetetive
'code blocks'. Not only is the
'code block' inserted, but you can also have some dynamic content in them as well with the help of good the good ole' SyncEdit.
Generally, when I code a processing procedure/function I prefer to change the cursor to signify that something is 'happening' to the user. I often use the following code:
var
myCursor: TCursor;
begin
myCursor:= Screen.Cursor;
Screen.Cursor:= crHourglass;
try
finally
Screen.Cursor:= myCursor;
end;
end;
This code is simple enough, however it becomes easier with a good old
'scr' template. As you can see creating templates is rather simple and a great time saver.
Labels: Code, Delphi