473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Class Question

Hi,
I thank everybody who helps me on my previous post..
It works :-)

So, I would like understand something about the class concept.

I create a Class for the datagrid called DataGridEnter.
So when I design a datagrid into my winform, the code is generated in the
#Region
with this syntax
Friend WithEvents dgLcl As System.Windows.Forms.DataGrid

Does it mean I have to update this code with

Friend WithEvents dgLcl As DataGridEnter

Or is there another method to accomplish this ?

Stan
Nov 20 '05 #1
5 928
You need to

1.) Declare this at Class Level
2.) In your constructor after InitializeComponent
Initialise it

Me.DataGrid2 = New SubGrid
CType(Me.DataGrid2, System.ComponentModel.ISupportInitialize).BeginIni t()
'Add any initialization after the InitializeComponent() call
Me.DataGrid2.DataMember = ""
Me.DataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid2.Location = New System.Drawing.Point(300, 72)
Me.DataGrid2.Name = "DataGrid1"
Me.DataGrid2.Size = New System.Drawing.Size(184, 128)
Me.DataGrid2.TabIndex = 0
Me.Controls.Add(DataGrid2)
Regards - OHM

Stan Sainte-Rose wrote:
Hi,
I thank everybody who helps me on my previous post..
It works :-)

So, I would like understand something about the class concept.

I create a Class for the datagrid called DataGridEnter.
So when I design a datagrid into my winform, the code is generated in
the #Region
with this syntax
Friend WithEvents dgLcl As System.Windows.Forms.DataGrid

Does it mean I have to update this code with

Friend WithEvents dgLcl As DataGridEnter

Or is there another method to accomplish this ?

Stan


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
Nov 20 '05 #2
Thanks

And it seems that I have to do it in the
System.diagnostics.DebuggerStepThrough section..
Right ?

Stan

"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> a écrit dans le
message de news:On**************@tk2msftngp13.phx.gbl...
You need to

1.) Declare this at Class Level
2.) In your constructor after InitializeComponent
Initialise it

Me.DataGrid2 = New SubGrid
CType(Me.DataGrid2, System.ComponentModel.ISupportInitialize).BeginIni t()
'Add any initialization after the InitializeComponent() call
Me.DataGrid2.DataMember = ""
Me.DataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid2.Location = New System.Drawing.Point(300, 72)
Me.DataGrid2.Name = "DataGrid1"
Me.DataGrid2.Size = New System.Drawing.Size(184, 128)
Me.DataGrid2.TabIndex = 0
Me.Controls.Add(DataGrid2)
Regards - OHM

Stan Sainte-Rose wrote:
Hi,
I thank everybody who helps me on my previous post..
It works :-)

So, I would like understand something about the class concept.

I create a Class for the datagrid called DataGridEnter.
So when I design a datagrid into my winform, the code is generated in
the #Region
with this syntax
Friend WithEvents dgLcl As System.Windows.Forms.DataGrid

Does it mean I have to update this code with

Friend WithEvents dgLcl As DataGridEnter

Or is there another method to accomplish this ?

Stan


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com

Nov 20 '05 #3
Yes

Stan Sainte-Rose wrote:
Thanks

And it seems that I have to do it in the
System.diagnostics.DebuggerStepThrough section..
Right ?

Stan

"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> a écrit dans
le message de news:On**************@tk2msftngp13.phx.gbl...
You need to

1.) Declare this at Class Level
2.) In your constructor after InitializeComponent
Initialise it

Me.DataGrid2 = New SubGrid
CType(Me.DataGrid2,
System.ComponentModel.ISupportInitialize).BeginIni t() 'Add any
initialization after the InitializeComponent() call
Me.DataGrid2.DataMember = ""
Me.DataGrid2.HeaderForeColor =
System.Drawing.SystemColors.ControlText Me.DataGrid2.Location = New
System.Drawing.Point(300, 72) Me.DataGrid2.Name = "DataGrid1"
Me.DataGrid2.Size = New System.Drawing.Size(184, 128)
Me.DataGrid2.TabIndex = 0
Me.Controls.Add(DataGrid2)
Regards - OHM

Stan Sainte-Rose wrote:
Hi,
I thank everybody who helps me on my previous post..
It works :-)

So, I would like understand something about the class concept.

I create a Class for the datagrid called DataGridEnter.
So when I design a datagrid into my winform, the code is generated
in the #Region
with this syntax
Friend WithEvents dgLcl As System.Windows.Forms.DataGrid

Does it mean I have to update this code with

Friend WithEvents dgLcl As DataGridEnter

Or is there another method to accomplish this ?

Stan


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
Nov 20 '05 #4
Cor
Hi OHM

The answer was OK, you have seen them

:-)

Cor
Nov 20 '05 #5
If your talking about Mr H, then yes !

:0

OHM

Cor wrote:
Hi OHM

The answer was OK, you have seen them

:-)

Cor


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bryan Parkoff | last post by:
I find an interesting issue that one base class has only one copy for each derived class. It looks like that one base class will be copied into three base classes while derived class from base...
20
by: modemer | last post by:
Question is as in subject. For example: class BaseClass { public: void func() { do something; } // I don't want this function being overloaded in its inherited class };
1
by: Alfonso Morra | last post by:
if I have a class template declared as ff: (BTW is this a partial specialization? - I think it is) template <typename T1, myenum_1 e1=OK, my_enum_2=NONE> class A { public: A(); virtual...
21
by: Jon Slaughter | last post by:
I have a class that is basicaly duplicated throughout several files with only members names changing according to the class name yet with virtually the exact same coding going on. e.g. class...
0
by: Sebastian Hiller | last post by:
Hello, i'm new to .Net (i'm using VB as language and i'm working in the code-behind mode) and i can't solve the following problem: I have a WebForm and want to Add a UserControl...
6
by: rodchar | last post by:
Hey all, I'm trying to understand Master/Detail concepts in VB.NET. If I do a data adapter fill for both customer and orders from Northwind where should that dataset live? What client is...
2
by: Chris Puncher | last post by:
Hi. I have a RCW class that was generated by the VS.NET2003 IDE when I added a COM dll reference to my project. This all works fine when I call methods on it. My initial problem is that in...
9
by: needin4mation | last post by:
I have a .aspx file and it's src. I also have a third file, a class that the src references. Everything is in the same directory/folder. Everything has the same namespace. How do I reference the...
43
by: Tony | last post by:
I'm working with GUI messaging and note that MFC encapsulates the message loop inside of a C++ class member function. Is this somehow inherently less robust than calling the message loop functions...
2
by: K Viltersten | last post by:
Suppose there is the following class structure. class S {...} class A : S {...} class B : S {...} class A1 : A {void m(){...}} class B1 : B {void m(){...}} class B2 : B {...} Just to clarify...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.