VisualBasic.NET

Public Class cChild
    '呼び出されるクラス
    Inherits System.Windows.Forms.Form

+ Windows フォーム デザイナで生成されたコード

    Public Sub Run()
        Me.ShowDialog()
        'Me.Show だと呼び出されてすぐ消えてしまう。
    End Sub
End Class
Public Class cParent
    Public Sub Call()
        Dim NewThread As System.Threading.Thread
        Dim ChildForm As New cChild

        NewThread = New System.Threading.Thread(Addressof ChildForm.Run)

        NewThread.Start()
    End Public
End Class

トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2007-05-22 (火) 21:06:19 (6174d)