From: Mugunth on 21 Dec 2006 04:39 Try, Form.Visible = false; Regards, Mugunth nhmark64(a)newsgroup.nospam wrote: > Hi, > > Sometimes when I execute this.Opacity = 0; in the Main thread I get > the below exception: > > System.ComponentModel.Win32Exception was unhandled by user code > Message="Not enough storage is available to process this command" > Source="System.Windows.Forms" > ErrorCode=-2147467259 > NativeErrorCode=8 > StackTrace: > at System.Windows.Forms.Form.UpdateLayered() > at System.Windows.Forms.Form.set_Opacity(Double value) > at eV.PpvForm.makeNotVisible() > at > System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry > tme) > at > System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) > at > System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry > tme) > at System.Windows.Forms.Control.InvokeMarshaledCallbacks() > > > I checked disk space and swap file utilization, didn't see anything > that could cause a "Not enough storage" error. > > In my application the user sees either the Main thread Form or > another Form named "menu". There is a 3rd thead that uses the 2 Forms > that does most of the work of the program. Both the Main Form and the > "menu" Form run in the identical location and are identical in size, I > don't want the user to know there are 2 Forms. When viewing the > "menu" Form minimizing the Main Form doesn't work, so I am trying > Opaity=0. The Main Form and the "menu" Form are totally different, I > don't want to try to force the 2 together, it would make some really > ugly code. Why am I getting the above exception? Is there a better > way to hide the Main Form? > > Thanks, > Mark
|
Pages: 1 Prev: this.Opacity = 0; line caused Win32Exception Next: Drag & Drop into Custom DataGridView |