VS 2010 - Hiding / Closing Login Forms?

May 1, 2012

I've created a program with a login form. Once you log in, the login form should close and the next form should display... my problem is...
If I use Me.Close()... than both forms close and the application terminates.
If I use Me.Hide()... than the application never unloads from memory and run indefinitely.
So what do I do? Neither of these work how I need them to.

View 3 Replies


ADVERTISEMENT

Rules/Guildlines For Closing Vs. Hiding Forms

Jul 16, 2009

I was wondering what Rules/Guildlines poeple for Closing vs. Hiding forms?

example:Should i only close a form when i am finished with it?

View 9 Replies

VS 2010 Hiding Forms?

Aug 1, 2011

It seems like such a simple thing to me, but it seems like the usual, me.hide() isn't working in this case. I have 2 forms that tie together, the login form, and then the main for being form1. The login form has an autologin feature, which works out fine, but with it enabled, the login form doesn't automatically hide like it should.

[Code]...

View 6 Replies

VS 2010 Hiding/Showing Forms In MDI?

Feb 16, 2012

I am using a MDI parent to house each of the forms in my application. I have a main form and 2 sub forms. The sub forms are opened using the code below. Also, when I am finished entering info into these forms, i am hiding them so that I can reopen them with the same info still entered.

The problem is that when i show the form again, it is blank. Why would this be the case? I am never closing or disposing the form, so shouldn't it just unhide easily?Showing the sub-form(savingsfrm1) and and hiding the main form(riskfrm1)Public savingsfrm1 As Savings

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

View 1 Replies

VS 2010 Unable To Closing Forms?

Feb 12, 2012

I have noticed when I close a form I have invoked using form.showdialog the form does not appear to be totally removed. If I load a value into a textbox and press my cancel button [Me.close() Return] and then reload the form the value in the textbox is still present. Also bindings are failing because they are already set up

View 10 Replies

Closing Application Via X Button Without Closing Forms Inside Mdiparent Causes Exception Error

May 3, 2010

Form1 is a mdi container. It has a bunch of forms that can load inside of it as mdi children. If I close each open form inside the form1, and then click the red X at the top right, application exits fine.If I click the red X without closing the forms inside I get: An unhandled exception of type 'System.CannotUnloadAppDomainException' occurred in mscorlib.dll

Additional information: Error while unloading appdomain. (Exception from HRESULT: 0x80131015) However I can break from it. How do I get the application to not show that error? What must I do to fix those inside forms or close when the red x is clicked?

View 1 Replies

VS 2008 Closing All Forms When Program Closes Vs. Closing All But Main Form

Jun 4, 2010

Dim frm As Form
For Each frm In Forms
Set frm = Nothing
Next frm

The above code is what I used in VB6 to close all forms associated with my programs before my program closed. I have been searching for information on how to make sure all forms are closed when closing a VB2008 program.

I have seen info on using the Project Property Shutdown mode When startup form closes and I currently have this set.

Is this all that is really necessary? Will the garbage disposal close everything else to free up RAM?

Also, if I have several forms open and want to close all from the main form without closing each one individually, what is the best approach? Is there a collection like in VB6, go through the collection, compare it to the name of the main form and close it if it is not the main form?

View 4 Replies

Forms :: Enter Login Details Login Page Just Refreshes Itself And Login Wasn't Proceed?

Dec 13, 2010

I had a problem with WebBrowser component. Basically, it works improperly when try to log in on one web-site (Forex Trading Social Network | Online Forex Trading Forum and Social Networking Site). I am working with Visual Studio 2010 Professional. I created a simple WebBrowser trying to access the indicated web-site. The problem begins. Well, the website loads, but when you go to the login page (Forex Trading Social Network | Online Forex Trading Forum and Social Networking Site) and try to log in, it doesn't work. I mean, when I enter the login details the login page just refreshes itself and the login wasn't proceed. The same login page appear with every login attempt. The is the current problem!I check with Google, it works. But, it doesn't work with Forex Trading Social Network | Online Forex Trading Forum and Social Networking Site! Why?

View 14 Replies

VB 2010 - Opening And Closing Child Forms Inside MDI Parent?

Oct 29, 2011

It is my goal to write a program to run a retail store. I am an intermediate Access developer, so I have a good grasp of the basics.However, I find that developing in VB 2010 is quite different.I will have forms for:

Company Information
Employee Information
Supplier Information
Customer Information
Invoices & Purchase Orders

All I really need to know at this point is the code to open and close each form.

View 4 Replies

Main Form Closing After Login?

