Wrox Programmer Forums
|
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
 
Old December 22nd, 2004, 02:58 AM
Registered User
 
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!
 
Old December 22nd, 2004, 03:00 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old December 22nd, 2004, 11:14 PM
Registered User
 
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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!

 
Old December 23rd, 2004, 01:42 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

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
 
Old December 23rd, 2004, 02:30 AM
Registered User
 
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old December 23rd, 2004, 04:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old December 27th, 2004, 07:58 AM
Registered User
 
Join Date: Dec 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to raghav_shenoy Send a message via Yahoo to raghav_shenoy
Default

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....
 
Old December 29th, 2004, 02:01 AM
Registered User
 
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old June 7th, 2007, 02:56 PM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you tell me what is your solution. I have same issue as yours. Thanks a lot.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Magnetic Cursor - Target Area Cursor? gcarcass .NET Framework 2.0 1 May 5th, 2008 07:20 AM
Links that disappear Surre ASP.NET 1.0 and 1.1 Professional 8 February 2nd, 2007 11:15 AM
Radio buttons disappear JoeBob49 ASP.NET 2.0 Basics 2 November 27th, 2006 09:57 AM
Strange graphic appear-disappear karib HTML Code Clinic 5 June 14th, 2006 02:43 PM
Menu disappear! Tachyophan Excel VBA 0 December 19th, 2003 03:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.