473,657 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

login form question

My login form will call a main form with menu
in my button_OK click event
dim frmMain as new mainform
frmMain.show ()
Me.dispose()


The login form didn't close by itself, Please help.. Thanks

Nov 21 '05 #1
3 1747
well how about instead.

Sub Main

in a main module.

dim flogin as new frmLogin

'check a Successful property--that you should create--on 'flogin
to see if successful--or better yet maybe you just want the login dialog to
get username and password and when user click OK, close form, and then in
Sub Main read a UID and PWD property from flogin form--that you would
create, do your login validation and allow entrance or exit the program
if flogin.Successf ul then
dim fMain as new frmMain
fMain.ShowDialo g
end if
end Sub

HTH,

Shane
"Agnes" <ag***@dynamict ech.com.hk> wrote in message
news:uD******** *****@TK2MSFTNG P12.phx.gbl...
My login form will call a main form with menu
in my button_OK click event
dim frmMain as new mainform
frmMain.show ()
Me.dispose()


The login form didn't close by itself, Please help.. Thanks


Nov 21 '05 #2
You mean that I should set "module" as start but not a "login form" ???
Thanks

"SStory" <Th*******@TAKE OUTTHISSPAMBUST ERsofthome.net> ¦b¶l¥ó
news:OM******** *****@tk2msftng p13.phx.gbl ¤¤¼¶¼g...
well how about instead.

Sub Main

in a main module.

dim flogin as new frmLogin

'check a Successful property--that you should create--on 'flogin to see if successful--or better yet maybe you just want the login dialog to get username and password and when user click OK, close form, and then in
Sub Main read a UID and PWD property from flogin form--that you would
create, do your login validation and allow entrance or exit the program
if flogin.Successf ul then
dim fMain as new frmMain
fMain.ShowDialo g
end if
end Sub

HTH,

Shane
"Agnes" <ag***@dynamict ech.com.hk> wrote in message
news:uD******** *****@TK2MSFTNG P12.phx.gbl...
My login form will call a main form with menu
in my button_OK click event
dim frmMain as new mainform
frmMain.show ()
Me.dispose()


The login form didn't close by itself, Please help.. Thanks



Nov 21 '05 #3
Seems to work better.
that way login opens, closes and is gone.
then you decide on entrance to the main form or not.

Shane
"Agnes" <ag***@dynamict ech.com.hk> wrote in message
news:uU******** ******@TK2MSFTN GP10.phx.gbl...
You mean that I should set "module" as start but not a "login form" ???
Thanks

"SStory" <Th*******@TAKE OUTTHISSPAMBUST ERsofthome.net> ¦b¶l¥ó
news:OM******** *****@tk2msftng p13.phx.gbl ¤¤¼¶¼g...
well how about instead.

Sub Main

in a main module.

dim flogin as new frmLogin

'check a Successful property--that you should create--on

'flogin
to see if successful--or better yet maybe you just want the login dialog

to
get username and password and when user click OK, close form, and then in Sub Main read a UID and PWD property from flogin form--that you would
create, do your login validation and allow entrance or exit the program
if flogin.Successf ul then
dim fMain as new frmMain
fMain.ShowDialo g
end if
end Sub

HTH,

Shane
"Agnes" <ag***@dynamict ech.com.hk> wrote in message
news:uD******** *****@TK2MSFTNG P12.phx.gbl...
My login form will call a main form with menu
in my button_OK click event
>dim frmMain as new mainform
>frmMain.show ()
>Me.dispose()

The login form didn't close by itself, Please help.. Thanks




Nov 21 '05 #4

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

Similar topics

1
2140
by: John Davis | last post by:
I put a little login (username and password textfields) in a web page, and once the user able to login, I want the username and password textfields will disappear, and replace with text " has Login!]" in the same position. My question is how to make the username and password textfields disappear and replace with " has Login!]" in the same position? This is the code I have done so far, but it has another problem: Even I first check if...
11
2956
by: David W. Simmonds | last post by:
I have a form that will prompt for a user name/password. In VS.NET, I have the protected form in a folder named Admin. I have a Web.config file in that folder as well. It contains the following section: <authorization> <deny users="?" /> <allow users="*" /> </authorization> In the root folder where the other forms are located I have a Web.config
5
1990
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 entering successful password and clicking ok, login form should go away 4) Main form should then display admin controls
6
3348
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in the past in other places, and while the help was much appreciated, it seemed everyone just wanted to 'theoretically' explain how to do it, but when I tried to do it myself, I couldn't login. I want to simply pass the email address and password to...
9
3584
by: Ben | last post by:
Hello, I'll bet this has been asked a million times but I can't seem to find a thread that gives the clear example I need. This PC has MySQL and IIS configured and running. The MySQL database is "myDB" with a table "myUsers" with fields "Username" and "Password". I also have the MySQL ODBC driver loaded with a DSN "dsnMySQL" setup. First question is can someone direct me to a site or provide a sample code for a login page that...
3
2314
by: Jennifer.Berube | last post by:
okay...so I got this login script and I edited it all and it seems to run fine...IE it listens to the script as far as permissions go when I place a restriction on a page and when you login it redirects. But first it doesn't tell you that you're logged in and doesn't provide a logout feature. And most importantly if I type in a random username and password not listed in the database it doesn't seem to matter it still "lets me login"
19
3286
by: klenwell | last post by:
Another request for comments here. I'd like to accomplish something like the scheme outlined at this page here: http://tinyurl.com/3dtcdr In a nutshell, the form uses javascript to hash (md5) the password field using a random one-time salt (nonce) -- generated by php and pasted in the form -- that is then posted with the hashed password
12
3521
by: hotflash | last post by:
Hi Mark et. All, I have a question to see if you can educate me here since this is something new to me as well. I created a login page for the user to login and the ASP will check and redirect them to the appropriate page. So far, everything works fine. Myself and the user admin can login to the "Trform.asp" page OK without problem. My question for you and your peers is I have 5 more users. Let's say A, B, C, D, and E. I want...
1
3322
by: Kandiman | last post by:
Hiya, i made a asp page, and one of my divs (as a include) is as below. the problem is if the main page is resubmitted, i get logged out again?... heres the code.. i think its on the value=true for the hidden textbox on the logout sub.. but how do i get round this? can i not change the value onclick? <div id=Rightbody> <!--<form id="RightBodyForm" name="RightbodyForm" method="post" action="Guestbook2.asp">--> <% Response.Expires...
0
8413
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.