--------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100004 Date: 02/27/97 From: MARTIN PELLETIER Time: 09:08pm \/To: ALL (Read 1 times) Subj: How to implement OpenEventLog & ReadEven21:08:0002/27/97 Does someone know how to implement the OpenEventLog & the ReadEventLog in Delphi? I want to be able to open and read an event log from Windows NT Server. Martin Pelletier --- PCBoard (R) v15.3/5 * Origin: SOLAR -+- Sherbrooke,QC -+- 819-564-3198 (1:167/1103) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100005 Date: 02/27/97 From: CHRISTOPHER DI ARMANI Time: 12:48pm \/To: LARS SKOVLUND (Read 1 times) Subj: Internet control pack 04 Mar 97 22:15, Lars Skovlund wrote to Don Krause: MM> SB>>> With the internet components in Delphi 2 and higher, MM> SB>>> you shouldn't even need a browser. MM>>> Does Delphi 2.0 Desktop also come with these compononts? I MM>>> can't find any internet component in my component palet. :( DK>> It comes with either Developer or C/S. LS> Huh? It did not come with my Developer version.... LS> Lars Hi Lars... I just bought Developer a month ago and it didn't have it either. What I got when I purchased was version 2.0. You have to call Borland and order the version 2.01 upgrade. It comes with all the internet stuff, 2.0 did not. Sounds like you got the same thing I did. The easiest way to tell is to look at your cdrom. If the "Version 2" is on the left, you've got 2.0, if it's on the right, you've got 2.01. Take Care Of You. Christopher The only way to discover the limits of the possible is to go beyond them into the impossible. --- GoldED 2.42.G0214 * Origin: (1:153/840) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100006 Date: 02/27/97 From: EGOR SAMARKHANOV Time: 07:08pm \/To: ALL (Read 1 times) Subj: Books Ĵ All ! Who can tell me some good books about DELPHI  Egor Samarkhanov  * Origin: ⮩ ᮬ 2.50 (2:5030/425) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100007 Date: 02/27/97 From: BRYAN SMITH Time: 02:30pm \/To: RYAN POTTS (Read 1 times) Subj: An unusual problem.... On 27 Feb 97 Ryan Potts said to Tommy Usher RP> I have. Tends to only come up if you terminate your program in an RP> 'unorderly fashion'. Can anyone cast any light on the more general topic of "ghosts" of Windows programs. I have noticed that, for example, sometimes I shut down Netscape. It's gone, Alt-Tab can't find it. But then perhaps five minutes later, up pops a message box saying that Netscape created a GPF. What Netscape ? Sounds to me that this "Ghost of Netscape" is related to the ghost of your "unorderly-terminated" program. --- PPoint 2.00 * Origin: Kingston, Canada (1:249/109.11) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100008 Date: 02/28/97 From: JUD MCCRANIE Time: 08:23pm \/To: FRANCOIS PIETTE (Read 1 times) Subj: RE: WINCRT On 26 Feb 97 06:18pm, Francois Piette wrote to Don Krause: FP> WinCrt is not needed with D2 because D2 use the native console mode FP> which is built in every Win32 system. Just compile your D2 application FP> by enabling the linker option 'generate a console app' and suddenly FP> all your writeln and readln procedure are working fine in a text FP> window. As far as I can tell, though, console mode only scrolls like a teletype. That is, you can't change the text or background colors, you can't clear the screen, you can't GOTOxy to a particular location on the screen, etc. If you can do these things in D2 then pleas elet me know how. Jud McCranie jud.mccranie@camcat.com * Silver Xpress V4.3 SW20178 --- PCBoard (R) v15.22/M 5 * Origin: Riverdale, Ga (1:133/9024) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100009 Date: 02/28/97 From: TOMMY USHER Time: 12:39pm \/To: LARS SKOVLUND (Read 1 times) Subj: Contect Sensitive Help LS> DK> It comes with either Developer or C/S. LS>Huh? It did not come with my Developer version.... You need to contact Borland for the upgrade. --- QMPro 1.52 I think I'll go program another Windows clone. * Origin: FidoNet GC-BBS! 614-871-0613 (1:226/810) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100010 Date: 02/28/97 From: TOMMY USHER Time: 12:39pm \/To: RYAN POTTS (Read 1 times) Subj: An unusual problem.... RP> TU> Has anyone else noticed this? RP>I have. Tends to only come up if you terminate your program in an 'unorderl RP>fashion'. I thought about that, but it seems to occur, even when I exit properly. --- QMPro 1.52 The louder the insults, the weaker the argument! * Origin: FidoNet GC-BBS! 614-871-0613 (1:226/810) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100011 Date: 02/28/97 From: TOMMY USHER Time: 12:39pm \/To: MATHEAS MANSSEN (Read 1 times) Subj: Contect Sensitive Help MM>maandag 24 februari 1997, Steve Batson writes to Matheas Manssen: MM> SB> They came as an update that you could order from borland for $10 MM>I have a campus license, and I'm afraid I can't get this update from Borland MM>Is it perhaps also available from their website? Hmmm, can you afford an educational package? I know here, it is fairly inexpensive for students to buy their own copy. --- QMPro 1.52 All I ask is proof that money can't make me happy. * Origin: FidoNet GC-BBS! 614-871-0613 (1:226/810) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100012 Date: 02/27/97 From: FRANCOIS PIETTE Time: 09:19pm \/To: LOUIS RIZZUTO (Read 1 times) Subj: Re: Typecast Salut Louis Rizzuto ! Dans un message de Louis Rizzuto dat du 24 Feb 97 12:11:23 il tait dit: LR> procedure TForm1.ListBox1DblClick(Sender : TObject); LR> begin LR> if Sender is TListBox then LR> Shape1.Shape := TShapeType(TListBox(Sender).ItemIndex) LR> end; LR> This is an example of a typecast within a typecast - LR> neither of which the author explains is getting a RTTI. LR> But what does "TListBox(Sender).ItemIndex" do - specifically. It tells the compiler to consider the Sender value as TListBox object reference despite is is declared as a TObject object reference. Remember an object reference (a variable of some object type) is just a pointer to the memory block containing the object. Once the compiler knows that Sender (the pointer) has to be considered to be a TListBox (hence a pointer to a memory location containing a TListBox object instance), it can access the member variable ItemIndex wich is of type integer. It does by adding an offset to the pointer and fetching the integer value there. LR> And what does "TShapeType(TlistBox(Sender).ItemIndex)" do? You have to consider the first typecast (the insider) wich enable the access to the value (an integer) of the member variable ItemIndex. It is so equivalent to: var Index : Integer; Index := TListBox(Sender).ItemIndex; Shape1.Shape := TShapeType(Index); Having explained the first typecast, i'll explain the second one. This takes an integer (the Index) and tells the compiler to consider it as an item from the enumerated type TShapeType. This works because an enumerated type is just an integer number (I should say an ordinal type) with a name for each value. TShapeType is defined as follow: TShapeType = (stRectangle, stSquare, stRoundRect, stRoundSquare, stEllipse, stCircle); It means that stRectangle is just a name given to the constant 0 and stSquare is just a name for the constant 1, and so on... In other words, Ord(stRectangle) is 0, Ord(stSquare) is 1,... LR> Also, given I did understand that, LR> what happens if "Sender" is NOT TListBox ? LR> An exceptions is generated, right? No. No exception is generated. The IF line prevent it: if Sender is TListBox then .... If sender is not actually a reference to a TListBox, the 'then' clause is not executed at all. If you remove the if..then, then you'll have an exception (probably) because the pointer behind Sender will point to something wich has no ItemIndex property (wich is seen by the compiler just as an offset). LR> so where is the code to show proper LR> handling of that exception?It is like the author is saying, 'Oh, don't LR> be concerned by that, it will never happen. He is right because of the if..then wich prevent the exception to be generated. LR> Sender will always be of LR> type TListBox and "if Sender is TListBox will always be "true". It will be true is Sender is really an instance of TListBox. If it is not, 'Sender is TListBox' gives a FALSE value. LR> What exactly is producing the result of 'true' in this if statement? Every object is a descendend of TObject. TObject has a method returning the actual class name. This is what is behind the curtain. Modify the event handler to be: procedure TForm1.ListBox1DblClick(Sender: TObject); begin if Sender is TListBox then Shape1.Shape := TShapeType(TListBox(Sender).ItemIndex); Label1.Caption := Sender.ClassName; end; Add a TLabel and a TButton to your test form. Assign the same handler for the button's OnClick event as the TListBox OnDblClick event. So this (above) handler will be called when you double-click in the list box or you single-click the button. You'll see that no exception will be generated and that the class name TButton or TListBox will appears on the label's caption. ClassName is a 'class' method. Wich means you can call it with not only with an object reference like in Sender.ClassName, but also with a class reference like in TEdit.ClassName. Add one more line to your DblClick handler and seen what happens: Label2.Caption := TEdit.ClassName; Behind the is Sender is TListBox then... there is the following code: if Sender.ClassName = TLIstBox.ClassName then ... May be my explanations will open your eyes... LR> How does one know, for instance, what type 'Shape1.Shape" is. Look in the on-line help for TShape. Then look for his Shape property. Then look for the TShapeType. Amitis, {-Francois Piette-} francois.piette@ping.be http://www.rtfm.be/fpiette --- SvFido 1.32 * Origin: OverByte BBS (Embourg-Belgium) 32-4-3651395 VFC/V34+ (2:293/2202) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: E3100013 Date: 02/28/97 From: GARY WEINFURTHER Time: 07:20am \/To: MARTIN MAAT (Read 1 times) Subj: SendKeys equivalent Martin Maat mentioned this to All: MM> How do I send keys to other windows in the system, like I could in VB with MM> the SendKeys statement? I tried to send WM_KEYDOWN messages to no avail, MM> the target window seems to ignore them. Send WM_CHAR messages. ...Gary --- GoldED 2.41 * Origin: The Flying Circus BBS, Farmington Hills, MI, USA. (1:2410/905)