(Ebook - Pdf) Kick Ass Delphi Programming
.pdfOneCombo: TComboBox; Panel1: TPanel; Label1: TLabel; NumRcvrsLabel: TLabel; Bevel1: TBevel; Bevel2: TBevel; Label2: TLabel; StatusLabel: TLabel; StatusTimer: TTimer; MsgGroup: TGroupBox; ChangeOilCB: TCheckBox;
ChangeFiltCB: TCheckBox; RotateCB: TCheckBox;
procedure ExitBtnClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure RefreshTimerTimer(Sender: TObject); procedure StatusTimerTimer(Sender: TObject); procedure SendBtnClick(Sender: TObject); procedure AllRBClick(Sender: TObject); procedure OneRBClick(Sender: TObject);
private
NumReceivers : Integer; procedure RefreshRecipientGroup;
procedure ShowStatus(MsgNum : Integer); public
{ Public declarations } end;
var
SenderMainForm: TSenderMainForm;
implementation
{$R *.DFM}
procedure TSenderMainForm.RefreshRecipientGroup; var
CurrReceivers : Integer; i : Integer;
begin
CurrReceivers := MsgSender1.NumReceivers; if NumReceivers <> CurrReceivers
then begin
NumReceivers := CurrReceivers; NumRcvrsLabel.Caption := IntToStr(NumReceivers); if NumReceivers > 0
then begin
OneRB.Enabled := True;
OneCombo.Items.Clear;
MsgSender1.UpdateReceiverList;
for i := 0 to MsgSender1.ReceiverList.Count - 1 do OneCombo.Items.Add(MsgSender1.ReceiverList[i]); OneCombo.ItemIndex := 0;
OneCombo.Enabled := OneRB.Checked; end
else begin
AllRB.Checked := True;
OneRB.Enabled := False; OneCombo.Text := ''; OneCombo.Enabled := False;
end;
ShowStatus(mdRcvChange);
end;
end;
procedure TSenderMainForm.ShowStatus(MsgNum : Integer); var
Msg : ShortString; begin
case MsgNum of
mdReady : Msg := 'Ready'; mdSuccess : Msg := 'Complete'; mdNoReply : Msg := 'No reply';
mdRcvChange : Msg := 'Number of receivers changed'; else
Msg := 'Unknown status response'; end; { case }
StatusLabel.Caption := Msg;
StatusTimer.Enabled := True; end;
procedure TSenderMainForm.ExitBtnClick(Sender: TObject); begin
Close;
end;
procedure TSenderMainForm.FormCreate(Sender: TObject); begin
NumRcvrsLabel.Caption := IntToStr(MsgSender1.NumReceivers); AllRB.Checked := True;
OneRB.Enabled := False; OneCombo.Enabled := False; ShowStatus(mdReady);
end;
procedure TSenderMainForm.RefreshTimerTimer(Sender: TObject); begin
RefreshRecipientGroup;
end;
procedure TSenderMainForm.StatusTimerTimer(Sender: TObject); begin
StatusTimer.Enabled := False; StatusLabel.Caption := ''; end;
procedure TSenderMainForm.SendBtnClick(Sender: TObject); var
Status : Integer;
RcvrNum : Integer;
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.
A Rude Awakening
I had met the challenge of the day, and although it had been the longest afternoon of my life, I had performed well. I felt good.
“And in conclusion,” I said to the assembled masses, “there isn’t any problem that a combination of persistence and determination can’t overcome. Thank you, ladies and gentlemen, for being here. You’ve been a wonderful audience.”
I stood back from the microphone, ready to accept the inevitable applause. I had no idea what was about to happen.
“Sounds like ‘Spam’ to me,” shouted the greaseball with the chicken in his lap.
“Yea—let’s flame him!” yelled his toothless companion with the billiard ball head.
It was a matter of unfortunate timing that brought four staff members into the room at that moment, prepared to distribute the golden, finger-like sponge cakes bursting with creme filling intended for the residents’ mid-afternoon snack. An instant later those palatable pastries had turned into weapons of wrath, hundreds of them pelting my person.
Out of the corner of my eye, I saw the toothless old geezer heading in my direction, climbing up onto the stage, making his way right up to me, and finally, shoving his wrinkled face so close to mine that our noses touched. Whoever said that bad breath is better than no breath at all was overly optimistic. This guy was, for me, the ultimate argument against growing old.
“Whaddya want with me?” I asked him.
“I just want you to know what it’s gonna be like for you, if you don’t take better care of yourself,” he said, looking me straight in the eye. “Count on it.”
I stared back at his weak brown eyes through lenses as thick as soda bottles. There was something familiar about those eyes. Then it struck me.
“You’re…me!” I shouted.
“In yer dreams, Bud,” he replied. Then he began to laugh....
My eyes snapped open and I sat bolt upright. Beads of sweat poured down my face as I fought to regain my bearings. I had never left. I was sitting in the recliner in my office, the half-full pizza box still sitting on my lap. I got up, wiping the sweat from my forehead on my sleeve. I walked to the sink and doused my face with cold water.
I hate dream sequences, I thought. But it was no use. I was just a two-bit character in an expensive technical book, and I knew it. Perhaps tomorrow would be a better day.
I grabbed a bottle of Purely Poulsbo from the fridge and started to contemplate what had happened. Maybe Helen had been right after all. Perhaps I should take better care of myself. Balanced meals. Vitamin supplements. More
exercise.
I picked up the pizza box and tossed it in the trash bin. I could do better.
This time out, The Author had given me a glimpse at one possible scenario. If that scenario was intended to be someone’s future, I didn’t want it to be mine.
I guess time and cotton briefs are a lot alike—they can slowly creep up on you, and if you don’t do anything about it, you can eventually find yourself in a really tight situation.
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.
dividing, 156 Draw3Vertices(), 182 drawing, 171
drawing order and triangle orientation, 184 DrawPixels(), 183
DrawTriangle(), 184 envelope value, 170 filled mode, 184 fl3, 185
fractal defined, 155 FractureTriangle(), 158, 171 generating, 171
generating a landscape, 155 GLOBAL.PAS example, 160 landcolor(), 185
outline mode, 183 Plasma Routines, 185
plies vs. number of triangles, 163 Plys argument, 171
Project() Routine, 182 rendered mode, 184 shared edges, 156 square array, 162 triangular array, 159 triple data type, 159, 162 Tvertex, 159, 162
A
Active property, 384
Alignment property, 362
Applications
after.src, 200
and Win95 vs. Win 3.1, 388 before.src, 200
calendar example, 325
drag and drop operations. See Drag and Drop. exploring Win95 operations. See WalkStuf.
getting lists of modules and procedures from Win95, 390 making data global. See Data Modules.
messages, 359
playing a Wav file, 349 preventing program execution, 431 resizable windows, 358
resizing forms, 358 setting up themselves, 200 setup program, 200 setup.exe, 200
sharing memory through dlls, 93 single instance, 425
sizing windows, 359
taking advantage of windows API, 211 wm_getminmaxinfo, 359
B
BDE, 333
routines to pack paradox and dbase tables, 333 BeginDrag method, 324, 327
BevelOuter properties, 363
Borland Database Engine, 333. See BDE.
C
Calendar component, 325
relating a position to a date, 325 CD-ROM
badges.wav, 351 \chap1\orpheus, 325 memoedit.exe, 317 paktable.pas, 333 pictedit.exe, 318 starter.dpr, 263
Command line cmdline, 21
cmdline problems, 21 cmdline.pas, 15 optionrec, 20 options, 13 paramcount, 11 params program, 11 paramstr, 11
parsing, 14 processing, 11