Solved

DLL, Forms and MouseEnter Events

Posted on 2004-09-20
5
321 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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mydac connection data base issue 3 158
tidtcpserver connection lost handle 2 86
Find and Replace Stream with 0s 8 62
Delphi problems to abort a printjob 9 20
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

809 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