Forms :: Calling A Sub On One From Another

Nov 29, 2009

Im loading a form to retrieve customer information from one form, then, when I collect the data, im trying to pass an ID back to the form that originally made the call. So, what I did is I made it so that the second form calls a sub on the first form, but for some reason it wont work. I put breakpoints in to check the variables, and they are getting data, but I can set the textbox on the first form with the data that is in the sub. Heres the code that loads the second form

Private Sub btnCustSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCustSearch.Click
Dim strLastName As String

[Code]....

View 2 Replies


ADVERTISEMENT

Forms :: Calling Forms Across Projects Within The Same Solution?

Jun 1, 2010

I have 5 projects within the same solution file, Im trying to access a form that is part of one of the projects from my startup project.I have looked through the earlier threads and most of them deal with calling forms from within a project.To my understanding ive correctly added the projects to the solution file from File --> Add --> Existing Projects.I have also referenced my Project2 from Project1 but still the intellisense does not let me access form1 of project2 from project1.

View 3 Replies

Calling Forms From Another Thread

Mar 3, 2012

I cannot grasp this issue. In the below code. I am trying to start a separate thread to display a progress bar while a function is executed in the main thread. The function can take a while, and during that time the program appears to just lock up. So, the progress bar does not really need to show the progress it just needs to cycle till the main thread function is done executing so that people know that the program is still running.

[Code]...

View 11 Replies

Forms :: Calling Function From Another Form?

Nov 23, 2011

I have defined a function on one form. I have to call that function again on another form. Is there any way I can do it without redefining the function again and again?

View 2 Replies

VS 2008 Calling Different Forms In A Function?

May 13, 2009

i am trying to use a login form that is used to login after you select one of 7 forms. this login form calls a function that validates then it calls another function, if it's true, that will load the appropriate form.

here's what i have.

vb.net
'Here are the appropriate variables
Public FormName As Form

[Code].....

View 3 Replies

VS 2008 Registration By Calling Web Forms

Apr 21, 2009

how should I go about starting to create a Win32 application interface to help user register an account from a website.The website have a form with a lot of controls which is not mandatory field, so my task is to create a form with a few controls and submit to the web server.What is the method that I should read about, is it HTTP Post/Get related thingy or is there any sample on how can I communicate the form action?

View 2 Replies

Calling Functions From One Class To Another And Using Multiple Forms?

Nov 21, 2009

The project requires a form that has textboxes for a students name and the amount of books they have read, and a label where the points they have earned for their reading is displayed. Also a seperate form with About information and yet another seperate form for summary information.

View 1 Replies

Forms :: Calling Other Project From Onclick Event

Dec 7, 2011

I have a question regarding VB.Net and Object-oriented programming.

I have a solution consisting of two projects.

One project is dedicated to the logic of the application, and one is only to show the Winforms form, and to reflect changes made in the logics project. In other words, when an array filled with various attributes residing in the logics project gets changed, then these changes should be reflected on the form (not that strange in theory).

Here comes the - for me - really tricky part:

I have created user controls, and these are residing in the forms project and placed on the aplication's form. When I click on any one of them, their respective onclick sub gets called okey, but how can I send a message to the logics project from their onclick subs? Basically, I'm not sure on what should be private or not, or possibly how to call the other project correctly. In any case, I can't get it to work.

To sum up: What I need is a line of code calling a class in another project, and someone telling me what should be private, static etc.

View 4 Replies

Forms :: Calling Sub From Two Forms?

Oct 2, 2010

I have a sub (stored in a module.vb) called from two forms.Subroutine simply fill a combobox with a database records. I need to fill another combobox (with the same name) in another form.Code is following:

Public Sub listNames()
Dim Cmd As New OleDb.OleDbCommand(strSQL, objconn)
Dim DataReader As OleDb.OleDbDataReader
Try

[code]....

If you see, this sub fill combobox in form frmAnagrafica; I would fill combobox in form frmSelection.Is there a simple way to identify form that call subroutine?

View 2 Replies

Calling Current Forms FormLoad Event On A Button Click?

Jun 3, 2011

is it possible to call form load event on button click

Following is the vb code i want same function in vb.net
Private Sub cmdaddcancel_Click()
Form_Load

[Code]......

in vb we simply call Form_Load is it possible in vb.net

For eg: IN VB.net currnetly i am on form no 1 and there is one button on click of dat button i want the current form should again load is it possible

