Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


event in DLL

valdenirvaldenir Member Posts: 1
Hello people, I am new in this forum
I am creating a DLL that raises a form in runtimer.
Inside this form it has 1 ProgressBar and 1 Timer.
I need to create an event for the Timer. how I do that? I tried so it did not give them to me right.

TForm *Form;
TProgressBar *ProgressBar;
TTimer *Timer;

#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
return 1;

extern "C" __declspec(dllexport)int PROGRESS_BAR()
Form = new TForm(Form);
Form->Width = 500;
Form->Height = 25;
Form->Position = poScreenCenter;
Form->BorderStyle = bsNone;

ProgressBar = new TProgressBar(Form);
ProgressBar->Parent = Form;
ProgressBar->Align = alClient;
ProgressBar->Visible = true;

Timer = new TTimer(Form);
Timer->Parent = Form;
Timer->Interval = 50;
Timer->OnTimer = Form->PROGRESS;

//event created
void __fastcall TForm::PROGRESS(TObject *Sender)
//my code

Sign In or Register to comment.