By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Class Question

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
Cor
Hi OHM

The answer was OK, you have seen them

:-)

Cor
Nov 20 '05 #5

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.