View 1 Replies

Calling Methods In Forms From Embedded User Control Class?

Jul 21, 2010

control which will need to be reused in several forms in my program. It basically consists of several buttons in a panel. To start with, what I need to do is get the button values from the control into a text box on the first form. But I don't want to have a method calling the textbox directly from within the control, because then it won't be reusable in my other forms. Is there something I can do in VB like parentform.textbox.append for example, where you can generically call the methods of the form in which the control appears?

View 2 Replies

C# - Stop Developers From Calling System.Windows.Forms.Application.DoEvents()?

Mar 15, 2009

We just spent 300 man-hours fixing a buggy application in the field. It all came down to calling Application.DoEvents (re-entrancy problem).This was not caught in design reviews, code reviews.The code was inserted two years ago with the first version; the application was always "flaky" but recent changes exposed the re-entrancy problems to a greater degree. This incident is the second time in our organization that Application.DoEvents caused failures and multi-man hours of debugging.It was discovered in this case by simply noticing the call,buried way down in a complex event handler for an asynchronous task.What do you suggest to prevent this issue from happening again:

Add checkin gates to source control?

Developer training?

Code Analysis rules (why is this not already a built-in rule?)

How to I enforce a coding practice?

View 8 Replies

Forms :: Way To Return Multiple Rows Of Data To Calling Method Via Class Property?

Jan 28, 2009

I have this application which has one class. I need to return a recordset of data to the calling form. If i use Properties to return, it can only return only a single value at a time. Right now i'm returning a datareader object with one of the properties.Can anyone suggest a better way to return multiple rows of data to the calling method via Class Property?

View 1 Replies

Does Calling The Dispose Method On A Windows.Forms.Timer Call It's Stop Method

Nov 12, 2009

Does calling the Dispose method on a Windows.Forms.Timer call it's Stop method? Or should I stop the timer before I dispose it?

View 5 Replies

Forms :: Getting Error "reference Not Set To An Instance" When Calling A Sub?

Jul 16, 2009

The first sub calls LoadRaceTimer without a problem. The second results in a "object reference not set to an instance of an object" error. I can't for the life of me figure out why. All three are in "Public Class MainScreen".

Private Sub SessionsBrowser_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles SessionsBrowser.DocumentCompleted
...
LoadRaceTimer()

[code]....

View 5 Replies

.net - Application.Exit Raises `FormClosed` For All Open Forms From Calling Thread, Generating Invalid Thread Accesses?

Oct 31, 2010

My routine to check for updates is run as a separate process. Exiting the application is required to update, so a dialog asks the user, when an update is found, if they want to exit now. f they do, the code (from the update thread) calls Application.Exit().However, if the FormClosed event of any form that needs to be closed needs to access its controls, an invalid cross-thread operation is detected (which sounds pretty logical).

View 1 Replies

Forms :: Calling A Function From A Form To Another Form?

Jul 22, 2009

how to call a function from a different form. Like the button click event. i have this scenario. I have a main form and a child form in the main form there is a navigation panel on the left side controlling the child form. What i want is if clicking the add record in my navigation panel will call a function in the child form to execute.

View 1 Replies

Forms :: Exception On Calling Form1 From LoginForm And LoginForm From Form1

Mar 11, 2010

I have login form as start up form and i call Form1 after successful validation and in Form1, i have close button on click of Close i would like to reset username and password fields on loginform to null. If i add code in form1 below i get exception Dim fmLogin As New LogInForm

An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll

Make sure you do not have an infinite loop or infinite recursion

I get above on LoginForm below statement Dim fmMain As New Form1

View 1 Replies

Calling .NET Dll From C++?

Aug 3, 2010

I have a C++ application exe that uses a C++ dll. I don't have the source of this C++ application and cannot rebuild it. But I know that it uses the traditional LoadLibrary and GetProcAddress to access individual functions in the dll.For some reasons, I want to replace the C++ dll with a VB.NET dll. The dll is not and ActiveX and is therefore not registered.I think I cannot use a class but a module since the C++ exe application does not expect any class in the dll. In all my attempts, I could not have the inner functions of the VB.NET to be called by the C++ exe.How should I write the VB.NET dll?

View 2 Replies

Calling C++ DLL From .net?

Sep 16, 2011

