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;
}
//-----------------------------------------------------
//components
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;
Form->Show();
Timer = new TTimer(Form);
Timer->Parent = Form;
Timer->Interval = 50;
Timer->OnTimer = Form->PROGRESS;
}
//---------------------------------------------------
//event created
void __fastcall TForm:ROGRESS(TObject *Sender)
{
//my code
}
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;
}
//-----------------------------------------------------
//components
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;
Form->Show();
Timer = new TTimer(Form);
Timer->Parent = Form;
Timer->Interval = 50;
Timer->OnTimer = Form->PROGRESS;
}
//---------------------------------------------------
//event created
void __fastcall TForm:ROGRESS(TObject *Sender)
{
//my code
}