Jak umieszczę taki kod w konstruktorze kontrolki lub w zdarzeniu Load():
this.lightimg = Image.FromFile("zapalona.bmp");
this.darkimg = Image.FromFile("zgaszona.bmp");
to wyskakuje błąd:
To prevent possible data loss before loading the designer, the following errors must be resolved:
1 Error
Ignore and Continue
Why am I seeing this page?The variable 'testDiody1' is either undeclared or was never assigned. Go to code
Instances of this error (1)
- TestDiody Form1.Designer.cs Line:61 Column:1 Show Call Stack
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)Help with this error
MSDN Help
Forum posts about this error
Search the MSDN Forums for posts related to this error
O co chodzi?