How To Load Form2
Aug 10, 2011i have 2 form..which is frm1 and frm2..my mainform is frm1 how can i load the form2?
View 9 Repliesi have 2 form..which is frm1 and frm2..my mainform is frm1 how can i load the form2?
View 9 RepliesThat's all I want to do but I get errors when I do this:
Form2.show ()
Me.close ()
Using VB2008
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show()
Me.Close()
End Sub
i have this code on my MDI parent and on button click i would like Parent to close and form2 to load/show.yet with current code when i click button it closes all the app and doesnt load from2
What im trying to do is load form1 and form2 at the same time.I have a setting called hideform2.So when i run both forms at the start up i want to get it so when they click on a close button and form 2 hides.I want it so when they run the application again it dosent show form2 anymore?
View 5 RepliesI have tried to use Form2.show vbModal but "vbModal" underlines with a blue error line. I have a second form I wish to pop up and get some data before Form1 code continues. I will have a button or some other means to close the form then I wish Form2 to take that response and go...
View 9 RepliesI have 2 forms
1. Form1
2. Form2
It always loads Form1 but never Form2 when i press the play button.How can i make it load Form2 instead of Form1 when i press the play button?
How can i get form2 to to load exactly center of form1 or a location within the form when i get form2 to show, no matter the location of form1.[code]...
View 10 Repliesi need to pass on some variables from FORM1 in to a procedure in form load event of FORM2 to say in another way i need to run a procedure (which uses variables of FORM1) which is derived in FORM1 class and in FORM2 load event
View 3 RepliesSomeone told me that i should stick with method #2, form2 has an id that form1 passes in order to load information from.
method #1
CODE:
method # 2
CODE:
Last one day I could not manage to pass data from one form2 other form.
When I am opening Form2 from Form1, I can pass data from Form1 to Form2.
When I am closing Form2, I want to pass data from Form2 to Form1 which is still open when I close form2.
I try to use shared textbox, but I understand that this is nt supported.
I'm trying to execute different code depending on the button clicked (button 4 or 5) on Form1, but when I click on button5 to activitae the code on the Form2's Load event everything is Ok, but when I click the back button to return to Form 1 and click on the Button4 to activate the code on the Form2's Load event again, it doesn't active the Form's Load event, is there a way to form the form load event every time I access it from Form1? [code]
View 7 RepliesI have 2 forms. On form1 i have listview on form2 i have menu. I'd like to call form2 menu from Form1 ListView1_MouseUp. I tryed to use this code
[Code]...
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.
In my scenario when i press the "Get Book Details " of the Form1 , it will redirect to the Form2 , in the form load of Form2 a datagridview is filled with values along with the checkbox column and the desired rows of all the columns are selected and when OK button(form2) is pressed the selected rows should get populated to the datagridview of the form1.But i m not getting the selected rows to the form1t.
View 1 RepliesWhat I am aiming to do is when the user logs in Via MySQL query once they have loged in it will switch to form2.vb and there will be the users information displayed. else check your password and stuff.
View 4 Repliesif in vb.net, I can call like this form2.show (), but how in wpf vb.net?
View 1 RepliesI 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 Repliesthis 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 RepliesI 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.
I made 2 form.
In form1 I have this:
form2.show()
form2 ends up behind form1, how can I make form2 appear in front of form1?
Form2.showdialog() will make form1 disappear until form2 is closed, that is not what I want.
There is no session in desktop app in vb.net .i want to transfer valuse from one form to other want to transfer form 1 (TextBox1.Text) value on form2 (objuserpage.Label1.Text)
'form 1=userpage.vb
Dim objuserpage As New userpage()
' form 1 textbox TextBox1.Text[code].....
I have two forms. In form 1, I have a textbox1 and in form two, I have a textbox2 and a button1. Now what I want to do is, write in textbox2 (That is in FORM2) and when I press the button, it just go to textbox1 (That is in FORM1)
View 3 RepliesI have a panel to form2 on my form1 which displays a picture box fine. I got a peice of code that stores 5 images in an image list and works off a keypress.
When I press the Comma key the image changes to the next one. This works fine on its own but when I put it in form2 and try to put the keypress code on form1 for it to change image in the panel it doesn't work.
Public Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim player As Integer = 2
End Sub[code]....
If I click button two it will pass variable player to form2 .If I click button three it will pass variable player to form2 can't seem to pass gas much less a variable,need to pass plater to form2
I have 2 forms. Form1 and Form2 When the user calls for a new record to be created, Form2 shows modally centered in form1. I have disabled the control box and need to stop the form from being moved by the mouse. I do not see (Movable) in the properties list.
View 3 RepliesI have been searching for days and have come up stumped. My applcation opens with Form1. There is a menu bar with a Tools menu. Under Tools is Options which opens Form2.Form2 contains a combobox which I need to use to control an IF on Form1.
Public Class Options
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ALSuffix.SelectedIndex = My.Settings.ALSuffix
End Sub
[code]....
I have tried SelecetedIndex, SelecetedValue and a number of other options.
I need search code for Form2..
What is in Form2:
2-TextBox's :
: 1 Texbox is where will appear the text when someone open a .bmd file
: 2 Texbox is what word to search in texbox1 when is opened (else if its not opened file to show error that is not opened file)
1-Button that when it is pressed to start searching in texbox1 for that word what is in Textbox2
I would like to do 2 things (or one of the two)
first, I have in form1 a textbox1 and i would like to bring the info of it to a textbox (or label) in form2
second, If it's possible i would like to set a picture from form1 to form2 (if that's possible)
In the FORM1, the datagridview contain some product column and user can input the number of product quantities they want to buy.if user press the "buy" button, i want it to open FORM2, with datagridview containing the list of the product they buy from datagridview in FORM1.[code]...
View 1 RepliesI have an equation on Form1.vb that calculates a number. I need that number to be used in another separate formula that's on Form2.vb. How do I do this? I thought using a Module would work but I can't get the function on the Module to "see" the formula and/or variables that I need on Form1.vb. I am using VB 2005.
View 8 Replies