?
Solved

DLL, Forms and MouseEnter Events

Posted on 2004-09-20
5
Medium Priority
?
342 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

752 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