From: Mr. X. on
Hello.
I want to do by force : RowEnter event of DataGridViewObject.

I made a function on my code :
Public Sub ReEnter()
Invoke(New EventHandler(AddressOf dg_RowEnter))
End Sub

Where dg_RowEnter is the event :
Private Sub dg_RowEnter(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles Me.RowEnter


Why I don't reach the sub : dg_RowEnter, as I have described in the code
above?

Thanks :)

From: Armin Zingler on
Am 24.04.2010 10:04, schrieb Mr. X.:
> Hello.
> I want to do by force : RowEnter event of DataGridViewObject.
>
> I made a function on my code :
> Public Sub ReEnter()
> Invoke(New EventHandler(AddressOf dg_RowEnter))
> End Sub
>
> Where dg_RowEnter is the event :
> Private Sub dg_RowEnter(ByVal sender As System.Object, ByVal e As
> System.Windows.Forms.DataGridViewCellEventArgs) Handles Me.RowEnter
>
>
> Why I don't reach the sub : dg_RowEnter, as I have described in the code
> above?

Why do you use Invoke? It's used for cross-thread calls.
And why call an event handler? Which event occured?

If you want to set the currenct cell, you have to set a property or
call a method of the control.

--
Armin
From: Mr. X. on
I want to force RowEnter event (Which exists on DataGridView).
Like forcing clicking on button.
On some languages I assume it is called fireEvent).
I don't want to set the current cell, just do RowEnter, for instance.

Thanks :)

"Armin Zingler" <az.nospam(a)freenet.de> wrote in message
news:OULt2254KHA.980(a)TK2MSFTNGP04.phx.gbl...
> Am 24.04.2010 10:04, schrieb Mr. X.:
>> Hello.
>> I want to do by force : RowEnter event of DataGridViewObject.
>>
>> I made a function on my code :
>> Public Sub ReEnter()
>> Invoke(New EventHandler(AddressOf dg_RowEnter))
>> End Sub
>>
>> Where dg_RowEnter is the event :
>> Private Sub dg_RowEnter(ByVal sender As System.Object, ByVal e As
>> System.Windows.Forms.DataGridViewCellEventArgs) Handles Me.RowEnter
>>
>>
>> Why I don't reach the sub : dg_RowEnter, as I have described in the code
>> above?
>
> Why do you use Invoke? It's used for cross-thread calls.
> And why call an event handler? Which event occured?
>
> If you want to set the currenct cell, you have to set a property or
> call a method of the control.
>
> --
> Armin

From: Armin Zingler on
Am 24.04.2010 14:02, schrieb Mr. X.:
> I want to force RowEnter event (Which exists on DataGridView).
> Like forcing clicking on button.
> On some languages I assume it is called fireEvent).
> I don't want to set the current cell, just do RowEnter, for instance.

Whenever the sun shines, your solar cells work and the generated
power switches a lever. If it's dark, you have to switch the lever
manually instead of trying to make the sun shine.


--
Armin
From: Cor Ligthert[MVP] on
ROFL,

With what Armin shows that he has already answered your question in the
previous message.

Calling the Row change method

MyRowChangeMethod(nothing,nothing)

If you use the sender and the eventsarguments in your invoked method, then
you have first to set that sender and eventsargs

MyRowChangeMethod(myCreatedSender,MyCreatedEeventsArgument)



"Armin Zingler" <az.nospam(a)freenet.de> wrote in message
news:eEDDdb74KHA.5848(a)TK2MSFTNGP06.phx.gbl...
> Am 24.04.2010 14:02, schrieb Mr. X.:
>> I want to force RowEnter event (Which exists on DataGridView).
>> Like forcing clicking on button.
>> On some languages I assume it is called fireEvent).
>> I don't want to set the current cell, just do RowEnter, for instance.
>
> Whenever the sun shines, your solar cells work and the generated
> power switches a lever. If it's dark, you have to switch the lever
> manually instead of trying to make the sun shine.
>
>
> --
> Armin
>