hi, i'm making an app for PPC2003 where i have a custom control, the project where my control is opens all right, but when i add my control to a form and try to see the designer view vs crashes, saying there has been an invalidoperationexception and vs must close. now i've been dealing with this prob, for some days now, but until today instead of opening the view of the designer after telling me that vs needs to close, it showed me the following error
Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at Microsoft.CompactFramework.Design.NonMergingPropertyDescriptor.SetValue(Object component, Object val)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
any help on how to fix this error on my code
thanks!!
CamonZ

help with vs2005 crashing because of my code
u771381
let's imagine we have a custom control named OscilloscopeGrid and a Control named TriggerBar.
OscilloscopeGrid inherits from usercontrol and Triggerbar from Control, now OscilloscopeGrid uses Triggerbar as an added control
Triggerbar has fields such as:
int Triggervalue;
now what triggered the crash was if i changed one of the properties of any of the child controls of OscilloscopeGrid when those children are being initialized (i.e. OscilloscopeGrid.InitializeComponents() )
so assuming i have a TriggerBar called Trigger;
private void InitializeComponent()
{
this.Trigger = new OscilloscopeComponents.TriggerBar();
this.SuspendLayout();
//
// Trigger
//
this.Trigger.Active = false;
this.Trigger.Location = new System.Drawing.Point(0, 0);
this.Trigger.Name = "Trigger";
this.Trigger.Size = new System.Drawing.Size(1, 189);
this.Trigger.TabIndex = 1;
//now the next line is the one that triggers the crash
this.Trigger.Triggervalue = 0;
//
// OscillosCopeGrid
//
this.BackColor = System.Drawing.Color.Black;
this.Controls.Add(this.Trigger);
this.Name = "OscillosCopeGrid";
this.Size = new System.Drawing.Size(320, 189);
this.DoubleClick += new System.EventHandler(this.OscillosCopeGrid_DoubleClick);
this.Click += new System.EventHandler(this.OscillosCopeGrid_Click);
this.ResumeLayout(false);
this._ADiv = 20;
this.opmode = 0;
this._VDiv = 20;
this._TimeControlVal = 0.8;
}
so, any insight on why this cannot be done would be helpful
P.S. sorry for most of the code looking like it's commented it's not my fault :-)
thanks!!
CamonZ