IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► eMag   Print This    All Groups  
View Group Edition:
Full Edition Your Edition || Prev Next || Subscription Center

Prestwood IT Newsletter Jan 2010 Issue - Delphi Edition

Subscribe!

Start subscribing now! It's free!

Each month on or after the 1st, and only once a month, we will send you content from up to 5 community groups. If you select this Delphi group, you'll receive the following content below mixed in with the other groups you elect to include.

Prestwood eMag
Our monthly opt-in coupons+newsletter.
portal.prestwood.com
  January 2010 - Delphi Edition (762 of 4,803 subscribers receive this group's content.) Year 12 Issue 1  
Your full service technology partner!


Expert guidance from working professionals!
Bryan Valencia
SQL Servers topic:
Geolocation: Step by Step
by Bryan Valencia

Think globally, act locally.  How many times have you needed to determine the geographic distance between two places?  This tutorial will show you how to accomplish just that.

All data and functions exist in a SQL Server Database, and can be used in VB.NET, C#.NET, Paradox, Delphi, or any other language that can call a database function.

General, Getting Started, etc. topic (classic post):
The Five Biggest API Documentation Mistakes and How to Avoid Them
by Peter Gruenbaum

Good API documentation can have a tremendous impact on whether a software platform is adopted. However, too often API documentation ends up being confusing and hard to follow, which results in developers choosing another way to accomplish their goals. This article describes five common mistakes that are made in creating API documentation and describes solutions to avoiding those mistakes. Following good API documentation practices can provide developers with the content that they need to be able to take full advantage of a software platform's capabilities. 


IT Water-Cooler for Power-Users topic:
Stamp Out Spam
by Vicki Nelson

How to fight back against spam and reclaim your inbox. As you may know, the volume of spam messages sent across the Internet has reached epidemic levels. Some industry experts estimate that three out of every five e-mail messages that are sent today are spam. The spam epidemic is costing companies, professionals, and individual users considerable amounts of time, money, and resources.

What is spam, and what can I do about it? Spam is generally defined as an unsolicited mailing, usually sent to many recipients. Most spam is commercial advertising, often for dubious products, get-rich-quick schemes, or quasi-legal services. Spam costs the sender very little to send. Most of the costs are paid by the recipient or the carriers rather than the sender. Some effective methods for preventing your e-mail address from being captured, sold or abused by spammers in the full version of this article. Click the title to read more.






 Delphi Group Top 
Visit Group | My Group Settings
Delphi for Win32 topic (classic post):
Using the BDSWebExample with SQL Server 2005
by Joshua Delahunty
Changes to be made when setting up the BDS Web Example for Delphi 2006 and SQL Server 2005

Coding Tasks topic (classic post):
Delphi Best Practices I - Handling TForm.OnCloseQuery
by Wes Peterson

In this first installment of a New Knowledge Base Series I'll discuss The TForm.OnCloseQuery Event which too frequently goes unhandled.


 Monthly Delphi Lesson
Language Details Topic:
Code Snippet of the Month

Delphi is a hybrid language so you can create either class methods (functions and procedures) or you can create global functions and procedures. When a function or procedure is part of a class, it is a class method.

[function/procedure] RoutineName : ReturnType;

As with C++, your custom routine must come before it's first usage or you have to prototype it in the Interface section.

Note: Contrast Delphi with Delphi Prism which is an OOP language (everything is within a class). Both Delphi and Delphi Prism are based on Object Pascal but implement OOP features differently and have some syntax differences too.

procedure SayHello(pName: String);

begin
  ShowMessage('Hello ' + pName);
end;
 
function Add(p1, p2 : Double): Double;

begin
  Result := p1 + p2;
end;
Using Controls Topic:
FAQ of the Month: Using Delphi's TColorGrid
Question: How do you specify which color to use with TColorGrid from the samples page? Why isn't it documented?

Answer:

Use the public methods ForegroundColor and BackgroundColor. For example, in the OnChange event of a ColorGrid component you could do the following:

procedure TForm1.ColorGrid1Change(Sender: TObject); 
begin
   Edit1.Font.Color := ColorGrid1.ForegroundColor;
   Edit1.Color := ColorGrid1.BackgroundColor;
end;

None of the components on the "Samples" page are documented.

Language Basics Topic:
Tip of the Month

Format the IF/Endif for easy reading. I have found this to be easy to read and follow:

if (         (something = somethingelse)
      and (x = y)
      and (z = a)
   ) then
begin
..
end;

To indent the structure and line up the parenthesis makes it, I feel, much easier to read.



Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2021 Prestwood IT Solutions.   [Security & Privacy]