Pass A Counter From One Form To Next?
Mar 24, 2010
I am a new vb.net 2005 user and new to this forum.i need to know how u can pass a counter from one form to the next.am developing a computer based test and questions are on different forms so i need to know how the mark for a test can be maintained and added to from one form to the next.
View 6 Replies
ADVERTISEMENT
Apr 8, 2009
How do I get my form to display a simple digital counter? I have a "record" function on my program:
Private Sub Button13_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0)
mciSendString("record recsound", "", 0, 0)
End Sub
I want to have a simple digital counter display while the program is recording. That way the user can know how long the audio is so far while recording. Then when the user is done recording, the timer will stop.
View 5 Replies
Jul 2, 2011
I've got a project that generates a sql query and returns the results. I want to place a time/counter on the form that shows how long it takes to return the query from the server. Basically to count up in seconds from 0 while that sub is executing. Would threading be the best way to do this or is there another way that I'm missing?
View 2 Replies
Apr 19, 2011
I would like to know how I can read a number from a text file then multiply that figure by one and write that back to the original text file, I'm trying to make a counter to keep track of how many times my forms are executed. The information will then be used to determine the success of my apps with in our company.
View 1 Replies
May 20, 2010
I have this code sample from a book I'm reading which looks to be incorrect:
Imports System.Diagnostics
Sub Main
Dim pc As New PerformanceCounter("PerfApp", "Clicks", False) 'excepiton here
pc.Increment()
counterLabel.Content = pc.NextValue().ToString()
End Sub
There excepion message I get is: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly. I looked for a property to see if I can set it but couldn't find one.
View 3 Replies
Mar 15, 2009
Most of my experience in Visual Basic programming is in VBA. I'm currently trying to build a VB.NET Windows application that basically consists of a form that has one button and one label. When the button is clicked, the label should serve as a "counter" that counts from 0 to infinity until the user closes the window with the "x" button. I do this by putting a loop with a sleep statement in the onclick sub. The loop iterates the integer that is displayed in the label and does a "Me.Refresh".The problem is when the window loses focus. When it loses focus (when I click off of it), the counter stops. Even when I click back on it, the counter doesn't resume.
View 19 Replies
Jan 22, 2011
how to pass value from one form into another form...? for example if i have 1 mdiform and 2 form (form1, and form2) for load form1 i'm using system.reflection.assembly here is the code for load form1 :
Imports System.Reflection
Private Asm As Assembly
Private FrmNama As Form
Public Function GetForm(ByVal FormName As String) As Form
[code]....
after form1 load i call form2 from form1 and from form2 i want pass value, here is the code from form2 to pass value into form1 :
form1.textbox1.text = textform2.text
why value from form2 can't fill into textbox1 in form1?
View 15 Replies
Nov 24, 2009
how to pass a value from an Independent form to a Child form...
here whis is the data from..
the indenpendent data is selected from the datagridview by just double clicking the cell the selected data will pass into the combox of child form (Note: this is combobox not textbox)...
i'm done with textbox it work fine..
look:
Independent form when user duble click the datagridview
Private BoxToUpdate As TextBox
Public Sub Start(ByRef DescItem As TextBox)
' Me.Close()
[Code]....
how could i able the value into combobox from independent form into child form...
View 1 Replies
Jun 10, 2011
I have one form, which the user enters upto 5 websites then clicks go - I have on the second form, the one with the webbrowser. timer which checks if the web browser is busy then either a green light or black image will be shown along side the assocaited input box on the first form. I am finding it impossible to feed variables into the clock through ByVal, like I would a subroutine or function.
[Code]...
View 4 Replies
Sep 20, 2011
i had no idea how to pass a value from one form to a database in another form...i was using the vb 2008...
View 2 Replies
Jun 3, 2009
how could i pass the value from Independent form to a child form..in my declaration from MDIParent form i declared child form as frmSMRP then in the frmSMRP i have declare one new form as form1
here is my code below.declaring child form under MDIParent form
[Code]...
View 30 Replies
Aug 26, 2009
Is it possible to pass a variable set in one form to another?
View 12 Replies
Sep 15, 2009
Assuming that I have a datagridview or a listview populated by value (form 1), then here I have a command button to edit (form 2, details in text boxes) a selected record from the grid or listview, now, the edit process is done, how can I then, pass these values to datagridview from the other form (form 1) and update or refresh the grid then close the form 2 as if it is not been opened?
View 6 Replies
Apr 27, 2009
I have a problem with passing the value from a Form that "user should choose a start date and end date" to a Form that display the result in a Crystal Report Form[code]...
View 1 Replies
Feb 23, 2009
How to pass a textbox value in one form to a variable in another form. i want to store "UserName"(textbox value) from the "UserAccount" Table to a variable in the "invoice" form.
View 15 Replies
Mar 17, 2009
I have one form Form1, which opens another form Form2 from within one of its procedures.Now Form2 needs to do some processing of data, and populate a list. The user selects a value in this listthe value back to the already open Form1 (not to a new instance of Form1). How do I accomplish this?I think I will need to define and raise events for this, but I don't know how to go about it.
View 1 Replies
Sep 3, 2009
"how to pass the value from current form to another form"
View 4 Replies
Sep 11, 2010
I know this has been asked, but can someone look this over. I have been going over and over this for about 3 days now. In my main form(frmBuildings) I pass a value to frmCustomerInformation like this.[code]...
View 3 Replies
May 27, 2009
When working with a collection of forms that the user must step through, is it better to pass the data foward when creating a new instance of that form, or is it better to call a function from the previous form? I have some code written that calls the previous routine, and it looks ugly, and I can't quite think of a reason why it was done that way. The only reason I could come up with was if the data was large, and there was a good chance that the user wouldn't use the data except in a special case.
View 7 Replies
Jan 29, 2012
I'm trying to pass a value from the main form, "form1" into "form2". I'm opening "form2" as a modal dialog from this line of code:
form2.ShowDialog()
View 4 Replies
Nov 23, 2009
i got the output of my project and it is displayed in the RT BOX and saved locally.. the values are stored as arrays.. the RT Box will display three values time, conc and preconc.the time, conc and preconc values are stored as arrays. my problem is, i should pass this values to the next form FORM2.VB.. and display the values in a graphical format.how to pass these arrays from one form to other??
View 1 Replies
Nov 4, 2009
how can u pass your array to another form
like example
FORM2
public test(2) as string
test(0) = "test1"
[Code]....
how can i get the value from the array test(0) in form 2 to in my textbox in form 1?
View 3 Replies
Jan 14, 2012
My plan is depending on the users screen resolution a different form will open. Thats all fine and works hunky dory.
However, the form pulls code from a public sub and updates fields on the form based from the public sub[code]...
My problem is how can I change the FORM1024x768 to say FORM1366x768 if the users screen resolution determines a different form is chosen. I need something like[code]...
View 7 Replies
Sep 28, 2011
i have a form that I need to do two separate functions, however about 95% of the code is the same it's just that last 5% so I don't want to create two forms. What I would like to do is when I click on a button to open the form pass it a variable or something so I can determine which of the two buttons were used to open the form.
Basically if Button1 is clicked do this if button2 was clicked do that...
View 1 Replies
Aug 6, 2009
Can we have a constructor for a form. so that we can pass parameters to a form ?
View 3 Replies
Mar 21, 2011
I am try to pass the text input into the text boxes in form ( OrderScreen) into the text boxes in( PrintOrderScreen)I don't get any error it just does not pass the text over to the second screen.
the text boxes with OS at the end belong to (OrderScreen : txtCustomerSurnameOS)
and the one without belong to Print order screen
Here is the code on print order screen
[code]...
View 5 Replies
Mar 10, 2010
trynig to pass data between form in first form [code]the problem is when i select "Yes" next form is not showing .i tried directly to run the last form. but its not added in the startup form list.i am getting error form2 is an type under windowsapplication1 and cannot be used as expression in application design.vb.
View 2 Replies
Jun 8, 2011
I have one form, which the user enters upto 5 websites then clicks go - I have on the second form, the one with the webbrowser. A timer which checks if the web browser is busy then either a green light or black image will be shown along side the assocaited input box on the first form.I am finding it impossible to feed variables into the clock through ByVal, like I would a subroutine or function.
Private Sub ActiveMe_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ActiveMe.Tick
If ((WebBrowser1.IsBusy)) Then
Hey.BackColor = Color.Black[code]....
'Error message says Hey is not declared, as i can't pass it through to timer
The variable Hey is determined by the first form - Which picturebox.I have an if statement which simply says if inputbox one has url enter then Hey = Picturebox1, If input box2 has url entered then Hey= Picturebox2 etc.What I want is the timer to check the page has completed loading or is still loading or refresing and the appropriate green or black to be shown aside url input box on first form.I considered using a sub or procedure to act as a clock (a large for loop with another for loop within it, acting as a delay). But found this slowed down theapp to the point of crashing it.
View 1 Replies
Jul 17, 2010
I want to pass variables from one form to an other. The variables i I need in the second form( called" Hulsview") are :" hulsbreedte" and" hulslengte". To check if the varibles are passed I added a textbox in the second form,called" hulsview" to check the variable" hulsbreedte". The value selected in the combobox on on form1" hulsbreedte = HulsBreedte1.SelectedValue" returns always 0 in the textbox on de second form.
Here is the code form1:
Imports System.Drawing.Drawing2D
Public Class Form1
Inherits System.Windows.Forms.Form
Public hlb As Point 'not used
[Code] .....
I am using vb express 2010.
View 1 Replies
Aug 29, 2011
I am building an app that has a number of buttons that will essentially be loading forms into panels.Which button loads which for needs to be user configurable and I am trying to come up with an elegant solution to this.I can hold the user Config and have it load into a datatable; e.g.:
Form Control
Visible Text
Function
[code].....
How do I get the button to pass the configure Form to the Sub
Private Sub btnF13_Click(byVal Sender.Object, ByVal e As System.EventArgs) Handles btnF13.Click
LoadForm(....some sort of lookup that passes back a Form Object?....)
End Sub
View 1 Replies