Narusegawa
asked on
DLL, Forms and MouseEnter Events
I've got a form inside a DLL that I load up. This bit works perfectly fine not a problem. Now I have a label on this form with events attached to the MouseEnter and MouseLeave events. When I use this form in a .exe it works perfectly fine. However as a .dll it doesn't perform these events nor the OnClick event either. Any possible ideas?
It's an ActiveX Library, with ComServ and Sharemem loaded.
It's an ActiveX Library, with ComServ and Sharemem loaded.
will have to try out, but is probably the same problem as the TAB key, since version 5 they changed something in the VCL, now all the messages are sent directly to the EXE application bypassing the DLL
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Because the guide I read for DLL making said to put Sharemem into DLL and EXE uses clause to make sure that strings can be passed to and from them rather than pchars.
And I asked a mate at work what to choose when building a DLL and he said choose "ActiveX Library", and from previous DLL experience/problems I've always put :
initialization
CoInitializeEx(nil,COINIT_ MULTITHREA DED);
finalization
CoUninitialize;
at the bottom of any forms/units I use in my DLL's. And this won't compile with ActiveX not in the USES clause.
Unless I'm doing something totally wrong here.
And I asked a mate at work what to choose when building a DLL and he said choose "ActiveX Library", and from previous DLL experience/problems I've always put :
initialization
CoInitializeEx(nil,COINIT_
finalization
CoUninitialize;
at the bottom of any forms/units I use in my DLL's. And this won't compile with ActiveX not in the USES clause.
Unless I'm doing something totally wrong here.
ASKER
Workshop_Alex, removing ActiveX worked fine. I dont use any ADO components yet on my forms in the .dll, but when I do will it cause a problem?
ASKER
procedure TfrmSplash.lblURLClick(Sen
begin
ShellExecute(Handle,'Open'
end;
and
procedure TfrmSplash.lblURLMouseEnte
begin
lblURL.Font.Color := $00DD0000;
end;