I have had this problem recently but never figured it out, I cheated and used FormKeyDown instead, for some reason this worked a lot better but not sure it this is relevant in your case.
Also may sound stupid but in some cases it helps to restart windows as working with this kind of process can...
ok, say for example that I want to let everyone copy files to the share as long as they are less than 1GB, how can I do this? deleting the >1GB file after the copy is not much good to me as that is what I am currently having to do.
I am setting NTFS permissions through my app for other reasons...
Hi all, does anyone know of a way to see and stop a file transfer that is happening?
My scenario...
have an NT4/5 Server which has a shared drive, my app would be running on the server, have a client machine which copies a file to the shared drive on the server (accros the lan), file being...
Hello, the following should work fine, you will need to set KeyPreview := true in order to capture the keys properly in the first place.
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
//press down shift key...
if key = vk_up then...
The following code seems to be directly relevant to the problem you are having but you will need to take the bits you need from it and change some of the names to match your components as I'm not sure which part actually fixes the prob! but here you go...
procedure...
OH I'M SO STUPID! got so involved in how to make the code faster that I mist something very important, I am dealing with text files currently on a network mapped drive which would explain the slower speed huh? oh i'm so dum sometimes ;-)
The app will eventually work locally so should eliminate...
It takes way too long to LoadFromFile into TStringlist and then SaveToFile (this is how i originally started until I started growing grey hairs waiting for it to finish ;) also the files may grow larger than 10MB in some instances so I need it to be as fast as poss.
Maybe it's just the s**t...
unfortunatly I cannot as only part of the file needs to be copied (not the beggining), content always changes so as does the position to start copying from, I do not need S though as the copy can run right to the end of the source file. Hope that makes more sense.
Regards,
JW
Sorry to bother you all again but I am curious to know if any one can find a faster/more efficient way of running this very short piece of code...
Reads from source Textfile and Writes to dest Textfile. Don't want to do a raw file copy as only part of the text file needs to be copied...
I use something like this
label1.caption := 'C:\WINNT\welcome.exe';
winexec(pchar(label1.caption), sw_show);
Can also be done with just one line...
winexec('C:\WINNT\welcome.exe', sw_show);
But I find it more usefull to be able to change which file is run at run time.
Hope that helps,
JW.
ok, I found the problem, there was a third difference in my code, I was using SeekEof instead of Eof to test for end of file, for some reason it worked but removed all the blank lines. Found SeekEof in Help under text file routines, now I know! thanks so much.
Justin Willis.
Hi, thanks for that, i think the only difference is i am adding the string to a TRichedit instead of a TStringgrid, also am using a repeat until loop instead of while loop, I must have mest up somewhere else in a strange way, will have to do some more debugging, if it still won't play ball then...
Hi, I am currently trying to read from a text file using ReadLn(TF, S); but if there is a blank line in the text file then ReadLn seems to automatically move onto the next line that has something on it instead of reporting S as being empty (length of 0), can some one help? I need to know when...
Agreed, if encryption is the only thing stopping you from using the registry or an external ini file there are some free encryption components that do this job brilliantly.
may be wrong but you might want to use something like
MyAppini := TIniFile.Create(ExtractFilePath(Paramstr(0)) + '\' + ExtractFileName(Application.ExeName));
Otherwise I think the ini file would be saved in whatever the current path may be which may not be local to where the EXE is running...
Thanks Porteiro, I will try that now, Abbas thanks for your help also, btw I had to change the message to EM_LIMITTEXT with Delphi 5 Pro, (still didn't work though but worth a try huh).
Hi Abbas, thanks for your response, Delphi spits EM_EXLIMITTEXT back at me so I will try to get it working.
To see what i'm going on about try the following...
1. have a form with 2 TRichedits say Data1 and Data2 (doesn't make a difference whether plaintext or not unfortunalty)
2. at design...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.