473,549 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Password form

Hi
I am having difficulty getting a password form to work correctly.
I am using VB.Net.
The required functionality is to allow a change to a setting but when a save
button is clicked a password box opens requiring the password. If a correct
password is entered then the new setting/s are saved otherwise the old
settings are re-instated.

The save button calls a sub
The Sub opens the password form.
The password form checks the password and sets a global variable to true and
then hides
The Sub then saves the settings to the registry
I can't see where it is going wrong.
I would appreciate someone having a quick look at this and letting me know
if I am doing this the wrong way or if I am just making some mistake in the
code.

The code is below,

Thanks Doug

Form Declarations:
Private mPssWrdForm As FormPssWrd

Save Button code:
Call dacSaveSettings ()

dacSaveSettings code:
'Display Password Form.

If mPssWrdForm Is Nothing Then

mPssWrdForm = New FormPssWrd

mPssWrdForm.Sho wDialog()

Else

If mPssWrdForm.Vis ible = False Then

mPssWrdForm.Vis ible = True

End If

mPssWrdForm.Act ivate()

End If

'Check Password

If gfPssWrdOK Then

'Password OK

'Save Target Folder

gfPssWrdOK = False

gstTargetFolder = LabelTfrTo.Text

fSaveFailed = Not dacSetRegSettin gs("DestFolder" , gstTargetFolder )

If fSaveFailed Then

GoTo Err_dacSaveSett ings

End If

Else

LabelTfrTo.Text = gstTargetFolder

Call dacSetUpLdfreq( )

CheckBoxEnable. Checked = gfEnableRun

End If

Exit_dacSaveSet tings:

fFormChanged = False

Exit Sub

Err_dacSaveSett ings:

MsgBox("Error Saving changes.", MsgBoxStyle.Inf ormation, _

"24x7 File Transfer Error")

GoTo Exit_dacSaveSet tings

End Sub

Password Form Code:
Private Sub ButtonPsswd_Cli ck(ByVal sender As System.Object, _

ByVal e As System.EventArg s) _

Handles ButtonPsswd.Cli ck

gfPssWrdOK = LCase(TextBoxPs swd.Text) = LCase(gstPassWo rd)

TextBoxPsswd.Te xt = ""

Me.Hide()

End Sub


Jul 21 '05 #1
0 1366

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

Similar topics

7
2140
by: juglesh | last post by:
<body><div align="center"> <?php if (!isset($password)){ ?><form action="<?php $_SERVER; ?>" method="post"> type password here&nbsp;<input name="password" type="text" size="8"> then <input name="submit" type="submit"> </form> <?php die; }
7
8685
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong, somehow I always end up with error messages and functions not working right. Can someone please help me? I have a form, inside is 1 Text Field...
0
1126
by: teenzbutler | last post by:
I am attempting to password protect some web pages. I have following the instructions within the following article: Microsoft Knowledge Base Article - 301464 - How To Use Simple ASP Code to Password Protect Your ASP Pages. Every thing works fine. The am having a problem figuring out how to add additional usernames and passwords. It appears...
5
1557
by: Trev | last post by:
Hey, I have a complete frontend setup, the first window/form that shows up gives you an option of 3 databases. One of them will only need to be accessed by about 2 - 3 people within our organization. so i want to password protect it. How can i do this? I was think i can just have a funtion so that when they
0
268
by: Doug Bell | last post by:
Hi I am having difficulty getting a password form to work correctly. I am using VB.Net. The required functionality is to allow a change to a setting but when a save button is clicked a password box opens requiring the password. If a correct password is entered then the new setting/s are saved otherwise the old settings are re-instated. ...
2
4845
by: mankolele | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Simple Database Connection</title> </head> <body bgcolor="white"> <?php $connection = mysql_connect("localhost", "root", "phpmysql"); $select_db = mysql_select_db("procdumy", $connection);
1
7416
by: roshina | last post by:
Hi Iam facing a problem in my project, developing a web site for online shopping in ASP on windows XP using IIS server. All the validations are ok but the new password is not upadated in the data base and also showing a error page. the operating system we used is Windows XP, the source code is ASP, front end we used - HTML and javascript...
1
2617
by: dan.cawthorne | last post by:
Hi all, Need Some Help With A Simple Password Form What a I Have Is Single Field Table, With One Record In It The Field is Called table is also called "Password" which ive created a form that represents this table, so the admin can change the password if needed at ease.
0
7451
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...
0
7960
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7475
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...
0
7812
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5372
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...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1944
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
1
1061
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
766
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...

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.