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


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

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

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

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

Basic Application(windows Forms) Doesn't Exit Properly After Navigating Through Forms

Jul 9, 2010

I have a basic three form application. It doesn't seem to close after navigating through forms. If I were to open the application, and the main form is displayed. If I press the X button, the application closes fine(Goes from processes) If I were to open the application, and then navigate from the main form to another form using me.hide & form1.show, and press the red X on Form1, the application again, closes fine.

[Code]...

View 6 Replies

Forms :: Visual Studio 2010 Windows Forms App Screenupdating Property?

Jun 4, 2011

.NET developing and have a simple question, i've been stuck on this for a while and searched many forums first with no solution so i'm posting myself. In VB for excel i've used Screenupdating=false to disable the screen updating however now i'm creating a visual studio 2010 windows forms application and its not showing up as a property. Here's the code i've tried.

[Code]...

View 4 Replies

VS 2008 Adding A Method To All Forms Existing Forms Without Changing Their Code?

Jul 28, 2009

just wondering if it is possible to add a method to all forms in my project without having to do it on one form and Inherit all my other forms from that one

View 3 Replies

VS 2010 Multiplication In Forms - Multiply 2 User Input Numbers In Forms

Jun 22, 2011

I'm using VB 2010 and need to multiply 2 user input numbers in forms, so basically: TextBox5 = TextBox2 * TextBox3 That obviously didn't work but it shows what I want it to do.

View 3 Replies

Forms :: Thread And Updating Forms - Set Options And Start The Encode By Spawning A New FFMpeg Process

Sep 21, 2010

I'm working on a website where we'll be getting a lot of videos to be uploaded. To keep things simple and secure, I'm just writing VB.net windows app to suck all the files in a directory in, allow you to set some options, and start the encode by spawning a new FFMpeg process.

[Code]...

View 5 Replies

Application That Has Multiple Front Ends Developed Using Windows Forms / WPF / ASP / Compact Framework Mobile Forms

Apr 9, 2010

I have the requirement to create an application that has multiple front ends developed using Windows Forms, WPF, ASP and Compact Framework Mobile Forms.I would like to be able to create a series of obejct representing the business logic and have this logic accessible from the various front ends available. My first thought was to use remoting as I'd like to be able to pass the business objects back and forth between client and server but the compact framework doesn't support remoting and also transferring a full framework business object to a compact framework business object doesn't seem possible.My next thought was to use web services but again the passing of business objects seems to be very hard to accomplish. Without doing this I would have to create individual web methods for each business operation.

Finally my next option is to use sockets and write the whole client/server logic within some classes and expose them to the UI/Business layer. My only problem with this is it is not scaleable should the number of clients increase dramatically whereas using remoting or web services I can host the solution via ASP.Net.Does anybody have an ideas on the best way forward for this or even have any input on how they would write an application that required a windows form, wpf, asp website and mobile device GUI all of which want to use the same business logic?

View 3 Replies

VS 2005 - Gotchas With Docked Forms - Forms - Displayed Using Menu Items To Display Information To User

Nov 10, 2011

We have an application that has a main form with a map on it. Right now the paradigm is to have forms that are displayed using menu items to display information to the user. Most of these forms are modal forms, but a couple are non-modal forms that interact with the map. For some of the forms, it really would make for a better user experience if we could dock them in the main form of the app and allow the user to see both the form and the map. For instance. We could have a list of map features in a docked window, and select one of the items on the list and have the map zoom to that feature. Or do the reverse: let the users select a map item and have a docked window that shows details of the feature. Sounds great, but I wonder about what sort of gotchas we may encounter. In particular, what if we have two windows docked at the same time? Could we get tangled up in our event code?

View 2 Replies

Forms :: Startup A Second Windows Forms Inside The Parent Form?

Aug 26, 2010

I would like to know if its possible to start up a second windows forms inside the parent form. Ex: A button is pressed and a new form is showed. I would like to keep that new form inside the parent form, and have it not be able to go outside the parent form.

View 2 Replies

Forms :: String Cannot Be Converted To System.windows.forms.label

Mar 31, 2010

I am writing a program for my A-level coursework But for some reason I got this build error this has never occurred to me before, I have no idea why I can't use string for the name of my form.

View 8 Replies

Forms :: Windows Forms App Copy A File To A Preset Folder?

Jan 9, 2012

a program and i need to have a button put a file into a folder, i know how the button works i already have it doing some other stuff. i just don't know the code to copy and past it to a folder.

View 1 Replies

Inherits System.Windows.Forms.Form Is Missing In New Forms?

Mar 5, 2012

When I add a new, empty form to my VB.NET VS9 project, the linenherits System.Windows.Forms.Formis missing.What am I doing wrong here?I thought it would be added automatically.I experienced that some thing get weird if this line is not there (Form_Load is not firing, I think).

View 3 Replies

Passing Data Between Forms Without Any Public Methods Or Properties On The Forms

Dec 28, 2009

Passing data between forms without any public methods or properties on the forms. everything but the "Controller" class, which I would like you furnish. I just changed the title from "Intermediate" to "Beginner" This solution is an example of the Observer Pattern. The "Controller" class is the "observed" class, which in this case means it publishes events.

' File Definitions.vb

Public Delegate Sub MessageDelegate(ByVal sender As Object, ByVal e As MessageEventArgs)

Public Class MessageEventArgs : Inherits EventArgs
Public Message As String

[CODE]...

The program should initially display Form1, and Form2. Clicking of the button on either form will modify the Title Text of both forms. I think that you will find the final end result to be pretty neat, as it works with any number of open forms not just two. I think asking for the Controller class is easier than asking for the code in the forms. My solution for Controller class has 7 lines of content, 9 lines if you include Class, EndClass. A minimal solution could achieved with only 4 lines of content, but it would a textbook example of bad programming.

View 12 Replies

VS 2010 Coding Forms - Creating Some Forms And Message Boxes?

Dec 25, 2011

I'm looking forward to reading and adding more to the community here. I've created a text based rpg. Next semester we are learning Visual Basic. I'm on winter break and I would like to get a head start on my learning. I've been working on creating some forms and message boxes. What is throwing me off, is that I have a good feel for doing coding so that I get functionality the will produce effects in a console. Coding the forms is a bit confusing for me. Is this something that others have run into? Is their some good primers for VB? I don't have my text books yet.

View 10 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







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