Is The Active Function Or Subroutine Name Available At Runtime
Apr 13, 2009
For debugging I've often thought it would be very useful to have access to the name of the fuction or subroutine that is currently executing so that you could print or display this as the code runs. I've been told by some folks that it is not possible, now I'm asking a broader community. Also, when I asked before it was in the context of VB6, now wondering if VB.Net enables access to the executing function or subroutine name.
View 2 Replies
ADVERTISEMENT
Jun 5, 2011
If a subroutine is called within a function, does the function always wait until that subroutine is completely finished before it will proceed with the rest of the function? If so, is there any way to make it not wait and continue on with the rest of function and not care what happens in the subroutine?
View 3 Replies
Oct 29, 2009
Class A gets, as part of it's constructor, a pointer to class B and saves that pointer in a private variable. Class B exposes a public function, F. I'd like for class A and all classes that inherit from class A to NOT be able to call B.F.The idea is that class A will implement its own version of F, one that calls B.F, but the rest of the code should not be calling B.F. If it matters, the two have different function signatures.Maybe another way, like a class C that inherits from class B and hides the public functions? (Cant that even be done?)
View 2 Replies
Jun 15, 2009
Repetitive Statements: Looking for an alternative to a function or subroutine. Years ago, I wrote programs for a company using a language called "Algol", I am sure some of you know of it and but many more do not, it is a pretty old language. It had a capability that I used called a "Define" where you could take a statement (for example x = y + z ) and create a 'define' which was a simple, short replication of that statement. (x=y+z) could be defined as 'mysum'. You could then use 'mysum' any where in the program in place of the 'x=y+z' statement.
[Code]...
Is there a similar type capability in Visual Basic? A sub routine does not satisfy the need unless the variables x, y and z are globally dimensioned to the module? I can do this, but would prefer not to. I am expect there is a similar capability, but I personally have only scratched the surface of the VB capabilities.
View 7 Replies
Feb 29, 2012
i added the COM reference to:Crystal Reports 9 ActiveX Designer Run Time Library 9.0 i have some code that prints a crystal report:
'print report
Dim Appl As New CRAXDRT.Application
Dim CrystalReport As New CRAXDRT.Report
[code]....
Code works fine on my Windows 7 64 bit computer because I have Crystal Reports 9 installed on that computer but i want this to work on other computers that don't have Crystal installed.I have published my app and installed it on another Windows 7 64 bit computer and it doesn't work.I think i need to have the craxdrt.dll install and register on the users computer.
how can i include this in my setup? I already include the Interop.CRAXDRT.dll when i publish (publish status: INCLUDE/Download Group: Required/Hash: Include) but it doesn't make a difference.i am using vb.net 2010 express?
View 3 Replies
Nov 15, 2011
Below is code to delete a user off a AD in another domain, there is a full trust and the user being assigned to the Directory Entry has full rights to the AD it is accessing:
Try
Dim objUserDE As New DirectoryEntry
objUserDE.Path = "LDAP://CN=" + UserCN + "," + OrgU + "DC=DOMAIN,DC=LOCAL"
[Code].....
View 1 Replies
Mar 2, 2012
I'm hoping to improve the performance of the below as well as return the GUID of each user.
I've converted and modified the code found here for searching through groups recursively to get all the members and their details and adding them to a class collection. However I also need to capture the user's managers details so I'm calling the AD twice for each user. This doesn't seem efficient as many of the users will have the same manager. It would seem logical to get the distinct manager details from the collection class and call only these, then replace them wherever they occur in the collection.
I'd also like to be able to get the user's GUID, I've tried accessing it directly as a property of the collection, but it doesn't return anything.
I'm using vs2005 and .Net 2.0
Public Class ADCLass
''' <summary>
''' Calls recursive function to return users in group
[Code]....
View 1 Replies
Jan 17, 2011
I wanna make a program that asks the user to enter a dll file path/name & a function in that dll file with args & gets the results
View 6 Replies
Mar 6, 2011
i had some thing challenging work i had three functions
function1()
function2()
function3()
i had a text box and command button i need to execute the functions when the function name is typed in text box suppose i type function1 and click command button the corresponsding function is executed.
View 2 Replies
Mar 30, 2009
I want to get the active control (control which has the focus or where the cursor is on) each time the cursor moves to another control or each time a control receives a focus.
View 5 Replies
May 9, 2006
I'm a developer for a College we have an active directory.I need to query Active Directory with the Pc name and return it's path in the Active Directory tree.
View 3 Replies
May 9, 2010
I am trying to get the hang of this stupid VB.net, but it won't even let me create a subroutine or function, it use to be in the tools menu in VB6. I have spent £50 on 2 books that rabbit on about objects, property's classes etc: but tell me nothing of what I want/need to know, what a waste of money.
View 14 Replies
Apr 2, 2010
I have a standard Visual Studio 2008 VB.Net WinForm application, running on Vista Business. One of the forms has a timer that passes Me.Handle to FlashWindowEx. This works as intended as long as none of the windows that belong to this application are the Foreground window. If this program is running and another application's window is the Foreground window, then it flashes as intended. If, however, any of this application's windows are the Foreground window, then it doesn't flash.
[Code]...
View 2 Replies
Dec 4, 2011
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim d As Integer
Dim price(20) As Double ' Adjusted close price
[code]....
What is the for ... next loops in the second subroutine doing? What is the sim() array meaning?
View 3 Replies
Jul 23, 2009
Does anyone know how to get x value form another subroutine?
View 3 Replies
May 1, 2010
I have a form that is bound to a table of data. I have a typical binding navigator. When I go to a different record such as next, previous, first or last I need a subroutine named "LayoutAdjust()" to execute "after" the new next record data is loaded on form. I tried calling the subroutine in the "BindingNavigatorMoveNextItem_Click" action but it executed the procedure before the next record data was loaded
View 1 Replies
Feb 7, 2010
I have an old program written in VB6. I upgraded the program with VB 2008. The updated program works fine except when the program tries to transfer an array to another subroutine. The old VB6 program sends arr(0) as an argument to the subroutine, the address of arr(0) is passed to the subroutine. The array arr() address is the first of a block of consequent addresses one by one, arr(1), arr(2), etc.
Now when running VBnet, the address of arr(0) is not the first of all consequent arr(1), arr(2), etc. It is an isolated number, just like if arr(0) were a variable instead of an array. The addresses of arr(1), arr(2), etc do not exist in the subroutine. [Code]
The variable of y1 passes to the subroutine oK, whilst arr(0) passes also like y1 into an isolated address. So VBnet interprets arr(0) like a variable rather than the first value of a long list. I haven't been able to find out why the above sample does not work. I got stuck in my programming effort, as I cannot proceed to to further development. how the code should be modified to enable the whole array information passing through the subroutine.
View 3 Replies
Jun 27, 2011
Problem is, I need to call a VB.NET function from javascript, no two ways around it. This is a bit harder to find.BTW -- Web/Page methods won't work. I have to be able to reference a listbox and it's selected items when the VB code-behind fires.
View 3 Replies
Jun 21, 2010
what I need to do is to call/run/execute a subroutine using a varaible name from a subroutine.
Public Sub Main(ByVal subName as String)
Call subName ' subName may be contain the value AAA or BBB
End Sub
[code]....
View 5 Replies
Jun 16, 2012
I am trying to make a counter go up by 1 every time a subroutine is called But i dont know how to word it. Here is the code. [code]...
View 2 Replies
Feb 23, 2010
I'm writing a class library and I need to be able to shut down the main code in certain cases.
I know I could raise an event and listen for it in the form called by application.run but I would like to find a way around it.I wouldn't be opposed to try to throw an exception that if unhandled would close the application... but would prefer to come up with a more elegant soln.
View 1 Replies
Feb 4, 2011
I am trying to execute the "Data()" subroutine at startup. This did not work:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call Data()
End Sub
Is there a way to call the subroutine at the begining of debug?
View 9 Replies
Dec 11, 2011
I'm following this tutorial [URL] and it says to Open form1_Load() subroutine. What does this mean and how do I do so? It is really important.
View 3 Replies
Feb 1, 2010
When you access a subroutine by one or more other subroutines each time the variables are zeroed like 'n' below. How can I keep n saved so main can increment n each time.
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]....
View 3 Replies
Jan 19, 2011
have a look at my VB/ASP code and tell me if you can see what's wrong (I highlighted the important segments in red):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<%@Page Explicit="true" Language="VB" Debug="true"
[Code].....
Basically, I'm trying to get the Page_Load subroutine to execute on the page load, but it doesn't seem to be called. I'm assuming that because I set my feedback label to "feedback" in the Page_Load subroutine, I should see it displayed on the page saying "feedback" on first loading the page and every time I refresh. But this doesn't happen. I'm lead to conclude that the Page_Load subroutine is not being called on the page load.
View 4 Replies
Jan 19, 2011
VB/ASP code and tell me if you can see what's wrong (I have bolded the important segments):
[Code]...
View 4 Replies
Jan 24, 2012
How do I pass a list as a parameter to a subroutine? I don't know how to specify the variable type in the receiving routine.[code]...
View 6 Replies
May 12, 2009
I have two subroutines that consists of two datasets. I am not sure how to pass some data in first dataset named dsGoodStudent to second dataset named dsBestClass.
Private Sub Classification()
Dim SqlSelect As String
SqlSelect = "Select Name, Age, grade from tblStudent where grade = 'A'"
[Code]......
View 3 Replies
Dec 15, 2011
So I created a subroutine to do some work but now i have no idea how to pass the results on to another stage in the process.
Private Sub CheckDates() Handles MyBase.Load
Dim Duedate As Date = INFDateLabel1.Text
Dim Duedate2 As Date = INFDateLabel2.Text
[Code].....
View 2 Replies
Dec 15, 2009
Having a time trying to figure out mapping a key to a sub. When ever the window is the top window active window I was wanting to map the key ' z ' to run my command. So when the ' z ' button is pressed the motor command is run. Then will map the ' x ' key to go the other direction.[code]....
View 3 Replies