 |
| Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET). |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

December 22nd, 2004, 02:58 AM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
making cursor disappear
This is so basic, I'm not even sure if this is the right place to post.
Anyways, I have a form, on the form there's a number of textfields, and when I run the program there's a blinking curser on one of those fields. How do I get rid of that? I tried something that slows the rate down, but the cursor is still there, I want it gone!
Thanks!
|
|

December 22nd, 2004, 03:00 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The blinking cursot means that the text box has the focus, and the user can type on it. Why do you want it to go away? That is a standard Windows settings.
Marco
|
|

December 22nd, 2004, 11:14 PM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi
I still need the focus on that particular textbox, but i just need to make the textbox invisible to different types of users using the same form. Just thought that by removing the blinking cursor totally, it would make it less obvious to users who are not supposed to see the textbox. Any way to change/control this setting? would appreciate any ideas given..
thanks!
|
|

December 23rd, 2004, 01:42 AM
|
|
Friend of Wrox
|
|
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Though I am not clear on what you are trying to achieve .. I presume that you want to hide certain textboxes for certain users. If my understanding is right... read on .... You could the visibility of the textbox to false.
For ex:
1. If a particular user type is not allowed to see that textbox .. do
txtFirstName.Visible = false
Hope this helps!
Best Regards
Vadivel
MVP ASP/ASP.NET
http://vadivel.thinkingms.com
|
|

December 23rd, 2004, 02:30 AM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi vadivel, thanks for the tip!
However, when i tried setting the text box visible to false, it gives a run time error '5' msg. Problem is that a couple of other procedures within the code is dependent on this text box field, and somehow setting it to invisible makes the other parts don't work properly.
i know its a bit confusing, and the effect im trying to acheive may be trivial. And it's mainly for asthetic purposes, just so users who are not supposed to know theres a textbox there, wont find the blinking cursor distracting. I just thought there might be a simple on/off control to get rid of it.
still open to other ideas :o)
thanks.
|
|

December 23rd, 2004, 04:51 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Vadivel is correct: if some user is NOT supposed to use that textbox, then that TextBox should be either invisible (visible=False) or inactive (Enabled=False). Remember that a controls not visible or disable cannot have the focus. Just changing the cursor is not a valid option. You have to revisit your code.
Marco
|
|

December 27th, 2004, 07:58 AM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hey morphy,
Changing the visibility of the text box won't help...maybe what you can do is that you can either change the TabIndex of the textbox....or when the form runs, give the statement that sets the focus on the command button...commandbutton.setFocus. By this the focus would be on the command button hence avoiding the cursor to be on the text box....Try these..one out of these 2 should definitely work....
|
|

December 29th, 2004, 02:01 AM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi All.
Thanks for the help, I manage to try out some of the suggestions given and pretty much got the effect that i wanted. Had to do some minor adjustments to my code structure though.
Thanks again.
cheers.
|
|

June 7th, 2007, 02:56 PM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Can you tell me what is your solution. I have same issue as yours. Thanks a lot.
|
|
 |