Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Who's the caller?

Status
Not open for further replies.

Robse

Programmer
Apr 28, 2003
28
DE
How can I find out from within my dll, the name of the
Program that called it? (the window caption, not the .exe name)
Say I have two programs that call my dll. What I want to
happen is that when I click a button on Program 1, the
dll pops up a MsgBox saying "Program 1", and when I click
a button in Program 2, the dll should call a MsgBox
saying "Program 2"

Any suggestions?

Thanks.
 
If you want the Window Caption you can call a function immediately after initializing the dll passing the caption of the current window, me.caption.

Dim TheClass as New MyClass
PassCaption Me.Caption
 
Not bad, the idea! I could include that as a method.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top