Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

"The parameter is incorrect" error in CreateGraphics

$
0
0

I got the error when running the following UI code in a certain scenario.  What would make the error happen?

DimtbAsNewListBox

DimgrAsGraphics= tb.CreateGraphics()

Following is the stack trace:

<StackTrace>

   at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass()

   at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, Int32 classStyle)

   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)

   at System.Windows.Forms.Control.CreateHandle()

   at System.Windows.Forms.Control.get_Handle()

   at System.Windows.Forms.Control.CreateGraphicsInternal()

  at System.Windows.Forms.Control.CreateGraphics()



Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>