Load Form2 When Button Clicked On Form1?

Mar 16, 2009

That's all I want to do but I get errors when I do this:

Form2.show ()
Me.close ()

Using VB2008

View 8 Replies


ADVERTISEMENT

Press A Button - If I Clicked The Button In Form2 It Would Automaticlly, Click The Button In Form1?

Oct 30, 2010

Using 2 forms how would I click one button, from another form? ie In VB 4,5,6, I would used to do it as:-

Form 1:

private sub Command1_Click()

msgbox "Say Hello"

End Sub[code].....

If I clicked the button in form2, it would automaticlly, click the button in form1. Do I, do it the same way in VB Express or has it changed?

View 5 Replies

For Each Method - Search If A Name Exist On The Form1's Listview If The Button Is Clicked From The Form2

Oct 5, 2010

I am trying to search if a name exist on the Form1's listview if the button is clicked from the Form2. But for somehow, I don't know why my code is never get fired. Can someone help me with the following code.

Private Sub Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn.Click

Dim f1 As New Form1()

For Each itm As ListViewItem In f1.lv.Items

[CODE]...

View 5 Replies

Load Form2 Instead Of Form1 When Press The Play Button?

Nov 24, 2009

I 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?

View 1 Replies

Code Missing In Form1.Load So When The Button Is Clicked

Dec 27, 2009

You have a form with 5 Textboxes and 1 button.

Write the code missing in Form1.Load so when the button is clicked, Textbox5 takes the value Done

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, _

[CODE]...

View 16 Replies

VB 2008 Close Form1 Load Form2?

Sep 19, 2009

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

View 3 Replies

VS 2008 : Load Form1 And Form2 At The Same Time?

Jun 21, 2012

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 Replies

Load Form2 And Pause Form1 - VbModal Underlines When Try To Use It

Nov 1, 2010

I 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 Replies

Load Form2 On Top Of Form1 Everytime No Matter Location?

May 25, 2009

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 Replies

VS 2008 Run A Procedure Of FORM1 In Load Event Of FORM2?

Mar 18, 2012

i 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 Replies

Method - Form2 Has An Id That Form1 Passes In Order To Load Information From

Jun 9, 2011

Someone 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:

View 7 Replies

Button Click On Form2, Run Private Sub On Form1 That Is Also Open?

Apr 25, 2010

I have two forms. Form 1 you click a button, and it opens Form 2. Form 1 is still open.

When you click a button on Form 2, I want to run a Private Sub that is on Form 1, whilst Form 1 is still open.

The idea is that the data i've entered on Form 2, once I close this form, I can continue working with Form 1 with the updated data without having to close and re-open it.

View 2 Replies

Display Same Button(button1) In Two Different Forms(form1 And Form2)?

Dec 22, 2011

Suppose, i have a button(button1)in form1.

Now i have opened a new form.

I want to display the same button(button1) from form1 to form2.

View 2 Replies

Form1 Has A Button On Click That Opens Form2 As A Show Dialog?

Jun 19, 2009

MDIform contains Form1. Form1's MDIParent is set to MDIform Form1 has a button on click that opens Form2 as a show dialog. I need this Action.Form2 has another button that opens Form3.Is there anyway that I can make Form3's mdiparent the original MDIform by passing Form1.mdiparent value to form2 (without actually setting that value) that then passes it to form3?

[Code]...

View 9 Replies

Pass Data From Form2 To Form1 When Form2 Is Closing

Nov 29, 2009

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.

View 11 Replies

How To Force Form Load Event On Form2 From Click Event On Form1

Nov 16, 2010

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 Replies

Forms :: Form Variable Value Blank / Null When Move From Form1 To Form2 And Back To Form1

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

Windows Applications - When Button On Form2 (child Form) Is Clicked, It Raise An Events

Mar 15, 2009

I have a windows applications. Form 2 is child form of Form1 . Basically when button on form2 (child form) is clicked, it raise an events, which writes something in testbox on form1 (parent form). This is my code

parent form form1

Public Class Form1
Public mycount As Integer

[CODE]..............

This is the first time I am tring to use events.. I am not sure what's going wrong.. the textfill event is never called from form1.

View 12 Replies

Forms :: Navigate From Form1 To Form2. And Then Close Form1?

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

Pass A Value Bounded With A Button In Form1.aspx To Form2.aspx?

May 2, 2011

Im trying to pass a value bounded with a button in form1.aspx to form2.aspx

form1.aspx:
<asp:Button ID="Button1" runat="server" Text="Button" CommandArgument = '<%#Eval("Parking_ID")%>' />

[code].....

View 2 Replies

Call Menu From Form2 To Form1 Like VB 6 Do "Me.PopupMenu Form2.mymenu"?

Dec 15, 2009

I 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]...

View 3 Replies

Label Text - When Run The Code Form1 Load Together With Form2, Label.Text Flicker Or Blinking?

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

Load Program With A Specified URL When A Button Is Clicked?

Jul 31, 2009

Is there a way to load Internet Explorer with a specified URL when a button is clicked?

View 3 Replies

Call Form2 From Form1 In Wpf

Sep 18, 2011

if in vb.net, I can call like this form2.show (), but how in wpf vb.net?

View 1 Replies

Changing Form1 From Form2

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

Form1 Related To Form2?

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

Form1 To Open Form2?

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

Form2.show End Up Behind Form1?

Apr 1, 2012

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.

View 11 Replies

IDE :: Transfer Form1 Val To Form2 ?

Jun 29, 2009

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].....

View 2 Replies

Panel To Form2 On Form1?

Mar 25, 2011

I 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.

View 4 Replies







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