Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > WithEvents and Control Arrays


Reply
 
Thread Tools Display Modes
  #1  
Old 09-16-2003, 01:29 PM
rbulph rbulph is offline
Junior Contributor
 
Join Date: Dec 2002
Posts: 401
Default WithEvents and Control Arrays


When I set a WithEvents variable to refer to a control it works fine except in cases where the control is an item in a control array. In that case I get error message 459, "Object or class does not support the set of events". Why doesn't this work?
Reply With Quote
  #2  
Old 09-16-2003, 03:24 PM
Thinker Thinker is offline
Iron-Fisted Programmer

Retired Moderator
* Guru *
 
Join Date: Jul 2001
Location: Fayetteville Arkansas USA
Posts: 18,127
Default

Control arrays are a hybrid object. VB is smart enough to understand
that the events raised by controls in a control array need the extra
Index parameter. But if you try to declare a control variable withevents,
it can't deal with that index parameter.
__________________
Posting Guidelines
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Control in Form at Runtime - No Control Array Purdue2379 General 10 03-28-2003 04:23 PM
Add Control in Form at Runtime - No Control Array Hasin General 2 09-21-2002 05:46 AM
Control arrays kansao General 2 05-27-2002 05:02 PM
Fire an event on an arrayed control turlough General 2 05-15-2001 06:04 AM
Control Array and WithEvents JDT General 0 04-09-2001 12:34 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->