Apr 3, 2009

Ok i have a login window which connects to a MySQL database and authenticates the user. Works perfect, BUT

If rowsEffected > 0 Then
cnMySQL.Close()
LoginForm1.Close()
MainForm.Show()
Else
cnMySQL.Close()
MsgBox("Login Failed!")
End If

That's supposed to close the login form and open the main form if the query returned a positive match of the login information. The login works, closes the login form, opens the main form, than mysteriously exits the application. I'm guessing its something simple but i don't see it .. the main form has nothing in it besides some inputs and labels no subs at all and if i change the form which the program starts to to the main form it runs as designed.

I know usually if you start your program from a module and use Application.Run() you can keep the thread open, but this is all forms no background work so i didn't want to go that direction.P.S. i just removed LoginForm1.Close() and it logs me in fine and opens the main form fine and keeps the app running but the login form is still open.

View 5 Replies

Closing Login Form After User Is Authenticated

Sep 22, 2011

I have a very generic login form created that allows a user to access a application. My problem is getting the log in form to close after the application form is loaded. I have described the specifics in the comments of the code. [code]

View 1 Replies

Hiding/unloading Forms In .NET?

Feb 2, 2012

Im learning VB.NET and as a first task im creating a login form. ive been trying to link it to another form once a correct username and password are entered. however, despite that i still cant be able to hide it or unload it once the next form is loaded

Here is the Code

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
If UsernameTextBox.Text = "chris" And PasswordTextBox.Text = "chrispass" Then
Me.Hide()

[code]....

The Form2 appears as coded above but the 'Me.Hide()' manages to hide the login form but then it appears again?

View 9 Replies

Showing And Hiding Forms

May 4, 2010

When my login screen loads, if the user has not created an account the form will close and a form to create an account will appear. However when I code this both forms stay visible, instead of just the one. Where am I going wrong?[code...]

View 6 Replies

Showing And Hiding Forms In VB?

Mar 11, 2009

I've just upgraded from Visual Basic 6 to Visual Basic 2008 Express Edition.

1. Show anothor form (ie. Form2)

2. Close Form1.

At present when I use the me.form1 , but both Form1 and Form2 both closes.I would like to press a button or on a timer, to show Form2, while closing Form1.

View 4 Replies

Forms :: Multiple Forms, Closing Events And Sub Routines?

May 25, 2010

I have googled high and low to find an answer to this but I must be searching wrong.I have an application which has a listview displaying some items that are stored in a SQL Compact database. I am using a second form to add new items to this list directly into the database.When the second form closes I want to call the sub in my first form to refresh the list from the database.

How can I get it to fire the form1 sub routine on the close event of form2

View 3 Replies

Forms :: DataGridView Display - Hiding And Showing

Mar 31, 2009

I have a form e.g. Form1 , which displays a datagridview.
1) On form load, the datagridview doesn't have any data
2) The user clicks on a button called filter, this opens a form where the user can specify parameters to filter the data by
3) This form calls a setData() in Form1, which fills the dataset with the data

This works fine. If I click on a button called controlPanel it launches another form and hides this. E.g.
dim cp as new ControlPanel()
this.hide()
cp.show()

On the controlpanel I have a button that links to form1. If I click on it. E.g.
dim frm as new Form1()
this.hide()
frm.show()
It redisplays Form1 but without any data in the datagridview.

I think the problem is that since I am creating a new instance for Form1 it comes up with the blank Form1. Is there a way to redisplay Form1 so that it retains the data that was displayed last, without having to retrieve the data from the database.

View 1 Replies

Way Of Hiding Forms And Classes From Main Project

Aug 31, 2009

the client has asked for all forms and classes to be hidden from the main project, so when he sells it, they will only be able to see part of the project and not all the classes and forms.My Solution: I have created another project called project2, and added all the forms and classes from main project, fixed all errors and compiled it.I deleted all the forms from the main project and added a reference so that it gets all the forms from the other project by referencing the dll file, but it does not seem to work and get a lot of errors.is there an easier way of hiding the forms and classes from the main project or do I need to do more then just add the reference.

View 2 Replies

Forms :: Closing Forms On MenuClick From Module?

Dec 13, 2009

Im running a program with multiple forms with a menu and toolstrip defined and assigned with properties in a module. each form has the Call menuload (Me) in the form_load sub.

My problem is that these menu's have menuitems which need close the shown form and open another. a sample of one of my menuitems is:

Module MenuTemplate
Friend WithEvents frm As Form
Friend WithEvents menustrip As New MenuStrip

[Code].....