I do realize that a number of questions regarding calling a DLL from vb.net have been raised. I have implemented the DLL from vb.net. I would like to know if the calling procedure is correct or should I be calling the DLL in a different way?

C++ DLL prototype

extern "C" int FitCurve(int solid_or_fluid, int prop_id, int fit_id, int N_points, int N_terms, char *file, double *x_data, double *y_data)

View 3 Replies

Calling C++ DLL From VB?

Sep 1, 2010

I'm not sure whether this is a VB forum question or a C++ question, but I'll try here first. I have an API library written in C++ (including source) which compiles to several DLLs. I want to call the functions in the library from VB but I can't get the parameter passing right.

[Code]...

The above example runs but returns nothing. If I change DeviceName to ByRef, I get protected memory errors.

The full library and documentation is available on the internet if anyone would like to download it and I've successfully compiled it with VS2010.

View 2 Replies

Calling C++ Dll In VB?

Dec 28, 2010

I have a dll which has one function and I want to call this function from Visual Basic 2008. I tried every solution, but I couln't get it to work,

The original declaration is the following in C++

extern "C" CSSM_API void GetOptimalCSSMShaderParams(
float* outProjMatrixArray
,float* outCtrlMatrixArray

[Code].....

View 1 Replies

Calling SAP RFC Using .Net?

Jun 9, 2010

I want to connect to SAP and call RFC from VB.Net 2008.I have done it with VB 6.0 But not getting success in VB.Net I used following code in VB 6.0

Set ctlLogon = CreateObject("SAP.LogonControl.1")
Set oConnection = ctlLogon.NewConnection
oConnection.User = "SIILRFC"

[code].....

View 8 Replies

Calling VB DLL From C++?

Jun 21, 2012

I have followed instructions on Best way to use a VB.NET class library from a C++ DLL? but being new to VB I don't know if I've got the VB part right let alone the C++. here I'll correct the code below for posterity's sake!

Here they are: VB first; the project is a Class Library, all settings default except that "Register for COM interop" is switched on in the project properties.

Public Class Class1
Public Sub New()
'do stuff

[Code]....

is the VB correct? Do I need to add anything like an interface to it? Assuming I want to call it over COM not C++/CLI, how do I do that. (This seems like the logical choice as the client already calls other stuff over COM; however, I'm not sure where to get the IDispatch pointer from, in my other code it's passed to me by the client). If I went the C++/CLI route, when moving up from toy project to actual implementation, that would mean changing my existing C++ code from "no clr support" to "/clr" - is that likely to break it?

View 1 Replies

Calling VB.NET From C++?

Aug 3, 2010

I have a C++ application exe that uses a C++ dll. For some rasons, I want to replace the C++ dll with a VB.NET dll. The dll is not and ActiveX and is therefore not registered.I cannot use a class but a module since the C++ application does not expect any class in the dll. In all my attempts, I could not have the inner functions of the VB.NET to be called by the C++ exe.How should I write the VB.NET dll?

View 4 Replies

.net - Calling A Sub And Returning A Value?

Mar 15, 2012

This might seem like an insanely easy question, but I cant seem to find an answer anywhere to it. I'd like to think that I am decent at VB but while I was learning javascript the other day I found something that seemed awesome and now I cant figure out how to do it in VB.in javascript it looks like this

var someValue = getThatValue()Its both calling and setting the value from the getThatValue() sub. what is the VB equivalent?

[Code]...

View 2 Replies

.net 2.0 - .Net Calling New Without Assigning Value?

Jun 10, 2010

In C# I can do this:new SomeObjectType("abc", 10);

In other words, I can call new without assigning the created instance to any variable. However, in VB.Net it seems I cannot do the same thing.New SomeObjectType("abc", 10) ' syntax error

Is there a way to do this in VB.Net?

View 3 Replies

A Calling Error With SAP And .NET

May 14, 2012

I was using .NET for development an SAP application but recently, it always shows me the message below:

failed to call remote function module

I didn't change any setting or source code. But it still has the problem.

View 1 Replies

C# - Calling Web Service From C++ V6

Nov 17, 2009

i have been deploy webservice in vb.net .

is there will be any problem if i will cal the webservice from c++ (version 6) or Microsoft Access VBA?

View 3 Replies

C# - Run.Cs Or.Vb Files Without Calling The In Asp.net

Oct 13, 2009

By security reason I ask this... Can .cs or .vb files to run in any way without calling those in asp.net?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved