TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kirti zare
NA
10
1.7k
MdiChildren Length Incorrect When Closing Application
Jul 24 2015 7:26 AM
Hello,
1. I am making an application in which i am using mdiform and having multiple child form
2. I am using previous and next button to navigate from one child to another
following is my code
Private Sub Form1_MdiChildActivate(sender As Object, e As EventArgs) Handles MyBase.MdiChildActivate
Dim frmact = Me.ActiveMdiChild
Dim i = Array.IndexOf(Me.MdiChildren, frmact)
If i = 0 AndAlso Me.MdiChildren.Length = 1 Then
btnNext.Enabled = False
btnPrevious.Enabled = True
ElseIf i = 0 AndAlso Me.MdiChildren.Length > 1 Then
btnNext.Enabled = True
btnPrevious.Enabled = False
ElseIf i = Me.MdiChildren.Length - 1 Then
btnNext.Enabled = False
btnPrevious.Enabled = True
Else
btnNext.Enabled = True
btnPrevious.Enabled = True
End If
If Me.ActiveMdiChild Is Nothing Then
btnNext.Enabled = False
btnPrevious.Enabled = False
End If
End Sub
but when i am closing the mdichild form mdichildrenlength showing in correct
If you have any solution then i like to use that solution
Thanks in advance
Reply
Answers (
0
)
Manipulate merged fields in Word document using C#
how to print .rdlc report on button click