Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2012-03-22
3
Medium Priority
?
301 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 1000 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 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

609 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