-
Jun 11th, 2010, 03:22 PM
#1
Thread Starter
PowerPoster
[RESOLVED] get name of current module
Hello,
What I'd like to is get the name of the current Module running in a VB app. If I am in a Form, I can use "Me.Name", but in a Module that will not work. I tried:
System.Reflection.Assembly.GetExecutingAssembly().GetModules()(0).Name
But that gives the name of the app (like "WindowsApplication1.exe") rather than "Module1", which is what I'd be looking for.
Last edited by BruceG; Jun 12th, 2010 at 09:39 AM.
Reason: resolved
"It's cold gin time again ..."
Check out my website here.
-
Jun 11th, 2010, 09:38 PM
#2
Re: get name of current module
Can you try.
Code:
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name
-
Jun 12th, 2010, 09:38 AM
#3
Thread Starter
PowerPoster
Re: get name of current module
That was it. Thanks a lot!
"It's cold gin time again ..."
Check out my website here.
-
Jun 15th, 2017, 03:55 PM
#4
Junior Member
Re: [RESOLVED] get name of current module
How about for the current executing form?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|