Benutzer mit den meisten Antworten
TextBox AutoComplete Fehler

Frage
-
Hallo zusammen,
Ich habe wieder einmal ein Problem:
In meinem Skript habe ich ein AutoComplete auf eine TextBox eingebaut.
In der Powershell ISE funktioniert es auch soweit so gut, aber sobald ich es mit Powershell selber ausführe, gibt es folgenden Fehler:[URL=http://www.pic-upload.de/view-13095167/SNAG-0000.png.html][IMG]http://www10.pic-upload.de/thumb/24.02.12/83t4d6tycrww.png[/IMG][/URL]
Danach habe ich, weil ich dachte mein Skript ist schuld, mit PrimalForms eine TextBox mit AutoComplete generiert. Selbes Resulutat
Code:
#Generated Form Function function GenerateForm { ######################################################################## # Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.10.0 # Generated On: 24.02.2012 12:28 # Generated By: rcbf ######################################################################## #region Import the Assemblies [reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null [reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null #endregion #region Generated Form Objects $form1 = New-Object System.Windows.Forms.Form $textBox1 = New-Object System.Windows.Forms.TextBox $InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState #endregion Generated Form Objects #region Generated Form Code $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Height = 291 $System_Drawing_Size.Width = 387 $form1.ClientSize = $System_Drawing_Size $form1.DataBindings.DefaultDataSourceUpdateMode = 0 $form1.Name = "form1" $form1.Text = "Primal Form" $textBox1.AutoCompleteCustomSource.Add("x3012web")|Out-Null $textBox1.AutoCompleteCustomSource.Add("y3012web")|Out-Null $textBox1.AutoCompleteMode = 1 $textBox1.AutoCompleteSource = 64 $textBox1.DataBindings.DefaultDataSourceUpdateMode = 0 $System_Drawing_Point = New-Object System.Drawing.Point $System_Drawing_Point.X = 138 $System_Drawing_Point.Y = 12 $textBox1.Location = $System_Drawing_Point $textBox1.Name = "textBox1" $System_Drawing_Size = New-Object System.Drawing.Size $System_Drawing_Size.Height = 20 $System_Drawing_Size.Width = 100 $textBox1.Size = $System_Drawing_Size $textBox1.TabIndex = 0 $form1.Controls.Add($textBox1) #endregion Generated Form Code #Save the initial state of the form $InitialFormWindowState = $form1.WindowState #Init the OnLoad event to correct the initial state of the form $form1.add_Load($OnLoadForm_StateCorrection) #Show the Form $form1.ShowDialog()| Out-Null } #End Function #Call the Function GenerateForm
Antworten
-
Hallo,
starte mal die Shell im "Single Thread Apartment" ("powershell.exe -sta"). Geht Dein Skript jetzt?
Das Ganze wurde auch vor nicht allzu langer Zeit hier diskutiert:
Viele Grüße
Frank
-- Frank Röder blog.iteach-online.de --
- Als Antwort markiert Powerturtle Freitag, 24. Februar 2012 13:41
Alle Antworten
-
Hallo,
starte mal die Shell im "Single Thread Apartment" ("powershell.exe -sta"). Geht Dein Skript jetzt?
Das Ganze wurde auch vor nicht allzu langer Zeit hier diskutiert:
Viele Grüße
Frank
-- Frank Röder blog.iteach-online.de --
- Als Antwort markiert Powerturtle Freitag, 24. Februar 2012 13:41