|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Problem with inherits listview in a class component I have a Visual basic.net containing 3 project: - The main windows - Classes - The user controls (CTRLUser) I want to add in CTRLUser a "class component" (LVGreen) inheriting a ListView classic. So I: Code: Public Class LVGreen Inherits ListView End Class Quote:
|
#2
| |||
| |||
Re: Problem with inherits listview in a class component Code: Public Class LVGreen Inherits System.Windows.Forms.ListView End Class |
#3
| |||
| |||
Re: Problem with inherits listview in a class component Already tried that but got this error: Quote:
|
#4
| |||
| |||
Re: Problem with inherits listview in a class component Your custom control is actually split into 2 files: - LVGreen.vb, you can freely modify - LVGreen.designer.vb used by the designer (by default it is hidden within Visual) The class LVGreen is divided into 2 parts through the technique of "partial classes" But it requires that different parts of the class defines all the same inherited class, or in the file designer.vb it is said that the class inherits from Component. It is therefore necessary that you change this file (it is usually never change) to set ListView instead of Component Incidentally, it is a little weak as the base class is declared in the designer.vb, since it prevents the developer to modify (well, to change easily). I suppose it reflects the will of Microsoft to make Visual Basic as a language "easier" by hiding the complexity of the developer. In C# the base class is declared in the file that the user can edit, which is still more logical. |
![]() |
|
Tags: vbnet, visual basic |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with Listview Controls in VB.NET | Abel18 | Software Development | 6 | 08-10-2011 09:10 PM |
how to use Vscrollbars with Listview | Suffix | Software Development | 1 | 01-10-2011 11:46 AM |
DRM Problem -Security Component Upgrade | Buriim | MediaCenter | 8 | 15-01-2011 03:50 PM |
WDTV Live Component Video Problem | RAJalias | Windows Software | 5 | 21-12-2009 02:30 PM |
Problem downloading the ActiveX component | Sentential | Technology & Internet | 3 | 24-11-2008 06:54 PM |