Connecting Tech Pros Worldwide Forums | Help | Site Map

Drawing error,Help!Help!Help!

zengou
Guest
 
Posts: n/a
#1: Nov 15 '05
My application have many picturebox objects,when run it ,sometimes i will have a strange error,how to work out ,help me please!(in windows98,the error cause frequently than in windowsxp)

System.InvalidOperationExceptionSystem.InvalidOper ationException: The object is currently in use elsewhere.
at System.Drawing.Image.get_Width()
at System.Drawing.Image.get_Size()
at System.Windows.Forms.PictureBox.GetPreferredSize()
at System.Windows.Forms.PictureBox.SetBoundsCore(Int3 2 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
at System.Windows.Forms.LayoutManager.AnchorControl(C ontrol ctl, Rectangle parentDisplayRectangle)
at System.Windows.Forms.LayoutManager.LayoutAnchoredC ontrols(Control container, LayoutEventArgs levent)
at System.Windows.Forms.LayoutManager.OnLayout(Contro l container, LayoutEventArgs levent)
at System.Windows.Forms.Control.OnLayout(LayoutEventA rgs levent)
at System.Windows.Forms.ScrollableControl.OnLayout(La youtEventArgs levent)
at System.Windows.Forms.Control.PerformLayout(Control affectedControl, String affectedProperty)
at System.Windows.Forms.Control.SetBounds(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
at System.Windows.Forms.Control.set_Location(Point value)
at BanZiPao.BanZiPao_Client.MDPlayTurnHandle(String Message)

the code is:
pb_CardEast0.Image=il_Card1.Images[54];
pb_CardEast1.Image=il_Card1.Images[54];
pb_CardEast2.Image=il_Card1.Images[54];
pb_CardEast3.Image=il_Card1.Images[54];
pb_CardEast4.Image=il_Card1.Images[54];
pb_CardEast5.Image=il_Card1.Images[54];
pb_CardEast6.Image=il_Card1.Images[54];
pb_CardEast7.Image=il_Card1.Images[54];
pb_CardEast8.Image=il_Card1.Images[54];
pb_CardEast9.Image=il_Card1.Images[54];
pb_CardEast10.Image=il_Card1.Images[54];
pb_CardEast11.Image=il_Card1.Images[54];
pb_CardEast12.Image=il_Card1.Images[54];

my email:zengou@163.net
thanks!!

zengou
Guest
 
Posts: n/a
#2: Nov 15 '05

re: Drawing error,Help!Help!Help!


help!!!!!!!!!!!!!!1
Closed Thread