🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #15351

Adding code to LostFocus in control in a Usercontrol

#15351
From: Koen Van Impe
Date: Tue, 10 Oct 2000 00:00
28 lines
1382 bytes
Hello,

Here's a real beginner problem with Active-X Usercontrols.

I'm writing a kind of wrapper around a textbox;

When I write in the Usercontrol the following line of code :

Private Sub Text1_GotFocus()
    Text1.BackColor = &H80FFFF
End Sub
Private Sub Text1_LostFocus()
    Text1.BackColor = &H80000005
End Sub


Everything works well when I place the control on my testform.

But when I place some code in the UserControl_GotFocus() (on the testform)
VB just seems to "forget" that there is some other code in the UserControl
itself.

Does anyone has a clue what could be wrong?

Best Regards,

Koen Van Impe
koen.vanimpe@programmer.net
Technical Details
Message-ID: <pSBE5.861$Aw3.21955@iguano.antw.online.be>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcea4,e43c87e0aed0fa30,start
X-Google-Attributes: gidfcea4,public
From: "Koen Van Impe" <koenvan_impe@compuserve.com>
Subject: Adding code to LostFocus in control in a Usercontrol
Date: 2000/10/10
Message-ID: <pSBE5.861$Aw3.21955@iguano.antw.online.be>
X-Deja-AN: 679649206
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
X-Complaints-To: news-abuse@noc.online.be
X-Trace: iguano.antw.online.be 971172373 62.112.6.172 (Tue, 10 Oct 2000 11:06:13 WET DST)
Organization: Customer Of Online Internet Nv/Sa
X-MSMail-Priority: Normal
NNTP-Posting-Date: Tue, 10 Oct 2000 11:06:13 WET DST
Newsgroups: be.comp.programming