.net - How To Get Text From Form1
Jan 15, 2010
I have 2 forms. In form1 i have a textbox called TextBox1 In Form2 i have another textbox called TextBox2.
I want the text from textbox1 to textbox2, i tried this.
TextBox2.Text = Form1.TextBox1.Text
Do i need to make changes to the first textbox?
View 4 Replies
ADVERTISEMENT
Jan 22, 2010
i have 2 forms.in form1: i have 1 combobox in form2: i have 1 textbox and 1 button...I want to make in form2 when i enter some text in the textbox and press the button the text to be added in form1 combobox
View 2 Replies
Sep 9, 2011
Using VB 2008:Situation: A Form1.BackgroundWorker calls a Form1.subroutine. That sub starts a Form1.Timer with Me.tmrOK_BlinkForm.Enabled = True...fires Timer code in event: Public Shared Sub tmrOK_BlinkForm_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrOK_BlinkForm.Tick
Form3.Visible = True
Form3.Label1.Text = gNowButtonDispText
Form3.BackColor = Color.White
Form3.Refresh()
[Code]...
There must be a way to do this, I just need the correct BackgroundWorker Syntax send Stop commad to Form1.Timer from Form3.Click_event...all inside a Form1.BackgroundWorker thread started in Form1.
View 4 Replies
Oct 27, 2009
In my window application, Form1 variable eg. Public str as string. value blank/null when move to Form2 and Back to Form1. How to maintain Form1 varable's value when back to Form1 In vb.net if any one know, reply me soon
View 2 Replies
Feb 16, 2009
I have got 2 forms ----- form1 and form2
i wanted to navigate from form1 to form2. and then close form1
i did the following code.
-sub form1 _ page load
dim form as new form2
form.show()
me.close
-end sub
i also tried -- form1.close() and form1.dispose() but all in vain
Problem is that my form1 is not getting closed
View 7 Replies
Jun 12, 2010
I have an aboutbox1 and form1..I also have a button. When I click the button it runs the backgroundworker. My background worker then opens form1.My backgroundworker doesnt just open it, it does alot of other stuff so don't ask why im doing it like that.My problem:When the background worker opens form1, form1 is not responding.
View 3 Replies
Oct 21, 2010
Which different abount Form1.Close and Form1.Dispose?
View 1 Replies
May 5, 2011
I have question about Label.Text.
When run the code Form1 load together with Form2.On Form2 I have Label1.I need that Label.Text flicker or blinking.
View 5 Replies
Feb 16, 2011
All of a sudden, my form is giving an error on the form1.text Error 53 Value of type 'String' cannot be converted to 'System.Windows.Forms.ToolBarButton'.
vs 2008 shows it occurrs in the InitializeComponent:
Me.Name = "Form1"
Me.Text = "MyForm"
I dont know but I must of unknowingly changed something and now I cant put text in the form header?
View 6 Replies
May 25, 2011
I have one question, I search it on google, this forum and many others bud could not find solution ...So I am taking this just for example :We are creating "Facebook automatic logginer". We have 2 textboxes, 1 button and 1 webbrowser (pic)
(we set on form_load WebBrowser1.Navigate("http://www.facebook.com") )So now what I need is :How to text from textboxes in form put on facebook login page ...
For example you enter Email: example@example.com
Pass: somepass and press button Log In it puts this text on facebook write it in same order and press fb button Log In.So you are automaticly loged in...
[code]...
View 2 Replies
Dec 8, 2010
I don't know how to move or save text from form1 to form2, text in form1 is in textbox and move or save it to label in form2.
View 10 Replies
Jun 21, 2010
i have 2 form and 1 dialog... the problem is when i select form2 as startup form i'm not able to copy text from combobox1 on dialog1 to textbox1 which is on form1 ... if i select form1 as startup form its working fine... i have placed code with form design as following ...
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]....
View 3 Replies
Jan 24, 2011
When I'm coding:[quote]Form1.WebBrowser1.Document.Body.InnerText()[quote]I want to delete some text from the InnerText(). How Do I do that?
View 1 Replies
Sep 17, 2010
how can i update Form2 Table1DataGridView firstname using Form1 Textbox.text?
View 5 Replies
Oct 18, 2009
I recently bought a barcode scanner for God knows what reason, just to play around and now it seems that its easy to sort out everything at house with it (e.g. Disc Collection). So I decided that I need a special program for it to get sorted with the collection. I am new to Visual Basic, but used to do programs with Java 6 years ago, but it doesn't seem to be any similar to each other. Basically I have a Microsoft Visual Basic 2008 and here is what I want to do:I have Form1 which contains of a textbox and a button (which will be Enter further), a textbox for total amount spent (which has to be calculated from Form2 and a nice background. I also have a Form2 in the same project, which contains 3 textboxes (Title, Price and the barcode numbers)So my problems are: As I said there are just 3 textboxes in Form2. Is it possible to copy Form2 three times on Form1 with different variables in text boxes? For example Form2 1st copy will have one Title in textbox, Form2 2nd copy will have another Title in textbox and etc. The Titles are in excel (.xls) file.That is a problem further, but my problem for now is how to make barcode scanner working. The barcode scanner basically reads barcode and inputs numbers in a textfield and automatically presses enter.As I am new, I do not know how to make this work. When I launch the program the textbox has to be selected rightaway, so that I do not have to use mouse. As it is selected I read the barcode and the numbers are in the textbox right away and Enter key is pressed (but I did not assign OK button with a Enter key and I cannot output anything now). So how do I assign the button with Enter key and the textbox? Now as the button is pressed (OR ENTER KEY is pressed) The text in the textbox has to be selected again (so that I can input a new barcode) and Form2 has to be called on a certain place of the screen (e.g. 200x100px is the starting location).
Now when the Form2 was called it read the data from Excel spreadsheet and now the textfield in Form1 is ready to input new barcode. As new barcode was read the same situation is happening, but now the Form2 is copied into a new place with new parameters (e.g. 300x100px is the starting point).Same for the third time, but on 400x100px.For the fourth time the Form2 is not copied again. However the parameters of the third copy are getting the new data. Parameters of the third one are going to the second copy, second copy to the first one and the first one is stored in a text file or somewhere else to use further. (I wanted to use up and down buttons to search for what I have scanned)
View 2 Replies
Mar 11, 2011
is there any way to make the form title(form1.text) moving?like marquee in HTML?
View 2 Replies
Apr 8, 2010
I need to be able to start with Form1, move to LoginForm, then back to Form1 taking 2 variables and the "values" they have in the LoginForm back to Form1 and using the variables. I start with the main form (Form1) and have the user enter some information. Once they click OK I have the LoginForm open. After they enter their credentials I will check to make sure they are legal users, then go back to Form1 (here is where I need to take the Username and Password with me) to log onto a server using the same credentails from the login form.
View 1 Replies
Jan 9, 2010
I have these code in my project one from my lecture one that i did myself [code]what is the difference between "dim" something as new form than using the form name straightaway?
View 2 Replies
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
Mar 26, 2012
I want to capture Form1 window, not what is on top (what I actually see).
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
[code]....
It captures what is on top, for example: I have firefox on top, so in myPic.bmp will by firefox, not Form1 window. So, how can I do that when some programs are on top, it captured Form1 window?
View 3 Replies
Aug 3, 2009
How to make in VB08 Background image to be .gif animeted I put the picture that is .gif for background image but no effect from the image how to fix it?
View 7 Replies
May 24, 2011
I may have corrupted my Visual Studio Software. I have two problems which may be related. The first is when I open anew project, I can't change the name of the form. I enter frmXXXX and it returns a splash box indicating I may loose my programming. If I continue the program gives me an unusable form. This happens when I have not even begun to use the form. My Visual Studio is set up to work with Visual Basic only.
Secondly, when I try to incorporate events, I can not get them to function. Using the basic form set as Form1, the Load event will work, but it enters as "Private sub Form1_Load ........ Handles MyBase.Load not Me.Load. When I try to use the events: KeyPress. KeyDown Or KeyUp, I can't get them to function. They also are entered as ........ MyBase.KeyPress. To enter an event I go to the Properties Menu, and use the event enry, click on the function, then double click the function. The sub-routine is loaded into the program, but doesn't function. I am learning by using a text book that the same programming works in a demo which was downloaded.
View 6 Replies
Jun 2, 2011
Well i meant In Form1 theres an object named NUM in which i have Stored Few values Now i want to use this Object NUM in form2 so that i can display its value in Form2.. ima unable to access it in form2.
View 6 Replies
Sep 18, 2011
if in vb.net, I can call like this form2.show (), but how in wpf vb.net?
View 1 Replies
Apr 1, 2010
My program has two forms. Let's call one Form1 and the other Settings. It's possible that Settings may be opened before Form1. Settings may also change some settings that need to be updated immediately on Form1. The thing is, if Form1 hasn't been opened yet, certain elements haven't been fully initialized (even tho Form1's properties can be modified since I do create an instance of the form on program load). Since these elements haven't been initialized, if Settings tries to modify them, it crashes the program.
Are there any ideas how, maybe to keep Settings from modifying stuff on a form that hasn't been loaded yet for the first time.
View 15 Replies
Oct 18, 2011
I have a class called class1, in that class i wan;t to write something in a textbox in form1, but it won't let me access Form1.TextBox1.text, another problem is that it won't give me the save dialog in excel, but thats another problem.How can i acces Form1 controls?
Form1 code
Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call ThisDrawing.GetFilepath(True)
If Me.TextBox1.Text = "" Or Me.TextBox1.Text = "False" Then MsgBox("Er is geen geldige filenaam opgegeven")
End Sub
[code]....
View 1 Replies
Oct 22, 2008
I am having problems making changes to form1 from form2..I tried declaring form1 on form2 Dim f1 as form1.[code]I can change form2 from form1 but not the reverse.
View 5 Replies
May 25, 2009
In my application I am using some sort of 'FirstRun Wizard' to make basic settings such as data path, theme settings and other adjustments before the application starts for the first time. I am using the following at Application Start to accomplish that:
If My.Settings.FirstStart = "1" Then
dlg_FirstRun.ShowDialog()
Me.Hide() 'Form1 - my main form
End If
Now, my "FirstRun" dialog has a Cancel Button and I want the application to exit entirely if that button is pressed. At first I used Application.Exit() but it looked a bit strange because my Form1 gets shown for a fraction of a second before the application closes. With Form1.Close() I can do the same thing and the advantage is that my form does not show up at all. However, I wonder if this is a save way of doing it?
View 5 Replies
Nov 21, 2011
this looks like to the forum I need. I have a question on somethings. My data is pulled from a local SQL sever express. First, Form1(Customer) has has data. his customer has a vehicle in another form this form is called (Vehicle) form.I have created the customer form in a detailed form and the vehicle form on a grid design.
View 1 Replies
Mar 27, 2009
I have been converting my VB6 programmes to VB 2008, and I am beginning to regret it.According to the books that I am reading on the subject, I can call a second form from the first one. That is, when the first form code has completed, and the final line reads:
frmForm2.Show()
the second form should open and wait for input.This does not happen, the form flashes and then disappears without allowing any input, or button click.I must admit that I preferred being able to start from a module, with a Main() sub, which then read the forms, a la VB6. everything seemed to work fine then.
View 16 Replies