From: Helmut Meukel on
Hmmm,

before I wrote my first post, I created a small test app - nothing fancy,
just 1 form with an array of 3 checkboxes and 1 textbox. No code at all.
Then I changed - in design mode - 2 Properties of the textbox:
Text1.TabOrder = 0 'was 3
Text1.Left = -20000
Now the textbox was not visible any more, but Text1.Visible was still True
When I run the app from the IDE or I compile the exe and run the compiled
exe
I get the form without the focus visible. Then I can tab through the
controls.
As Larry mentioned, the fourth tab keystroke sets the tab back to the
"invisible"
Textbox.

So it works on my system.
I used Win2000, latest SP + VB6, SP6.

After reading your answer I testet the small exe on a Windows7 system and it
worked fine.
So I started VB6 on that Win7 system, loaded the projekt, run it in the IDE:
worked fine.
Then I compiled it on the Win7 system and run the new exe: worked fine.

I can't understand why it didn't work for you.

Helmut.

I opened the form file in notepad and pasted it at the end of this answer,
have a look at it.


"Claire" <replyto(a)fra> schrieb im Newsbeitrag
news:OO0k8gTqKHA.4492(a)TK2MSFTNGP05.phx.gbl...
>I tried that before and it does not work for me.
> Claire
>
> "Helmut Meukel" <NoSpam(a)NoProvider.de> wrote in message
> news:eiaS2kQqKHA.4492(a)TK2MSFTNGP05.phx.gbl...
>> How about an enabled, visible but hidden control? (a PictureBox, Textbox,
>> any control that can receive the focus will do).
>> Set its TabIndex to 0. and Left to -20000.
>> If you set Visible to false the Checkbox with the lowest TabIndex
>> will get the focus, but Visible = True and with Left = -20000 out of
>> sight
>> it will get the focus.
>>
>> Helmut.
>>
>>
>> "Claire" <replyto(a)fra> schrieb im Newsbeitrag
>> news:eLGSFxPqKHA.1796(a)TK2MSFTNGP02.phx.gbl...
>>> How to not display focus at startup when the form contains the array of
>>> check boxes covering the whole form?
>>> Claire
>>>
>>
>

VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2484
ClientLeft = 48
ClientTop = 348
ClientWidth = 3756
LinkTopic = "Form1"
ScaleHeight = 2484
ScaleWidth = 3756
StartUpPosition = 3 'Windows Default
Begin VB.CheckBox Check1
Caption = "Check1"
Height = 372
Index = 2
Left = 120
TabIndex = 3
Top = 1080
Width = 1212
End
Begin VB.CheckBox Check1
Caption = "Check1"
Height = 372
Index = 1
Left = 120
TabIndex = 2
Top = 600
Width = 1212
End
Begin VB.CheckBox Check1
Caption = "Check1"
Height = 372
Index = 0
Left = 120
TabIndex = 1
Top = 120
Width = 1212
End
Begin VB.TextBox Text1
Height = 288
Left = -20000
TabIndex = 0
Text = "Text1"
Top = 2040
Width = 1092
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

From: Mike Williams on
"Helmut Meukel" <NoSpam(a)NoProvider.de> wrote in message
news:uCNB%23bWqKHA.3848(a)TK2MSFTNGP06.phx.gbl...

> Then I compiled it on the Win7 system and run the new exe: worked fine.
> [Addressed to Claire] I can't understand why it didn't work for you

Reading through your initial post my guess is that Claire "skip read" it and
failed to notice the second half of your sentence:

"If you set [Picbox] Visible to false the Checkbox with the
lowest TabIndex will get the focus, but Visible = True and
with Left = -20000 out of sight it will get the focus".

Mike




From: Karl E. Peterson on
Claire wrote:
> does not work for me.

No way to troubleshoot that. Thanks for playing!

--
..NET: It's About Trust!
http://vfred.mvps.org