MartinHodder
asked on
Progressbar in DLL
Can anyone tell me how I can create a Delphi DLL with a progressbar in it that can be called by external programs. What I am really asking is how do I make the application the parent of the progressbar? please see further comment below.
TIA
TIA
just place it on form and show/hide the form when you need
Does your dll only contain a progressbar which you want to show on another control or form of the calling application, or does it contain a form which displays the prog.bar?
ASKER
The idea is the progress bar ( on a form ) can be compiled into a DLL then i am using a completely different programming language to use the DLL. I want the new application to be able to pass a window Handle and then the progress bar to use this window as a parent - so if I alt Tab out of the application the progressbar goes with it
Many thanks for your help with this
Martin
Many thanks for your help with this
Martin
ASKER
Edited text of question.
Sorry, I cannot understand your problem.
Just create form, place progressbar on the form.
Make three functions :
procedure ShowProgressBar;
Begin
ProgressBar.Position := 0;
Form1.Show;
End;
procedure SetProgressBar(Pos, Max : Integer);
Begin
ProgressBar.Max := Max;
ProgressBar.Position := Pos;
End;
procedure HideProgressBar;
Begin
Form1.Hide;
End;
export the functions from your dll.
You can add some changes, if you want have number of progressbars in same time, or "Cancel" button on it.
Just create form, place progressbar on the form.
Make three functions :
procedure ShowProgressBar;
Begin
ProgressBar.Position := 0;
Form1.Show;
End;
procedure SetProgressBar(Pos, Max : Integer);
Begin
ProgressBar.Max := Max;
ProgressBar.Position := Pos;
End;
procedure HideProgressBar;
Begin
Form1.Hide;
End;
export the functions from your dll.
You can add some changes, if you want have number of progressbars in same time, or "Cancel" button on it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much thomas I will go and try it
Regards
Martin
Regards
Martin