تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] تصحيح مشكلة في المشروع
#2
PHP كود :
Public Class frmMain

    Dim forms
() As Form = {Form1Form2Form3Form4Form5}
 
   Dim cCurrent As Integer 0

    Private Sub frmMain_Load
(ByVal sender As ObjectByVal e As EventArgsHandles MyBase.Load
        Panel1
.Width Me.Width
        getForm
(cCurrent)
 
   End Sub


    Private Sub Button1_Click
(ByVal sender As ObjectByVal e As EventArgsHandles Button1.Click
        MovePrevious
()
 
   End Sub

    Private Sub Button2_Click
(ByVal sender As ObjectByVal e As EventArgsHandles Button2.Click
        MoveNext
()
 
   End Sub

    Private Sub MovePrevious
()
 
       If cCurrent 0 Then
            cCurrent 
-= 1
            getForm
(cCurrent)
 
       End If
 
   End Sub

    Private Sub MoveNext
()
 
       If cCurrent forms.Count 1 Then
            cCurrent 
+= 1
            getForm
(cCurrent)
 
       End If
 
   End Sub

    Sub getForm
(ByVal index)
 
       Panel1.Controls.Clear()
 
       forms(index).FormBorderStyle Windows.Forms.FormBorderStyle.None
        forms
(index).Dock DockStyle.Fill
        forms
(index).TopLevel False
        forms
(index).Show()
 
       Panel1.Controls.Add(forms(index))
 
   End Sub

End 
Class 
الرد }}}
تم الشكر بواسطة: dubai.eig


الردود في هذا الموضوع
تصحيح مشكلة في المشروع - بواسطة dubai.eig - 17-10-17, 11:03 AM
RE: تصحيح مشكلة في المشروع - بواسطة a.ahmed - 17-10-17, 12:30 PM
RE: تصحيح مشكلة في المشروع - بواسطة dubai.eig - 17-10-17, 12:41 PM


التنقل السريع :


يقوم بقرائة الموضوع: