Delphi Pages Forums  

Go Back   Delphi Pages Forums > Search Forums

Lost Password?

Showing results 1 to 50 of 500
Search took 0.14 seconds.
Search: Posts Made By: paulholden
Forum: General 05-22-2008, 12:12 PM
Replies: 4
Views: 11,793
Posted By paulholden
RE: How do I get the length of a dynamic array?

ArrayLen := High(MyArray);
That should get you the length of your array.

Hope that helps, please 'Accept as Answer' it if does :^D
Forum: General 05-22-2008, 12:09 PM
Replies: 6
Views: 1,688
Posted By paulholden
RE: How can I make an Other Form as the Mainform

You can set which forms are created at startup by selecting Project -> Options from the main menu.

Select the Forms tab -- here you can define the applications main form and any forms that should...
Forum: General 05-22-2008, 12:07 PM
Replies: 2
Views: 990
Posted By paulholden
RE: i need some ideas running external dos exe

For running a program and waiting until it finishes, see the following post: http://www.delphipages.com/threads/thread.cfm?ID=181632&G=181629

If you want to run a DOS program and capture the...
Forum: General 03-12-2008, 04:58 AM
Replies: 1
Views: 1,621
Posted By paulholden
RE: Image Editor Source Code

Hi,

See my response (http://www.delphipages.com/threads/thread.cfm?ID=193602&G=193494) to your previous post regarding selecting an area of an image.

Once you've selected an area, you can get...
Forum: General 03-12-2008, 04:54 AM
Replies: 1
Views: 1,020
Posted By paulholden
RE: Implemeting Image Selection ?

Hi,

I asked this same question some years ago and received the following answer which worked great:

http://www.delphipages.com/threads/thread.cfm?ID=103394&G=103326

Hope that helps, please...
Forum: General 02-12-2008, 10:10 AM
Replies: 3
Views: 4,333
Posted By paulholden
RE: Command Prompt

Hi,

See my previous post regarding grabbing the output from a command prompt:

http://www.delphipages.com/threads/thread.cfm?ID=33639&G=33634

Hope that helps, please 'Accept as Answer' it if...
Forum: General 08-28-2007, 08:14 AM
Replies: 2
Views: 1,281
Posted By paulholden
RE: writing common array functions

To do that you would have to create your own class, for instance TMyArray and give it all the methods you've just described.

However, this would be somewhat pointless as what you're describing can...
Forum: General 05-11-2007, 08:09 AM
Replies: 1
Views: 1,434
Posted By paulholden
RE: Run a command

Try the following;

Str := 'SQLLDR';

Params := 'UserName/Password@DBInstanceName C:\ControlFilePath.ctl';

ShellExecute(0, pchar('open'), pchar(Str), pchar(Params), nil, SW_SHOW);

Hope that...
Forum: General 05-08-2007, 08:48 AM
Replies: 4
Views: 850
Posted By paulholden
RE: Replacing characters in string

You can do it like so;

FormatDateTime('dd-mm-yyyy', Now));

Hope that helps, please 'Accept as Answer' it if does :^D
Forum: General 04-23-2007, 12:28 PM
Replies: 1
Views: 1,115
Posted By paulholden
RE: how to disconnect a client socket from server

You can use the following code, where ClientSocket1 is the name of the client socket that you want to disconnect;
begin
ClientSocket1.Close;
ClientSocket1.Active := False;
end;


Hope that...
Forum: General 04-21-2007, 06:27 AM
Replies: 3
Views: 1,079
Posted By paulholden
RE: VB To Delphi Help!

You can use the WinExec function like so;
WinExec(PChar(newpath), SW_SHOW);
Your try..except statement won't work as you're intending either. You should use the FileExists function to check whether...
Forum: General 04-16-2007, 11:09 AM
Replies: 11
Views: 1,637
Posted By paulholden
RE: Passing Big TObject To A Procedure / Function

You can - I wasn't clear about that in my last post, sorry ;'d

If you're using pointers you can access and modify any properties of the class your parameters are pointing to.

