Function Not Getting Called, And Program Stopping?
Apr 18, 2011
I have a function to pull data from a XML, and to report a specific number based on a value in one of the elements in the XML. Unfortuntately, I can't get any break points to work, so I've been debugging with a trace.he strange this is that when i take out the function itself it works like it should, otherwise the Service freezes when it gets to the function and never uses it. I'm calling the function in while loop which is also within a Try Statement, here's example of the code.
Public
Shared Function GetXNumber(ByVal
audit As Audit.API)
[code].....
View 12 Replies
ADVERTISEMENT
Jan 4, 2012
For a class, I have to create a delegate and use the function in my program called DoStuff(). There is an error tht says "Method 'Public Sub DoStuff(stringVal As String)' does not have a signature compatible with delegate 'Delegate Sub MyDel()'.
[Code]...
View 2 Replies
May 18, 2010
I have a vb.net application which does some processing. This processing can take a while. The application doesn't respond until the processing has ended and then it handle all events (such as click on buttons) that the user has done during the processing. I'd like to add a "Stop" button so that the user can stop the processing at some point. How can I do that? Could threading the processing (which is done in a function of the application) be a possible solution?
I tried to add a button which change a boolean value and putting the code of the processing function inside a while statement based on that boolean value. However it doesn't work because the click event on the button is processed only after the end of the processing.
View 2 Replies
Mar 3, 2010
I have some experience using visual basic 2005 I m doing a program to resemble vegas slot machine.. I am using 3 labels to display the numbers. There are 3 buttons. One is "START", "STOP", "EXIT". What i wont to do when i press the start button the 3 lables should start displaying various numbers(continuous changing single digit numbers). when stop is pressed labels should stop at the current number . based on the current numbers in labels, some function is executed(output is provided) What i have done
[Code]...
View 2 Replies
Jan 25, 2010
How can I call a function from inside another function and suspend the calling function until the called function is finished? I hope I can get some replies because I don't know how to ask the question and make sense:).
Anyway what I am trying to do in steps:
1. The user clicks button1 which triggers the click event.
2. From the click event I call a function
3. I then pop-up a form, that has instructions for the user to read.
4. After the user has read the form he will click the "Done" button and return to the calling function.
The problem is the the calling function continues to execute. I want to stop execution of the calling function until the users clicks the "Done" button on the instruction pop=up. I know I can use a msgbox but the instructions can be lengthly and does not look good in a msgbox.
I have tried the Call method with return in the "Done" button click but I can make that work. I also tried a goto statement but I can get that to work either. In the call statement I said call frmInstruction.show() and it got there but as I said the calling function continued to execute.
View 3 Replies
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
May 25, 2012
I am trying to convert a DLL function call which has the Callback function routine called within the DLL function call.The DLL function call signature is like this:
typedef void *HANDLE;
typedef HANDLE HACQDESC;
DECLARE_HANDLE (HWND);
[code]....
how to convert this DLL call to VB.NET and also how to create the callback function and send it as parameter to this function
call.
View 15 Replies
May 13, 2010
I recently found an awesome tool called "Freemind" that is called a 'mind mapping' program. It's similar to MS Visio but way cooler and more automated.I reeeallly would like to integrate this into a VB.net Form, but how?
Has anyone seen or heard of mind mapping inside VB.net before? Are there programs out there already that work with VB.net or anyone have an example they have seen / built that works?
View 5 Replies
Oct 22, 2009
I've got a basic logon form where if you enter the right password/username, it redirects you to the "MainMenu" Form How can I make a function called "checkLogon" that checks the username/password text to a variable in that function?
View 3 Replies
Jul 21, 2009
Why this program is not stopping when I hit the specific information it needs to stop?I get everything to work the way I want it to,
[Code]...
View 2 Replies
Jul 10, 2011
I have a website where people send each other messages Recently I noticed that sometimes the same message is sent more than once
For example, a message is sent four times within three seconds or twice within a second.I do not understand how this could happen, once the user clicks on the button that sends the message .So all the window switches and a message showup saying "the mail is sent successfully." I checked that if the user refreshes the page after it sends a message, then really the message is sent again.But I do not think that's the case, becouse the message is sent twice within one second.I am writing in vb.net and using mysql data base.Maybe it's related to the queue for the db, i do not know.Here's the code:
Function calls:
Call GlobalFunction.update_mailbox_table(user_id, receiverId, txtMessage.Text, private_picture)
the insert function
Public Shared Sub update_mailbox_table(ByVal user_id As Integer, ByVal receiverId As Integer, ByVal message As String, ByVal[code].....
View 2 Replies
Feb 15, 2010
I have a function that takes some meter measurements. If the values are not close enought I want to run the function again until the values are close enough, or until the function has been executed "X" amount of times.
View 3 Replies
Dec 11, 2010
Okay so what im trying to do is make a simple particle system in VB (Yes i know this isnt a ideal setup). Im going to have particles dieing and spawning new ones tho, To do this i need to be able to pass a function to the particle when its created then call that function when it dies. Is there a way to do this by passing function pointers?
View 9 Replies
Jul 13, 2011
I have the following statement and the function 'InitialiseOsTransform' is in a Module which is in the project.
If InitialiseOsTransform() = False Then But instead of the code going into this function it goes into the Paint function.
I have used the similar code in another project and it works correctly.
View 11 Replies
Apr 1, 2011
I am wanting to perform certain processes before the program closes. I can get them through the File > Exit part of my menu, but I can not find the VB6 form_unload equivalent in VB2010. I have tried Form_QueryUnload but it never gets called when I close by using the RED "X".
View 12 Replies
Aug 8, 2010
I have got 2 forms, Form1 and Form2.I called a function that was located on Form2 from Form1, and want to return the value that is in the function on Form2, to Form1. How do I do this?I have tried the following.
Form1
Call Form2.Needfps()
fps = Needfps
Form2
[code]....
View 10 Replies
May 14, 2012
Net_mang_Form.Prg_bar.Visible = True
Net_mang_Form.Prg_bar.Value = 0
Net_mang_Form.prg_Timer.Start()
[Code].....
Here Net_mang_Form is Form1 and this code is written in button click event of Form2.
file_send is the function of dll .
prg_Timer is the timer control .
Prg_bar is Progress bar control.
View 2 Replies
Aug 7, 2011
Is there a possibillity to get in a vb program information from a called vb program?For example: Dim id As Integer = Shell("C:program.exe id_1") program.exe is a vb windows form program and must return a value back.
View 1 Replies
Mar 25, 2010
Consider I have a shared function:Public Shared Function CalculateAreaFromRadius(ByVal radius As Double) As Double
[Code]...
If I have two or more threads in the same vb .net app and each of them calls the shared function at the same time with different RADIUS, will they each get their own AREA? I want to know for each call to the function if it is using same local variables or each call creates new instances of local variables?Will the answers to above questions be same If I have multiple (2+) single threaded apps and they all call the function at the same time with different RADIUS value?
View 2 Replies
Oct 25, 2011
I had a problem (which is now fixed) but I've no idea why.I have an Ajax AutoCompleteExtender with a WebService method to populate like <WebMethod()> _
Public Shared Function populateACE(prefixText As String) As List(Of String) However this didn't work - I put a breakpoint in, and it didn't even get hit. However... <WebMethod()> _ Public Function populateACE(prefixText As String) As List(Of String) does work (the only difference being not Shared).
Fair enough, but why? If you have an instance of a class then you can access Shared methods of it; if you don't have an instance of a class then you can access Shared methods of it. So what is going on behind the scenes?
View 1 Replies
Aug 17, 2010
how to close projects or forms than called by ((shell)) function in vb6?
View 1 Replies
Aug 26, 2009
In vb.net I have two data values as shown below:
Dim startp as datetime
Dim endp as datetime
I have a function called ProcessData(soemdate) which processes dataporting.
In VB.net is there a way I can do something like
For each day between startp and endp ProcessData(soemdate)Next
View 4 Replies
May 10, 2012
I am working with tasks, so I've got the following code to update a label on my form:
Private Delegate Sub UpdateLabelDelegate(ByVal s As String)
Public Sub UpdateLabel(ByVal s As String)
If Me.InvokeRequired Then
Me.BeginInvoke(New UpdateLabelDelegate(AddressOf UpdateLabel), New Object() {s})
Return
View 2 Replies
Sep 13, 2011
I have this on the form load;
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Visible = False
Me.ShowInTaskbar = False[code].....
Notice: I used "End", to terminate the process.What I want to do is when the last function is called (Delete_AutoReq_PracNo) it terminates the execution of the application.
Reason...I'll schedule this application to ran from MS SQL Server at night. So realistically, doing all the processes I would like it to stop...Is what am doing sufficient to stop the application from running or there is a more robust approach..
View 3 Replies
Jan 9, 2010
I would like to allow my users to decide where they want their data to reside. I have created a data source which is referenced by crystal reports. I would like to replace the |DataDirectory| to point to a path the user selects. or if possible substitute it with vb function.
Below is the line in xml that point to my db. I would like to allow it to call a vb function that will return my db path I am not sure how to replace the connection string by using a vb function in xml.
<Connection ConnectionStringObject="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|MY_DB.mdb;Persist Security Info=True;Jet OLEDB:Database Password=pass" IsAppSettingsProperty="false" Modifier="Assembly" Name="MY_DB.mdb" Provider="System.Data.OleDb" />
I would like to replace |DataDirectory| with the result of a function called MyDBPath(), can anyone assist.
View 7 Replies
Feb 26, 2012
I'm looking to write a function that is called everytime an exit button is pressed, just simply prompting the user to click yes or no is there a guide anywhere? is there a name for this kind of thing i can look at it more?
View 7 Replies
Jan 11, 2011
I've been having trouble converting the following fairly straight forward c# code into vb.net 4.0, which I understand has anonymous delegates. I just havn't been able to figure it out yet.
_combo.DataBound += (sender, args) =>
{
var item = _combo.FindItemByValue(values[0].ToString());
if (item != null)
[code]...
I have tried the following
_combo.DataBound += Function(sender, args)
Dim item = _combo.FindItemByValue(values(0).ToString())
If item IsNot Nothing Then
[code]...
But the compiler complains that DataBound can not be called directly, but has to be called with RaiseEvents
View 2 Replies
Dec 15, 2011
I have used the Process.start function to open an Excel file as shown in the code
Process.Start("report.xlsx") and it works perfectly well.
My question is can this function be used to open a particular worksheet called Report1 in the report.xlsx file. If so what would the code be.I have spent many hours trying to research this topic but without success.
View 5 Replies
Jul 20, 2009
I have an event callback that I created to respond to the value change of a numeric control. For some reason this sub is called event before my first Frm_Load submethod is called. Grrrr...why is this sub being called first before anything else?? The event passed appears to be "Empty".
View 2 Replies
Jan 12, 2010
Hows it going. Im in some need some help. Im trying to make a Program called process master, and one of it's features is When clicking an item in Listbox1, It will show on the side in Label 11 the path of that process.
System.IO.Directory.GetCurrentDirectory.listbox1.selecteditem = label11.text As you can very well see, im new with System.IO commands. Been wanting this as one of the main features!
View 1 Replies