View 14 Replies

Forms :: Two Forms Application Is Closing

Dec 12, 2011

I have two forms and a button on the first form. What i want is when i click the button the second form to show and the first one to close. But this isn't working with: Form2.show() Me.close All the application is closing with the code above.

View 4 Replies

Closing Old Forms?

Jul 5, 2009

Here is my problem: when I create a new form i want to close the old so it is not still running in the background. As in if the were to move on to a second form and the X-out the first form would still keep the program running. Normally i would do [me.close] and when that didnt work i tryed [me.form1.close] and then [dim frm1 = form1 frm1.close] with no luck. Could some one please tell me where i have gone wrong?

View 5 Replies

Forms Not Closing When They Should

Apr 20, 2010

i have a problem with trying to get 2 forms to close at different times using a timer on each of the 2 forms.This is my form layout:frmMainFrm1 Frm2..Frm1 and Frm2 are identical to each other. FrmMain has 2 buttons on it. One button to call Frm1 and the other to call Frm2.Frm1 and Frm2 each has a timer. It counts down to 0 and then does a .close(). However, if i pause between clicking the second button they both seem to always disappears at the same time.then they both disappear at the same time.... which shouldn't happen since i clicked the Frm2 box 10 seconds AFTER Frm1... So Frm1 should hide before Frm2 does...but it does not.

View 4 Replies

Forms Not Closing When They Should?

Apr 21, 2010

i have a problem with trying to get 2 forms to close at different times using a timer on each of the 2 forms.

This is my form layout:

frmMain
Frm1
Frm2

Frm1 and Frm2 are identical to each other. FrmMain has 2 buttons on it. One button to call Frm1 and the other to call Frm2.Frm1 and Frm2 each has a timer. It counts down to 0 and then does a .close(). However, if i pause between clicking the second button they both seem to always disappears at the same time.I would do something like this...

Click on the first button (showing the Frm1 form)
wait about 10 secs...
Click on the second button (showing the Frm2 form)

[code]......

View 2 Replies

VS 2010 Hiding A Folder?

Feb 25, 2012

Is it possible to hide a folder completely? By this I mean, not just set its property to hidden, but make it completely invisible so that the folder cannot be seen via Microsoft Windows Explorer?

View 2 Replies

VS 2010 Hiding A Form?

Feb 18, 2012

Dim Result As Integer
Result = MessageBox.Show("Question...", "Key", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)

[code]....

View 1 Replies

Closing Unactive Forms?

Sep 13, 2008

, When you hit esc a 2nd form comes up on top of the first. On the second form you are able to close the first or/and reload the first with different info. My problem is whenever i try and reload the 1st frm it doesn't close it just opens it again. So if i do it seven times i have seven windows of the first frm open... my codes is something likes this

Dim frm1 as new form1
frm1.close()

From what i was thinking it has to do with the "New" Part in the dim statement....

View 2 Replies

Forms :: Form Not Closing?

Nov 6, 2009

In my one form I have a cancel button whcih is supposed to the form when the button is clicked. But its not closing the form. What could be possible reasons. I am using VS2008.Net3.5

The code is:
Private Sub cbCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbCancel.Click

[code].....

View 7 Replies

Replacing Forms Without Closing?

Aug 9, 2009

i have a form (form1 for example) and there is a button ( button1) and too many controls in this form and i have form(form2) and too many controls in this form
i want when i click the button1 i need every control in form1 to disappear and instead i want form2 and it is contents to be loaded in the form1

OR

the second form is showing without the user noticing that there's too forms
(replacing)

can i do this and if i can't , can i create a custom control/controls to do this
and if i can how can i do this?

View 6 Replies

VS 2010 : Showing Or Hiding Controls?

May 20, 2010

I have a form that searches a db. Some searches will always result in one row of data, others might return multiple rows. I want to have the data from a single row shown in text boxes and the multiple rows show in a datagridview is it possible to hide/show those depending on the amount of rows.

View 6 Replies

Closing All Forms Within Mdi-Parent Form?

Jun 21, 2010

How will i close all the forms within my main form? Everytime I click on the menus of my main form,I'm setting my main form as MDI-Parent form and then loading a new form as it it is the child form if I'm not mistaken. I have a log-out menu, and what I want to happen is everytime I log-out all the forms within my parent form will be closed. How will I do it? Here are some of my codes.

[Code]...

View 3 Replies

Closing Multiple Forms At Same Time

Feb 21, 2010

I have two child forms that open from the MDI Parent.My question is when I close one of the child forms all others will close also.

View 2 Replies







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