電腦VB程式....

有人知道....

哪裡有在交人寫VB程式的嗎!?

想寫一個程式..來整整人

呵呵...

Update:

可是我的是6.0板的ˇˇ

可以用來寫6.

Update 2:

好像不行耶...

顯示說 必須陳述式

Update 3:

Private Sub Form_Unload(VB6.0)

這一行...

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

這也是...

Update 4:

他說我這裡

Private Sub Form_Unload(Cancel As Integer)

Dim a As Integer

For a = 1 To 100

Dim i As Form = New Form2

i.Show()

Next

語法錯誤...

請問 Form2....不是在右上角那

表單那邊 在新增一個嗎!?

還是我用錯了?

Update 5:

程式...是都沒問題了!!

可是我按測試的時候

把它關閉 沒出現東西耶...

我Form2....是在右上角那 就是表單那邊

新增一個表單的

這樣對嗎!?

Update 6:

我程式寫成功了

但是...

可以用結束工作結束掉耶

可以改不能用工作結束嗎!?

1 Answer

Rating
  • x32768
    Lv 5
    1 decade ago
    Favorite Answer

    ''''''''''''''''''''''''VB2005

    ''''''''''''新增兩個 Form 為 Form1 及 Form2

    Public Class Form1

    Private Sub Form1_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed

    Dim a As Integer

    For a = 1 To 100

    Dim i As Form = New Form2

    i.Show()

    Next

    End Sub

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

    Me.Text = ""

    End Sub

    End Class

    Public Class Form2

    Private Sub Form2_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed

    Dim a As Integer

    For a = 1 To 100

    Dim i As Form = New Form1

    i.Show()

    Next

    End Sub

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

    Me.Text = ""

    End Sub

    End Class

    ''''''''''''''''''''''''''''''''''''''''一按關閉就會多出 100 個表單, 按重開鍵重新啟動即可恢復.

    2007-09-16 21:50:26 補充:

    Private Sub Form1_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed => Private Sub Form_Unload(VB6.0)

    Me.text => me.caption

    Public Class Form1 及 End Class 刪除

    2007-09-17 21:56:52 補充:

    哪一行不行?

    2007-09-20 21:02:42 補充:

    Private Sub Form1_Load(ByVal .............EventArgs) Handles MyBase.Load =>Private Sub Form_Load() '''''其實就是直接按兩下表單進入的那段程式

    Private Sub Form_Unload(VB6.0)'''''''(VB6.0)只是表示 6.0 版的用法, 你該不會照打進去吧 => Private Sub Form_Unload(Cancel AS Integer) '''從程式碼右上角的清單選取 Unload 就會自動出現了

    2007-09-22 12:57:19 補充:

    Dim i As Form = New Form2 => Dim i As New Form2 ''''''''''''''(VB6.0)

    2007-09-22 12:58:10 補充:

    Dim i As Form = New Form1 => Dim i As New Form1 ''''''''''''''這裡也要改

    2007-09-24 00:47:00 補充:

    如果可以的話那還叫做整人程式嗎?

    2007-09-26 18:27:28 補充:

    6.0 版的是乎可以, 不過 2005 版的可就沒那麼好對付了.

Still have questions? Get your answers by asking now.