Hope that helps,...
Forum: General 04-16-2007, 10:29 AM
Replies: 11
Views: 1,637
Posted By paulholden
RE: Passing Big TObject To A Procedure / Function

No, it's just as I wrote it:
function Compare(MyClass1, MyClass2: PMyClass): Integer;
What you're passing here are pointers. However, if you want to modify the contents of either MyClass1 or...
Forum: General 04-16-2007, 09:10 AM
Replies: 2
Views: 770
Posted By paulholden
RE: client server application

See my previous post;

http://www.delphipages.com/threads/thread.cfm?ID=100891&G=100886

Hope that helps, please 'Accept as Answer' it if does :^D
Forum: General 04-16-2007, 09:08 AM
Replies: 11
Views: 1,637
Posted By paulholden
RE: Passing Big TObject To A Procedure / Function

Create a class which is a pointer to TMyClass:
PMyClass = ^TMyClass;
Your function would then look something like
function Compare(MyClass1, MyClass2: PMyClass): Integer;
begin
if...
Forum: General 04-16-2007, 09:02 AM
Replies: 2
Views: 901
Posted By paulholden
RE: Pros & Cons : Out

There's no difference in output no, although that's not typically how you would use the out directive.

In your case, that procedure declaration would be better written as follows;
procedure...
Forum: General 04-14-2007, 03:16 AM
Replies: 13
Views: 7,777
Posted By paulholden
RE: Application.ProcessMessages() without Forms unit!

I've stepped through the Application.ProcessMessages code in the Delphi IDE, and it appears that it uses PeekMessage rather than GetMessage:
while PeekMessage(Msg, 0, 0, 0, PM_REMOVE) do
begin
...
Forum: General 04-13-2007, 02:57 PM
Replies: 13
Views: 7,777
Posted By paulholden
RE: Application.ProcessMessages() without Forms unit!

There's a couple of ways you could break out of the loop.

The Msg structure contains a .message property, which you can use to check for certain messages. You could define your own message, and...
Forum: General 04-13-2007, 02:49 PM
Replies: 1
Views: 877
Posted By paulholden
RE: How can I display a pdf file by clicking a Buttton??

Add ShellAPI to your units uses clause, and use the following line of code to open the pdf file;

ShellExecute(0 , 'open', 'C:\some\path\file.pdf', nil, nil, SW_SHOWNORMAL);
You just need to...
Forum: General 04-12-2007, 03:35 AM
Replies: 13
Views: 7,777
Posted By paulholden
RE: Application.ProcessMessages() without Forms unit!

The Windows unit adds no size at all to an application. You can easily confirm this by creating a new project, containing only Windows in the uses clause of your .dpr file and looking at the size of...
Forum: General 04-12-2007, 03:28 AM
Replies: 2
Views: 1,107
Posted By paulholden
RE: DateTime question

You could do something like this;
begin
DateTimePicker1.Date := EncodeDate(1800, 1, 1);
end;

Hope that helps, please 'Accept as Answer' it if does :^D
Forum: General 04-12-2007, 03:22 AM
Replies: 5
Views: 2,072
Posted By paulholden
RE: Select single characters

If you just want to select certain characters in a string, you can use the following code;

var
C: Char;
begin
C := Edit1.Text[2]; // select the 2nd character
Showmessage(C);
end;

If you...
Forum: General 04-12-2007, 03:18 AM
Replies: 3
Views: 926
Posted By paulholden
RE: Get Folder Views

If you're using a TListView component (under the Win32 tab) then you can set the ViewStyle property to one of the following, depending on your needs; vsIcon, vsList, vsReport, vsSmallIcon.

Hope...
Forum: General 04-10-2007, 01:49 PM
Replies: 4
Views: 2,469
Posted By paulholden
RE: checksum for 1 byte of a given string

What is it that you're trying to achieve?

If you want to generate a checksum of a given string then look at something like MD5 to create a hash of the string. See the following two articles for...
Forum: General 04-10-2007, 06:22 AM
Replies: 13
Views: 7,777
Posted By paulholden
RE: Application.ProcessMessages() without Forms unit!

Yes, that would produce the same effect.

