Hi, I've been putting together a server and client that use a named pipe to communicate (they both run on the same machine). The server creates the pipe and the client connects fine, then the client sends a message to the server which works fine as well (the server can print the message as it...
This problem is really annoying me because as far as I can tell, this is the same code I've used a million times. I have the following code
filename := extractFilePath(application.exeName) + 'log.txt';
assignFile(log, filename);
if fileExists(filename) then
reset(log)
else
rewrite(log)...
Hi, I need to have a form in my application transparent so I did a quick search and came up with the method of setting the brush style to bsClear. This works fine except that if the form is moved then the area the form occupies still shows whatever the form used to be over the top of, which...
Hi, I have this piece of code in the onJoin event of an Indy IRC Client:
procedure TfrmMain.ircJoin(Sender: TObject; AUser: TIdIRCUser; AChannel: TIdIRCChannel);
type
TonJoin = function(AUser: TIdIRCUser; AChannel: TIdIRCChannel):String;
var
Temp:PChar;
LibraryID:THandle...
Hi, I am writing an application that makes use of the Indy tcp server (and client) components. I am using readln on the server to listen for commands from the client but I need the code to go off and check various things every so often if it hasn't recieved a command. I have specified a timeout...
Hi, I'm having problems making a TImage display when it is created at run-time. I've used virtually identical code before and it worked, so there must be something really stupid that I'm missing.
I have a class that contains the TImage in question declared thus (I will use '...' to show that...
Hi, I'm want to write a program (in fact two programs) to do a certain thing, but I have no idea where to start. They need to:
- Program 1 needs to be able to act as a proxy on the local computer (ie, accept traffic from programs using 127.0.0.1 as their proxy server). It needs to forward this...
Hi, I'm having a really wierd problem wiht my GroupBox captions.
If I have code such as the following:
aPhrase := 'Second half';
grpWhatever.caption := Concat('Something - ' , aPhrase , ' ...');
Nothing after the variable shows in the caption, it's just cut off (this also happens using +...
Hi, I'm writing a plugin for a program using Delphi. Two of the parameters one of my functions needs to take are listed as:
char *data, char *parms
And I need to be able to pass data back to the main program in these parameters as well. I've tried various combinations of PChars and arrays of...
Hi, I'm working on a program (actually set of programs) where copies need to send large amounts of data between themselves. I've decided that it'd probably be best to do this via shared memory for various reasons. I want to set it up so I can do this:
App1 and App2
App1 creates a chunk of...
Hi, part of my code has to calculate what percentage two numbers are of the whole (ie both the them). To do this, I used the same calculations which worked in school and worked in Delphi mere hours ago (I basically copied the code over). However, VB's percentages don't add up to 100.
The code...
Hi, I have a DLL written in Delphi that I want to call from a VB program. It gives me errors no matter what I try, so I think I need to tell the function in the DLL to use a different calling convention, does anyone know which one I can use? Here is what Delphi says about the ones I have...
Hi, just wondering if anyone else had come across this, as I have no idea how to sort it out.
When I want to select either of the side resizing boxes of a component (and only the sides, the top/bottom ones are fine and doing anything else is fine), it selects it ok, but the side of the...
Hi, I'm coding a quick example of a program for someone and part of what I want it to do requires that it passes a large amount of text to a function in a dll. I guess that creating an area in memory, sticking the text in there and then passing a pointer to it to the dll function would be the...
Hi, I have a problem where a TAnimate component refuses to open an AVI from a .dll file I compiled.
My resource file is written as:
100 AVI "[Flename]"
It compiles correctly (or I'm guessing it does as the filesize is correct).
Then I use Delphi to compile it into a .dll with the...
Hi, basically I want to store some AVI files in a DLL or dat file (I know how to do that except for what type of resource to call them) and then display them on one of my forms (only one of them at any time).
At the moment my program just opens the file with a system call because I have the...
Hi, I have two array constants defined as:
FULL : Array[1..5] of boolean = (True,True,True,True,True);
NONE : Array[1..5] of boolean = (False,False,False,False,False);
and an array defined as:
Status:Array[1..5] of Boolean;
If I try to compare them with a line such as the one below:
If...
Hi, I'm posting this for a mate because his account is having problems right now. I only gave it a quick read-through so if there's anything missing please let me know. And with no further ado, onto his question:
--------------------------------------
hi, i need some help in spliting up a...
Hi, I'm currently using the following code to find and close a window:
Handle := FindWindow(nil,'Window name here');
ShowWindow(Handle,SW_CLOSE);
However, I need to know if the window was there, or if the closing was done on something that didn't exist so I can use this information...
I have the following piece of code :
for ($i = 1; $i == $slashcount; $i++) {
$extrapath .= "..f";
echo $extrapath.'<br>'.$i.'<br>';
}
the loop will only execute once when $slashcount starts equal to $i. Any other value (smaller or larger) and the loop doesn't even execute...
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.