Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two richtexboxes like RichtTextBox1 and RichTextBox2 in one form1..

My question is?

When i pressed Tab or Ctrl +R in RichTexBox1 should open RichtTextBox2 How ?

What I have tried:

Private Sub RichTextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles RichTextBox1.KeyDown
       If e.KeyCode = Keys.Tab Then
           RichTextBox2.Show()


       End If
   End Sub
Posted
Updated 18-Oct-19 21:18pm
Comments
Is this code working? If not what is the issue?

1 solution

You only use .Show() for forms, not for Controls. Use the .Visible property for Controls.

To change the culture programmatically, see: vb.net - Regional Settings Override in .NET Framework - Stack Overflow[^]
 
Share this answer
 
v2
Comments
Member 14621280 19-Oct-19 3:45am    
but visible property is true only
Member 14621280 19-Oct-19 4:01am    
Private Sub RichTextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles RichTextBox1.KeyDown
If e.KeyCode = Keys.Tab Then
RichTextBox2.Show()
RichTextBox1.Visible = False
RichTextBox2.Visible = True
End If
End Sub
Member 14621280 19-Oct-19 4:05am    
its worked thank you? and i need one more information regarding this
i have Tamil font content and English font content once i clicked datagridview1 it will show richtextbox1 but in my datagridview1 having English content also but that will not showed in my richttextbox1.... any autodeduct font or language is there for source code

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900