--------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300002 Date: 10/30/97 From: ALESSANDRO ANTONINI Time: 10:21pm \/To: BRYAN SMITH (Read 0 times) Subj: Copying files via network Hello Bryan! 25 Oct 97, 12:31, Bryan Smith wrote to Alessandro Antonini: AA>> CopyFile(Pchar(Source),Pchar(Dest),True); // or false if you AA>> // want dest to be overwitten if exists already > Do you know if that works in Delphi 2/3 if Dest is 'LPT1' or 'LPT1:' ? Not excluded it does ( never tried so i could not tell ), but anyway i elieve it would be better to use AssignPrn and so on. C U! Alessandro Antonini - p0010838@www.leonet.it --- GEcho/32 1.20/Pro * Origin: Home Page: www.geocities.com/CapeCanaveral/Lab/1131/ 2:332/617.43) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300003 Date: 10/30/97 From: ALESSANDRO ANTONINI Time: 10:46pm \/To: BART BROERSMA (Read 0 times) Subj: ASM in D2 Hello Bart! 25 Oct 97, 05:04, Bart Broersma wrote to All: > Function UpString(S:String):String; Assembler; Doesn't your Delphi already have an Uppercase function? Mine has. > Asm > les di,@Result {put address of returned string in es:di} > .... ^^^^^^^^ wil give me a compile error: operandsize does not > match (or soemthing like that...) > .... > .... > end; The point is that you are using DI as the function result ( don't forget anyway that LES should be avoided in PM even if it's a Dos APP - e.g. MOV EDI,@Result). That worked with 16 both TP/D1 programs that supported strings having the 1st byte as string length. D2 and D3, since they like null-terminated dynamically allocated long strings more instead, expect the function result to be returned as a pointer from EAX (e.g. MOV @Result, EAX). Think of something like referencing arrays in C. On the other hand, Delphi32 produces very efficient and optimized code even using plain Pascal statements (it's even faster than C, when using smart and rationally planned algorithms). I think that using the "brute force" as we were doing in TP could help somewhat, but it isn't strictly necessary any longer. As a rough example i don't see a great speed difference between these two routines (they do the same thing) of a program of mine, while i saw when they where 16 bit TP. Procedure PutLabel(p: LongInt); Var i : LongInt; Begin If IsPass1 Then Begin For i:=0 To Labelp Do If p=Labels[i] Then Exit; Inc(labelp); Labels[labelp] := p; End; End; Procedure PutLabel(p: LongInt); StdCall; Assembler; Asm mov ecx,dword ptr [p] cmp dword ptr [IsPass1],1 jne @NotEq xor edx,edx mov eax,offset Labels jmp @Comp @Start: cmp ecx,dword ptr [eax] je @NotEq @IncVa: inc edx add eax,4 @Comp: cmp edx,dword ptr [Labelp] jb @Start mov eax,dword ptr [Labelp] mov dword ptr [Labels+4*eax], ecx inc dword ptr [Labelp] @NotEq: End; C U! Alessandro Antonini - p0010838@www.leonet.it --- GEcho/32 1.20/Pro * Origin: Home Page: www.geocities.com/CapeCanaveral/Lab/1131/ 2:332/617.43) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300004 Date: 10/30/97 From: GARY WEINFURTHER Time: 08:46am \/To: RUDI RAES (Read 0 times) Subj: F1Book1 Component in Delphi3 Rudi Raes mentioned this to All: RR> It is possible to open an ascii-table in the F1Book1 component. Sorry, I am unfamiliar with that component. ...Gary --- GoldED 2.41 * Origin: The Flying Circus BBS, Farmington Hills, MI, USA. (1:2410/905) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300005 Date: 10/31/97 From: JOAQUIM HOMRIGHAUSEN Time: 11:07am \/To: HENRIK WAHLBERG (Read 0 times) Subj: Removing a window's title bar (Delphi 1.11:07:5810/31/97 * On Sun 26 Oct 1997 16.40, wrote: HW> It's costomary (?) for toplevel windows to have a HW> border/caption. Under which circumstances or why do yoy want to HW> change that? It's for a program that will be loaded _and_ visible most of the time, I want to make it occupy as little space on the desktop as possible. For those with large desktops, it may not make much of a difference, but I've seen other programs do this under W31, W95, WNT, and OS/2 - and I want to allow the user to do it with my program too :-) %JoHo% joho@defsol.se --- * Origin: Definite Solutions ~/Stockholm, Sweden (2:201/330.3) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300006 Date: 10/31/97 From: JOAQUIM HOMRIGHAUSEN Time: 11:10am \/To: MARTIN MAAT (Read 0 times) Subj: Removing a window's title bar (Delphi 1.11:10:4610/31/97 * On Mon 27 Oct 1997 09.20, wrote: JH>> Is there a way (in Delphi) to remove a window's title bar? MM> You need to override the CreateParams method: There's *got* to be an easier way (IMHO). Removing/hiding the titlebar is (IMHO) perfectly legal, and it does work if I simply remove all bordericons, etc. - but then I get a horrible "flash" effect when the window is redrawn. MM> You're not writing a Fido mailer for Windows by any chance, are MM> you? This particular program isn't one - but.. one never knows :-) %JoHo% joho@defsol.se --- * Origin: Definite Solutions ~/Stockholm, Sweden (2:201/330.3) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300007 Date: 10/31/97 From: JOAQUIM HOMRIGHAUSEN Time: 11:12am \/To: GARY WEINFURTHER (Read 0 times) Subj: Icons (Delphi 1.x) * On Tue 28 Oct 1997 12.42, wrote: GW>>> The minimized icon is Application.Icon. JH>> Indeed - but I'm primarily having problems with MDIchild JH>> windows. GW> Well, why didn't you say so? Sorry. GW> I assume you've already tried TForm.Icon then. If that doesn't do GW> what you want, then perhaps some other expert here can assist. I've gotten it to work now, but the only way I can get it to be "updated" is to fiddle with the borderstyle/bordericons - which has a nasty side effect: the entire window "flashes" when it's updated (only once of course, but it looks ugly). %JoHo% joho@defsol.se --- * Origin: Definite Solutions ~/Stockholm, Sweden (2:201/330.3) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300008 Date: 10/31/97 From: JOAQUIM HOMRIGHAUSEN Time: 11:13am \/To: GARY WEINFURTHER (Read 0 times) Subj: Removing a window's title bar (Delphi 1.11:13:5610/31/97 * On Tue 28 Oct 1997 12.48, wrote: GW> MDI children windows are very odd creatures and must conform to GW> a lot of Microsoft-defined restrictions. There's a lot they GW> can't do. For example, you can't hide one and you can't create GW> one without showing it. I would suggest, for your own sanity, GW> that you work with them as-is. First off, I've lost my sanity a long time ago - so I'm not too worried about that particular issue :-) Second.. I'm not doing anything with the MDI children, it's with the parent I'm trying to do something (hide the title bar).. which is why I can't understand how this affects an MDI child window :-( %JoHo% joho@defsol.se --- * Origin: Definite Solutions ~/Stockholm, Sweden (2:201/330.3) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300009 Date: 10/31/97 From: JOAQUIM HOMRIGHAUSEN Time: 11:15am \/To: CHRISTOPHER DI ARMANI (Read 0 times) Subj: Icons (Delphi 1.x) * On Fri 24 Oct 1997 09.13, wrote: JH>> What is the correct procedure for setting/changing the icon of JH>> a window? No matter what I try, Delphi refuses to update the JH>> icon or show the correct icon when the window is minimized. CdA> I ran into this same problem some time ago, and I finally CdA> discovered that if I have assigned an icon to the Project, as CdA> well as an icon to an individual Form, the Form icon always CdA> gets used when mimimizing the app. When the Form icon was CdA> removed, the icon displays as I watned. Hope that helps... Thanks - but the problem is that I need to change the icon dynamically to show the state of the MDI child window. This is in particular important when they are minimized. %JoHo% joho@defsol.se --- * Origin: Definite Solutions ~/Stockholm, Sweden (2:201/330.3) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300010 Date: 10/31/97 From: JOAQUIM HOMRIGHAUSEN Time: 11:17am \/To: MARTIN MAAT (Read 0 times) Subj: Icons (Delphi 1.x) * On Wed 29 Oct 1997 10.13, wrote: MM> It looks like you intend to create an MDI application holding MM> different types of child windows. Been there, done that. MM> shouldn't have. No - all I want to do is: 1. Have an MDI parent 2. Have none or more MDI children of that parent 3. Be able to toggle the parent's titlebar on/off 4. Be able to dynamically change the icon of the MDI children (to indicate a specific state) That's all - it doesn't sound like too much to me, but for some reason, I can't get it to work properly or without ugly side effects. %JoHo% joho@defsol.se --- * Origin: Definite Solutions ~/Stockholm, Sweden (2:201/330.3) --------------- FIDO MESSAGE AREA==> TOPIC: 269 DELPHI Ref: EF300011 Date: 10/31/97 From: JOAQUIM HOMRIGHAUSEN Time: 12:20pm \/To: ALL (Read 0 times) Subj: Icons (Delphi 1.x) JH> No - all I want to do is: JH> 1. Have an MDI parent JH> 2. Have none or more MDI children of that parent JH> 3. Be able to toggle the parent's titlebar on/off JH> 4. Be able to dynamically change the icon of the MDI children JH> (to indicate a specific state) OK - after a lot of testing, the following works: To toggle the border of the (parent) window: {-Determine if border is On or Off - works even if we have active/displayed MDI children} PROCEDURE TMainForm.SetupBorder(IsOn :BOOLEAN); VAR LongVal :LONGINT; UpdateRect :TRect; BEGIN LongVal:=GetWindowLong(Handle, GWL_STYLE); if (not IsOn) then LongVal:=LongVal and not ws_Caption ELSE LongVal:=LongVal or ws_Caption; SetWindowLong(Handle, GWL_STYLE, LongVal); GetWindowRect(Handle, UpdateRect); LongVal:=GetSystemMetrics(SM_cyCaption); if (not IsOn) then MoveWindow(Handle, UpdateRect.Left, UpdateRect.Top+LongVal, Width, Height-LongVal, TRUE) ELSE MoveWindow(Handle, UpdateRect.Left, UpdateRect.Top-LongVal, Width, Height+LongVal, TRUE); END; To change the icon of the MDI child: PROCEDURE MDIchildWindow.ToggleIcon(IsFirstIcon :BOOLEAN); VAR MDIicon :TIcon; BEGIN if (IsFirstIcon) then BEGIN BorderIcons:=[]; Caption:='Now using First icon'; MDIicon:=TIcon.Create; MDIicon.Handle:=LoadIcon(HInstance, 'Icon1'); Icon:=MDIicon; MDIicon.Free; BorderIcons:=[biSystemMenu, biMinimize]; END ELSE BEGIN BorderIcons:=[]; Caption:='Now using Second icon'; MDIicon:=TIcon.Create; MDIicon.Handle:=LoadIcon(HInstance, 'Icon2'); Icon:=MDIicon; MDIicon.Free; BorderIcons:=[biSystemMenu, biMinimize]; END; END; This has the "nasty" side effect of flashing the currently active MDI child window, but at least it works and nothing seems to barf on it. It appears that all MDI child windows are "visited", but I'm not sure about that. Either way, I'll use this until someone gives me a better suggestion :-) Thanks to everyone who offered their opinions/assistance! %JoHo% joho@defsol.se --- * Origin: Definite Solutions ~/Stockholm, Sweden (2:201/330.3)