Click here to Skip to main content
15,904,351 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Resize Image Pin
TwoFaced22-Apr-07 7:04
TwoFaced22-Apr-07 7:04 
GeneralRe: Resize Image Pin
Christian Graus22-Apr-07 12:09
protectorChristian Graus22-Apr-07 12:09 
QuestionComplex Calculator Pin
Aptiva Dave19-Apr-07 17:29
Aptiva Dave19-Apr-07 17:29 
AnswerRe: Complex Calculator Pin
The ANZAC19-Apr-07 19:11
The ANZAC19-Apr-07 19:11 
AnswerRe: Complex Calculator Pin
The ANZAC20-Apr-07 0:53
The ANZAC20-Apr-07 0:53 
GeneralRe: Complex Calculator Pin
Aptiva Dave20-Apr-07 14:51
Aptiva Dave20-Apr-07 14:51 
GeneralRe: Complex Calculator Pin
Aptiva Dave21-Apr-07 18:36
Aptiva Dave21-Apr-07 18:36 
QuestionRowChanged DataTable Event proplme Pin
ora-dbaabode19-Apr-07 13:38
ora-dbaabode19-Apr-07 13:38 
I have a Class (Class1) and a Form (Form1)that have a object (cl as Class1)
Whene I added a first new DataRow to a DataTable in cl a Sub (Row_Changed)was called One time
and Whene I added a Second new DataRow to a DataTable in cl a Sub (Row_Changed)was calling two times

I Want a Sub was called One time



------------------------------------------------------------------------------

Public Class Class1

Public Dt As New DataTable

Dim N As Integer

Sub New()

End Sub

Private Sub Row_Changed(ByVal Sender As Object, ByVal e As DataRowChangeEventArgs)

If e.Action = DataRowAction.Add Then

e.Row(1) = N - 1

MsgBox(e.Action.ToString & Str(N) & "," & e.Row(1))

End If

End Sub

Public Sub Start()

AddHandler Dt.RowChanged, AddressOf Row_Changed

End Sub

End Class


--------------------------------------------------------------------------------

Public Class Form1

Dim N As Integer

Dim Cl As New Class1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'TestDataSet.Tables(0) has Two Column

Cl.Dt = TestDataSet.Tables(0)

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Cl.Start()

Dim Dr As DataRow

N += 1

Dr = Cl.Dt.NewRow

Dr(0) = N

Dr(1) = Str(N)

Cl.Dt.Rows.Add(Dr)

End Sub

End Class




AnswerRe: RowChanged DataTable Event proplme Pin
Polymorpher19-Apr-07 16:25
Polymorpher19-Apr-07 16:25 
QuestionDLL Initialization Pin
Polymorpher19-Apr-07 12:16
Polymorpher19-Apr-07 12:16 
AnswerRe: DLL Initialization Pin
Dave Kreskowiak19-Apr-07 14:50
mveDave Kreskowiak19-Apr-07 14:50 
GeneralRe: DLL Initialization Pin
Polymorpher19-Apr-07 16:20
Polymorpher19-Apr-07 16:20 
GeneralRe: DLL Initialization Pin
KevinMac19-Apr-07 18:19
KevinMac19-Apr-07 18:19 
GeneralRe: DLL Initialization Pin
Polymorpher20-Apr-07 6:57
Polymorpher20-Apr-07 6:57 
QuestionApplication.ThreadException [modified] Pin
Polymorpher19-Apr-07 11:57
Polymorpher19-Apr-07 11:57 
QuestionAdd rows from one datagridview to another Pin
Hansduncan19-Apr-07 11:06
Hansduncan19-Apr-07 11:06 
AnswerRe: Add rows from one datagridview to another Pin
dptalt20-Apr-07 2:39
dptalt20-Apr-07 2:39 
GeneralRe: Add rows from one datagridview to another Pin
Hansduncan20-Apr-07 20:47
Hansduncan20-Apr-07 20:47 
GeneralRe: Add rows from one datagridview to another Pin
dptalt23-Apr-07 2:32
dptalt23-Apr-07 2:32 
GeneralRe: Add rows from one datagridview to another Pin
Hansduncan23-Apr-07 2:51
Hansduncan23-Apr-07 2:51 
QuestionCancel Event Pin
dptalt19-Apr-07 10:30
dptalt19-Apr-07 10:30 
AnswerRe: Cancel Event Pin
nlarson117-May-07 7:41
nlarson117-May-07 7:41 
QuestionSerialNumber of an Xp Machine Pin
Thoombath19-Apr-07 10:26
Thoombath19-Apr-07 10:26 
AnswerRe: SerialNumber of an Xp Machine Pin
Dave Kreskowiak19-Apr-07 15:32
mveDave Kreskowiak19-Apr-07 15:32 
GeneralRe: SerialNumber of an Xp Machine Pin
Thoombath20-Apr-07 4:47
Thoombath20-Apr-07 4:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.