Solved

how can i print what form and sub i am in side of???

Posted on 2006-11-10
6
181 Views
Last Modified: 2010-04-23
i want to be able to print what form or file im in and the sub im in at the time of the call...

im sorta writing a debug info file ...but i  want to be able to see where i am too


thanks in advance for any code or help you may provide
0
Comment
Question by:Johnny
[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
  • 2
6 Comments
 
LVL 6

Expert Comment

by:riyazthad
ID: 17917625
Hi,

You can use Call Stack window. If it is not there in , you can add by just perssing Ctrl+Alt+C or go to Debug menu - > Window -> Call stack while debugging.

Thad
0
 

Author Comment

by:Johnny
ID: 17917786
no im looking to do something like

PrintToFile(date & "Connection - useing form/sub " & Form.Name & "/" & Form.Sub.Name & VbCrLf)

or something like that that will print the forms name ie Form1.vb and the Sub Form1_Load


thanks
0
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
ID: 17919721
Something like this?

        MsgBox("Executing in class '" & Me.Name & "', function '" & Reflection.MethodInfo.GetCurrentMethod.Name)
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:Johnny
ID: 17919796
Error      3      'Name' is not a member of 'IrcMX.EndPoint'.      D:\temp\phreikchat\phreikchat\phreikchat\IrcMX\src\connectivity\endpoint.vb      569      70      IrcMX.Net
0
 
LVL 6

Expert Comment

by:riyazthad
ID: 17921500
Is EndPoint your form?

I hope you are doing from VS. not using vbc command utility. And make sure your class is inheriting from System.Windows.Forms.form class.

Where you are executing this above code? I hope ZeonFlash's code will work out for your requirement.

Thad
0
 

Author Comment

by:Johnny
ID: 17921600
endpoint is the file its in...there is no form(design) there... its a modual i think

and im useing vb express...

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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