1
使用System.Windows.Forms的我已經開始寫這樣的Visual Studio 2005中宏:在Visual Studio中宏
Public Sub myMacro()
Dim myListBox As New System.Windows.Forms.ListBox()
For Each x As String In xs
myListBox.Items.Add(x)
Next
但我在一個頭緒來顯示ListBox
很完全,
我想類似這樣的InputBox例如行爲:
Dim str As String = InputBox("title", "prompt")
正如我們所看到的InputBox
可以立即構建並顯示在屏幕上,再一旦箱子關閉,就轉動String
。
我想呼籲myListBox
以下方法xs
與String
小號填充它之後,但在ListBox
仍然沒有出現在屏幕的:
myListBox.EndUpdate()
myListBox.Show()
我還試圖建立一個System.Windows.Forms.Form
並添加按照與按鈕here (under Examples, Visual Basic)的概述類似的方法,向其輸入ListBox
。 form.ShowDialog()
電話再次沒有出現。
您是否添加了對System.Windows.Forms程序集的引用?順便說一句,我想你會需要詳細說明,因爲我真的不能看到ListBox和InputBox提示之間的任何關係。 – Cerebrus 2009-05-22 11:55:34