Solved

How to take control on submit button automatically while data entered on txtpassword.

Posted on 2012-03-22
3
299 Views
Last Modified: 2012-03-23
I have two textboxes, txtusername and txtpassword.
when the user enters the password, the submit button should activated.
secondly when i click on submit button of login form, frmdetails form gets activated.
but how to close login form.
0
Comment
Question by:searchsanjaysharma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 20

Assisted Solution

by:BuggyCoder
BuggyCoder earned 250 total points
ID: 37755900
Public Class mainForm

   ' handles login Button's Click event
   Private Sub loginButton_Click(ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles loginButton.Click

      detailsForm.Show()
      Me.Hide()

   End Sub ' Button_Click
End Class ' mainForm
0
 
LVL 16

Accepted Solution

by:
Rose Babu earned 250 total points
ID: 37755987
Hi,

when an user enters the password in txtpassword textbox then the submit button will be activated. use txtpassword_KeyDown event to trigger it.
Private Sub txtpassword_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtpassword.KeyDown

	If e.KeyCode = Keys.Enter Then

		btnSubmit_Click(Me, EventArgs.Empty)

	End If

End Sub

Open in new window

when a submit button clicked then the login form will be hidded and the frmdetails form will be shown by using the below code.
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click

	Me.Hide()
	frmdetails .Show()

End Sub

Open in new window

Try this. It will work for you.
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 37756031
ok
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question