473,378 Members | 1,218 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Prompt out main form through login

Hi all,

2 forms, one is login form, another is main form.

Once login operation is granted, it will bring out main form and kill login
window. How can I do it? Like

Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnOK.Click

......
If bDone = True Then
Dim frmMain As Form1

frmMain = New Form1
frmMain.Show()
'Kill frmLogin
......
End If
End Sub

--
Best regards,
RL
Nov 21 '05 #1
3 849
Lurc,

For things as a login form is the

ShowDialog instead of Show

And than start from your mainform and not vica versa.

In the way you want to do it now, becomes your login form your toplevel
class, and therefore you have to keep it alive as long as your application
runs.

I hope this helps,

Cor
Nov 21 '05 #2
Hi Cor,

Thanks.

If so it sounds ridiculous to me, main form is opened with a login dialog
window on background. Is there any other approach work around?

--
Best regards,
RL
Nov 21 '05 #3
Lurc,

When you set the login form in the loadevent of the mainform, than that
class is opened, however the form is not yet showed. You are not the only
one who uses a login form.

However, did you ever looked at the standard IsInrole functions from Net.
(better from the OS). Than you don't need a login form at all.

I give you this page because it is easier to start from.

http://msdn.microsoft.com/library/de...nroletopic.asp

I hope this helps,

Cor
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ghazan Haider | last post by:
I am posting this for the lack of a better newsgroup, and for the knowledge of people here, and because its only partially OT. We have a bunch of users with their computers at work. There are...
1
by: John Wolrehammer | last post by:
After the user login in i want to close the login form. I can close it but it also closes the whole application. Can anyone help.
0
by: Laura Zeafla via .NET 247 | last post by:
I used the .NET forms application wizard. From the form youclick a button and it calls a C++ function through its dll. This function is supposed to pop-up a command prompt window. Something about...
0
by: Laura Zeafla via .NET 247 | last post by:
I have an application I wrote using the Windows Form Application(.NET) wizard. Pressing a button calls a function in a dllwritten in Visual C++. This function is supposed to cause acommand prompt...
9
by: CSharpNewBie | last post by:
Hi I am creating a Winform application and I need help. Let me explain my problem This is what i do on startup, I create a form (a Login screen) at runtime and that will ask user to enter a...
5
by: Ivan | last post by:
I am used to VB6 and am not sure how to do this in Vstudio .NET. I have a main form which calls other forms. I want to disable that main form while other ones are called. I tried hiding it and...
5
by: Ronald S. Cook | last post by:
It's been longer that I remember since writing windows (not web) apps. 1) I want to load a main form 2) User clicks login button which brings up login form (on top of main form) 3) Upon...
1
by: Rob Nicholson | last post by:
I've managed to write an ASP.NET v2 web page where the prompt to save the password doesn't appear :-( Not sure why it's not working. Autocomplete on the text boxes is working but when you enter...
9
by: happyse27 | last post by:
Hi All, In perl script(item b below) where we check if html registration form are filled in properly without blank with the necessary fields, how to prompt users that the field are incomplete...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.