Hope that helps, please 'Accept as Answer' it if does :^D
Forum: General 04-09-2007, 11:14 AM
Replies: 5
Views: 1,109
Posted By paulholden
RE: Knowing when an application closes

Hi,

See the following tip; http://www.delphipages.com/tips/thread.cfm?ID=62

Alternatively, look for information on the ShellExecuteAndWait() function.

Hope that helps, please 'Accept as...
Forum: General 04-09-2007, 11:08 AM
Replies: 13
Views: 7,777
Posted By paulholden
RE: Application.ProcessMessages() without Forms unit!

Hi,

See my previous post; http://www.delphipages.com/threads/thread.cfm?ID=83760&G=83754

Hope that helps, please 'Accept as Answer' it if does :^D
Forum: General 04-06-2007, 04:08 AM
Replies: 3
Views: 773
Posted By paulholden
RE: real length of tabs

The tab key has the keycode #9. So you need to scan through your string, and if you encounter this character, then add 6 (or however many spaces you want to count as a tab) to your running total.
...
Forum: General 03-25-2007, 04:49 AM
Replies: 1
Views: 909
Posted By paulholden
RE: WinSocket Error (Don't Show Dialog)

You can set ErrorCode := 0; in the SocketError event. Alternatively, you should handle the error properly and try to make sure it doesn't occur.

Hope that helps, please 'Accept as Answer' it if...
Forum: General 03-24-2007, 05:39 PM
Replies: 2
Views: 1,482
Posted By paulholden
RE: LoadLibrary call function?

Here's an example, once you've declared a function, and then loaded it from a DLL, you can just call it like you would any other function.
...
Forum: General 01-28-2007, 10:29 AM
Replies: 6
Views: 3,481
Posted By paulholden
RE: Text To Speech.

Check the following links where you can download new engines and characters;

http://www.microsoft.com/msagent/downloads/user.asp

http://www.microsoft.com/msagent/downloads/developer.asp

Hope...
Forum: General 01-22-2007, 03:32 PM
Replies: 3
Views: 730
Posted By paulholden
RE: open an application

ShellExecute is probably one of the easier ways to run/open a file. You don't need to add ShellApi to your uses clause to use the function either, you can simple declare it in a unit like so;
...
Forum: General 01-22-2007, 03:24 PM
Replies: 2
Views: 739
Posted By paulholden
Re: Text mode in a form

Hi,

Have a look at my previous post; Display the output of a console app in a Memo.

Example;

var
AppPath: String;
begin
AppPath := 'C:\application.exe';
Forum: General 01-05-2007, 09:38 AM
Replies: 6
Views: 2,189
Posted By paulholden
RE: How to create Onclick event on own Tform class

Hi,

See the previous post I made regarding your question;

http://www.delphipages.com/threads/thread.cfm?ID=175663&G=175646

Hope that helps, please 'Accept as Answer' it if does :^D
Forum: General 01-05-2007, 09:33 AM
Replies: 5
Views: 2,075
Posted By paulholden
RE: shellexecute

This is the function declaration of ShellExecute;

function ShellExecute(hWnd: HWND; Operation, FileName, Parameters, Directory: PChar; ShowCmd: Integer): HINST;

As you can see, there is a...
Forum: General 12-26-2006, 09:42 AM
Replies: 2
Views: 1,147
Posted By paulholden
RE: Newbie question: Remote move/copy files via phone line

You will literally find hundreds of similar questions here on the forums;

TCP Transfer Files.

FTP Transfer Files.

You can write your own protocol over TCP/IP or go with an existing protocol...
Forum: General 12-26-2006, 09:38 AM
Replies: 1
Views: 1,895
Posted By paulholden
RE: Synchronize for BeginThread instead of TThread?

Hi,

You can write your own thread synchronize methods using the CriticalSection API's. Specifically look for information on;


InitializeCriticalSection
EnterCriticalSection
...
Forum: General 11-27-2006, 03:01 PM
Replies: 2
Views: 857
Posted By paulholden
RE: DLL Question

You are presumably using some sort of third party encrypting/hashing component in your application, hence the required MD5 DLL.

If the component is open source, take a look at the code and see...
Forum: General 11-27-2006, 02:58 PM
Replies: 4
Views: 1,542
Posted By paulholden
RE: messagebox language

Hi,

See the following thread, you've got a few different methods presented;

http://www.delphipages.com/threads/thread.cfm?ID=100759&G=100759&SAR=TRUE

Hope that helps, please 'Accept as...
Forum: General 11-26-2006, 02:36 AM
Replies: 4
Views: 921
Posted By paulholden
RE: Procedures

Hi, see the following example which creates a button at runtime and sets its OnClick event;
procedure TForm1.ButtonClickEvent(Sender: TObject);
begin
MessageBox(0, 'Clicked', 'Hi', 0);
end;
...
Forum: General 11-26-2006, 02:28 AM
Replies: 1
Views: 799
Posted By paulholden
RE: Tracking and monitoring an executable file

What you're describing is called a debugger, check out OllyDbg at the following URL:

http://www.ollydbg.de/

Hope that helps, please 'Accept as Answer' it if does :^D
Forum: General 11-25-2006, 04:55 AM
Replies: 4
Views: 1,317
Posted By paulholden
RE: How to check windows version befor declear a external funtion ?

Hi,

Check my following post;

http://www.delphipages.com/threads/thread.cfm?ID=147988&G=147928

Hope that helps, please 'Accept as Answer' it if does :^D
Forum: General 10-06-2006, 01:31 AM
Replies: 0
Views: 896
Posted By paulholden
Detecting CD-RW, DVD-RW, etc drives

Hi guys,

How can I detect whether a drive is, for instance, a CD-RW or DVD-RW as opposed to just detecting it as a CD or DVD drive?

I can currently detect whether it's primarily a CD or DVD...
Forum: General 10-14-2005, 07:51 AM
Replies: 6
Views: 947
Posted By paulholden
RE: Stop all messages

It's failing because that function doesn't exist on XP/NT/2K systems.

Try the following code to check whether the export actually exists before trying to use it;

procedure hide9xtasklist;
var...
Forum: General 04-27-2005, 06:53 AM
Replies: 1
Views: 912
Posted By paulholden
Detecting single AND double clicks?

Hi guys,

It seems that when I set an OnClick event on a TImage component I'm using, the OnDblClick event will never get fired.

I'm using the following workaround, but it doesn't work quite...
Forum: General 04-25-2005, 01:54 AM
Replies: 2
Views: 1,253
Posted By paulholden
RE: Unable to Change Project Icon

Hi, make sure you have the following line underneath your uses clause in your main project file (.dpr);

{$R *.RES}

Hope that helps, please accept as answer it if does :^D
Forum: General 04-23-2005, 03:26 PM
Replies: 5
Views: 1,252
Posted By paulholden
RE: Make the program read data from it's own exe-file

Yea, that's the correct structure.

var
SHandle: THandle;
begin
SHandle := CreateFile(Application.ExeName, GENERIC_READ, 0, nil,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
...
Forum: General 04-23-2005, 03:18 PM
Replies: 2
Views: 965
Posted By paulholden
RE: Array of Char

Hi, this works;

procedure blah;
type
TCharArr = array[0..29] of Char;
TID3Rec = packed record
Tag: array[0..2] of Char;
Title, Artist, Comment, Album: TCharArr;
Year: array[0..3] of...
Forum: General 04-23-2005, 03:07 PM
Replies: 5
Views: 1,252
Posted By paulholden
RE: Make the program read data from it's own exe-file

Use CreateFile like so;

SHandle := CreateFile(PChar(ParamStr(0)), GENERIC_READ, 0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);

Then SetFilePointer to go to your offset.

Then ReadFile to...
Forum: General 04-23-2005, 03:04 PM
Replies: 1
Views: 784
Posted By paulholden
RE: I need some help with Rave please!

Hi,

Try looking through some of the following posts here.

Or you could try at nevrona.com, the authors of Rave.

Hope that helps, please accept as answer it if does :^D
Showing results 1 to 50 of 500

 
Forum Jump

All times are GMT. The time now is 07:05 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.