473,403 Members | 2,293 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,403 software developers and data experts.

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.ShowDialog()

Else

If mPssWrdForm.Visible = False Then

mPssWrdForm.Visible = True

End If

mPssWrdForm.Activate()

End If

'Check Password

If gfPssWrdOK Then

'Password OK

'Save Target Folder

gfPssWrdOK = False

gstTargetFolder = LabelTfrTo.Text

fSaveFailed = Not dacSetRegSettings("DestFolder", gstTargetFolder)

If fSaveFailed Then

GoTo Err_dacSaveSettings

End If

Else

LabelTfrTo.Text = gstTargetFolder

Call dacSetUpLdfreq()

CheckBoxEnable.Checked = gfEnableRun

End If

Exit_dacSaveSettings:

fFormChanged = False

Exit Sub

Err_dacSaveSettings:

MsgBox("Error Saving changes.", MsgBoxStyle.Information, _

"24x7 File Transfer Error")

GoTo Exit_dacSaveSettings

End Sub

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

ByVal e As System.EventArgs) _

Handles ButtonPsswd.Click

gfPssWrdOK = LCase(TextBoxPsswd.Text) = LCase(gstPassWord)

TextBoxPsswd.Text = ""

Me.Hide()

End Sub


Jul 21 '05 #1
0 1355

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

Similar topics

7
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...
7
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,...
0
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...
5
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...
0
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...
2
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 =...
1
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...
1
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.