Set "Default GateWay" section as Ip address of your firewall in the Tcp/Ip configuration, if the IP address of your laptop is not given by DHCP server. Try it, good luck....
Hi,
I think that you are using function SHFileOperation incorrectly. What I want to emphisize is, you must put two "chr($0)" in the end of the parameter "pFrom", try this:
function OperateFileDelete(aFrom:String):Boolean;
var
s:TShFileOpStruct;
fb:Array [0..256] of char...
Hi,
In fact, the length of information that you will receive doesn't matter. Whether the Readfile function will keep waiting or not depends on the timeout parameters which you set to the port when it was opened.
...
with CommTimeOuts do
begin
ReadIntervalTimeOut:=MAXDWORD...
I did it in this way:
At first define a constant like this:
Const
sCrLf=Chr($0d)+Chr($0a);
then you can use it in your label's caption:
Label1.Caption:='Hi how are you today ?'+sCrlf
+'Well fine thank you .'+sCrlf+
+'And you ?';
Hope helps.
Try this example out:
You should program the event "onKeyDown" of your DbGrid:
procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key=vk_Return then
begin
with DbGrid1 do
begin
if SelectedField.FieldNo=1 then...
Better you use char-array instead of String.
var
...
Output:Array [1..255] of char;
Buffer:PChar;
...
begin
Buffer:=@Output;
...
{do something which copy the datas you want to send
into the memory range begin with Buffer}
...
if (not WriteFile (PortHandle, Buffer[0]...
About 4:
Do you want to compress files into or decompress files from a file? Use 3rd Vcl component such as Abbrevia, it is esay to use. Just goto Gogole search it.
Agree with the upstair comments.
Just to Create a New Application use template "Thread", this will be useful.
Attention: if you want to call a VCL function such as "Label1.Caption:='Hello, guys'" within you Thread function scope, you must do it in this way:
procedrue...
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.