[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Wndows Form and Focus

Posted on 2014-03-30
1
Medium Priority
?
291 Views
Last Modified: 2014-04-01
I have a simple windows form that has a few labels and masked text boxes.
All controls are set to visible = false except for the first label and masked textbox.

What I am trying to do is when I enter the data into the masked txtbox, the next label and masked textbox shows visible=true.

The problem I am having , when I hit tab to change focus, there are no other controls to switch to as they are visible=false.

I tried to change visible=truse on the next control on leave but that does not seem to work.

Any ideas?

Thnaks
0
Comment
Question by:Jedidia
[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
1 Comment
 
LVL 24

Accepted Solution

by:
mankowitz earned 1100 total points
ID: 39964941
Probably the best thing to do is make the next box appear when the textchanged event fires from the maskededitbox. It's not beautiful, but it would work. The other option is to capture the tab or enter key.

Here is an example:

    Private Sub TextBox1_PreviewKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.PreviewKeyDownEventArgs) Handles MaskedTextBox1.PreviewKeyDown
        If e.KeyData = Keys.Tab Then
            Label2.Visible = True
            MaskedTextBox2.Visible = True
        End If
    End Sub

Open in new window

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

650 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