me.close don't work?

banks

Well-known member
Joined
Sep 7, 2005
Messages
50
Programming Experience
Beginner
ok cool, i'll take all that on board and post back what ive come up with.

There is one thing that should be well easy but i cant get it to work. Ive tried using me.close in various places to close the login form when the user has logged in and the main form has opened but it doesn't seem to work whereever i put it. Could you advise me where i need this statement (if it is the correct one of course ;-) )

many thanks
 
Post moved to separate thread.
 
incidentally, the forum mailed me saying you had posted this, in this thread:

ok cool, i'll take all that on board and post back what ive come up with.

There is one thing that should be well easy but i cant get it to work. Ive tried using me.close in various places to close the login form when the user has logged in and the main form has opened but it doesn't seem to work whereever i put it. Could you advise me where i need this statement (if it is the correct one of course ;-) )

many thanks

but i cant find it.. did it get split out to a new thread?or deleted?
 
no probs, cheers cjard.

i know this should be easy but i cant get my login form to close automatically once ive logged in. i've tried me.close in a few places but it doesn't seem to work - this is the write command to use isn't it? if not what should i be using? do i need to close the form before or after i call the new form ( i guess after)

LOL = yeah must have got deleted somehow - i still need to know
 
dont know whats happening to my posts today! seem to have been deleted...
i am trying to solve my problem of closing the login a new way.

i open the mdiParent form on startup, which calls the login form. i need th login form to close if the password etc is ok and my main menu to open.

VB.NET:
    Public Sub login()
        Dim frmLogin As New frmLogin

        With frmLogin
            .MdiParent = mdiCAR.ActiveForm
            '.Text = "Child " & Me.MdiChildren.GetLength(0)
            .WindowState = FormWindowState.Normal
            .ControlBox = True
            .Show()


        End With
    End Sub

The above is being called in the mdiform constructor

Then this is on the login forms button (havent changed those ordinal values yet ;-)
VB.NET:
           Else

                'puts userId and full name into global variables
                dbaCAR.UserId = dr.GetValue(0)
                dbaCAR.strFullName = dr.GetString(1)
                dbaCAR.intUserLevel = dr.GetValue(2)

                Dim main As New mdiCAR
                With main
                    .WindowState = FormWindowState.Maximized
                    .ControlBox = True
                    .Show()

                End With

            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

        conn.Close()


    End Sub

But its not doing what i want.

Do you get what im trying to do? please answer with any q's so i can sort this out asap.

Many thanks again

Al
 
Back
Top