Solved

DLL, Forms and MouseEnter Events

Posted on 2004-09-20
5
317 Views
Last Modified: 2010-04-04
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.
0
Comment
Question by:Narusegawa
  • 3
5 Comments
 

Author Comment

by:Narusegawa
ID: 12103487
More specifically it's the following that doesn't work:

procedure TfrmSplash.lblURLClick(Sender: TObject);
begin
  ShellExecute(Handle,'Open','http://www.mydomain.co.uk',nil,nil,SW_SHOWNORMAL);
end;

and

procedure TfrmSplash.lblURLMouseEnter(Sender: TObject);
begin
  lblURL.Font.Color := $00DD0000;
end;

0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12103516
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
0
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 50 total points
ID: 12103750
Sharemem with an ActiveX control? Why???
0
 

Author Comment

by:Narusegawa
ID: 12109890
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_MULTITHREADED);
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.
0
 

Author Comment

by:Narusegawa
ID: 12235717
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?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now