Display Form2 Modally In VB 2008?

Mar 31, 2009

I have two form (Form1 and Form2) in VB 2008.I would like to display Form2 modally. When Form2 ensues closed event I ask a question (displayed Yes/No messagebox), BUT if I clicked No or Yes button the Form2 always will closed.

Here is the code:

'Form1 code:
'------------
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[code]....

View 3 Replies


ADVERTISEMENT

VS 2008 Non-modal Form To Act Modally?

Aug 17, 2011

All of my forms are MDI children. I have one form that is collecting input parameters for a report. One of the parameters needs to come from another form. For the life of me, I can't get it to work.

[Code]...

I have to message box code just to verify the selection. glbPart is just a hand off parameter to tell the frmVendorList code to come back to this form rather than where it was origianlly programmed to go.I tried a do until glbVendor <> "", but that put me into a death loop and I never got to select a vendor from the vendor list form. Obviously, the easiest would be if I could make frmVendorList Modal, but I can't see how to do that once it's been created modally.

View 26 Replies

VS 2008 - Using Form2 To Display Informaitonal Messages Without Having The User To Press The OK Button?

Jan 2, 2010

I have an app that I'm using Form2 to display informaitonal messages without having the user to press the OK button. I DIM form2 as a new form as a global and then add a lable to it on the fly and then control it's appearance with a timer. This all works great providing the main form is being displayed however I can't make Form2 show up if the main form is minimized or hidden. I can get around this a bit by keeping the main form maximized but change it's Opacity to zero but once I do that I have no idea how to return the Opacity back to normal when I do want to see the form. Anyone have any ideas on how to make Form2 display if the main from is minimzed or how to control the Opacity of the main form so I can return things to normal? I was thinking that there might be something I could do with hovering over or clicking on the icon in the taskbar but I don't know what that event might be.

View 5 Replies

Display The Contents Of Textbox1 On Button2 In Form2

Dec 20, 2010

I got 2 Forms. Form1 has a textbox1 & a button1, which when clicked takes you to Form2. Form2 has a Button2.The user types some text into textbox1 & clicks button1.I would like to display the contents of textbox1 on Button2 in Form2.

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

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

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

VS 2008 Form2 Will Not Open

May 25, 2009

i have 2 forms, in form1 i have a button that use to redirect to form2. [code] An error occurred creating the form. See Exception.InnerException for details. The error is: Navigation to a relative URL unsuccessful.

View 25 Replies

VS 2008 - Run Sub Created In Form1 From Form2

Mar 17, 2009

I am in the process of creating an excel add-in. I have created a subroutine inside one form. Using a second form, I would like to run the subrountine if the "OK" button is clicked. How do I make this public subroutine availiable between forms?

View 2 Replies

VS 2008 Accessing Form1 From Form2?

Sep 25, 2011

I'm my original post here and the code in post #1HTML why doesn't this work? i get an error on the underlined section.

View 7 Replies

VS 2008 Use From Variant In Form1 In Form2?

Aug 2, 2010

I have a simple problem and I believe that the solution is with module using but I could not resolve it yet. Here is the scene:In Form1 I have a variant that gets its value from the selections of a listbox. The code is:OPtext) in Form2 because this selection from Listbox (in Form 1) should also trigger some events in Form 2. I tried to use a module and declare the variant using Public. I did this and I now can use the variant in Form 2. But the value selected in Form1 does not come to Form 2.

View 7 Replies

Pass The Selected Rows Of A Datagridview Of Form2 To The Datagridview Of The Form2?

Feb 15, 2012

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

VS 2008 Textbox From Form1 Put Into Web Browser On Form2?

Oct 4, 2009

Ok I have 2 text box on form 1...

Username:

TEXTBOX HERE

Password:

TEXTBOX HERE

The web browser is on form 2...

When I click login, how can I make the username text box text and the password text box text inject into the web browsers username and password text box's on the web browser ON THE OTHER FORM?

View 1 Replies

VS 2008 Textbox From Form2 Into Web Browser In Form 3?

Oct 3, 2009

I want to make a form which has 2 text box

username:
textbox1 here

password:
textbox2 here

Login button

when you click the login button, it will form#.show which will be a web browser

then i want it where the text from textbox 1 and 2 can be put into a textbox ON A WEB PAGE if I get the text box's ID number.

So basically can I transfer data from form to form?

View 4 Replies

VS 2008 Passing Variable From Form1 To Form3 Via Form2?

Jan 10, 2010

IThere's a button on the toolstip that's always enabled for form2 so they are always able to search the database.When a user is on form1 and selects the link button. They are taken to form2 to select criteria to search. On Form3 they choose 1 item in the grid andcan select the Link It button on the form to link the 2 selected grid items (form1 and form3). Since form2 and form3 are available at anytime.my problem is knowing when the Link button on form1 has been chosen and after a successful link to not allow anymore links. Technically, they could pull form2 up via the toolstrip or an existing form2 window and Link as long as Form1 is on the screen but I do not want this. It's as though I need a global variable to set to True/False.

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

VS 2008 Make Username And Password Form To Login Into Form2?

Jul 16, 2009

how make username and password form to login into form2

View 11 Replies

VS 2008 How To Merge Urls And Transferring Them In Form2 Listview By Clicking Button

May 24, 2009

I have 2 forms '' Form1 and Form2 ' in Form1 i have a Text field, checkboxlist and a button in Form2 i have a Listview in the textfield the user has to put a forum url..How to merge the urls and transferring them in Form2 listview by clicking the button.url...

View 1 Replies

VS 2008 Select Website In Combobox Open Form2 With Website Preview?

Feb 19, 2010

What Im making is like a face book and tagged login from my app

1. I have Combobox with 3 urls in there ( Facebook.com Tagged.com and Bebo.com )
2. I have a Form2 with webbrowser
3. I have a Button when clicked it should open up my form 2 and preview of the website which I selected in my combobox in form1

All I'm trying to do is when I select lets say facebook in my form 1 and click load it should open up my form 2 with facebook website in it.[code]Now when I click my button in form 1 it will load Form2 ( named Explorer1) but my form2 is not showing me facebook or tagged page for some reason

View 13 Replies

VS 2008 : LblTotal.Text = Val(Form2.label.Text) + Val(Form3.label2.Text) Not Working?

Feb 25, 2010

I am creating a Pizza Order program as part of my coursework college. why something isn't working.

Quote:

lblTotal.Text = Val(Form2.lblPizzaTotal.Text) + Val(Form3.lblDrinksTotal.Text)

The code above is what I am using to add the Value of Label 1 (Pizza Total) and Label 2 (Drinks Total), however it seems that in the final total it doesn't appear to add the value of Label 2.

View 8 Replies

Log In Then New Form2?

Jul 31, 2009

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

How To Load Form2

Aug 10, 2011

i have 2 form..which is frm1 and frm2..my mainform is frm1 how can i load the form2?

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







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