Loading a User Control Onto Form return error every time program is built











up vote
0
down vote

favorite












Hello im creating a media player program on visual studio using vb.net. A basic feature of my application is a simple GUI navigation system, in which the user can select tabs such as 'Home' and 'upload' and a different page will show on each one. To do this i have created user controls, in which i load onto my main form and simply turn visibility to false when not selected.



The problem is i having been getting errors everytime the program is built/ i close and reopen the program.




The designer cannot process unknown name 'BackColor' at line 324. The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.




Viewing this code directs to this chunk-



'
'Uploader_Control2
'
Me.Uploader_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Uploader_Control2.Location = New System.Drawing.Point(248, 23)
Me.Uploader_Control2.Name = "Uploader_Control2"
Me.Uploader_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control2.TabIndex = 0
'
'Home_Control2
'
Me.Home_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Home_Control2.Location = New System.Drawing.Point(248, 23)
Me.Home_Control2.Name = "Home_Control2"
Me.Home_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control2.TabIndex = 1
'
'Uploader_Control1
'
Me.Uploader_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control1.Location = New System.Drawing.Point(0, 0)
Me.Uploader_Control1.Name = "Uploader_Control1"
Me.Uploader_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control1.TabIndex = 0
'
'Home_Control1
'
Me.Home_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control1.Location = New System.Drawing.Point(0, 0)
Me.Home_Control1.Name = "Home_Control1"
Me.Home_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control1.TabIndex = 0


Deleting this chunk of code removes the error and shows the user controls in my form how i want them. Its starting to become a persistent and annoying issue and despite researching it i have struggled to find any information on how to fix it.



In addition to this loading any of the user controls like this returns a error-



Private Sub Uploader_Control2_Load(sender As Object, e As EventArgs) Handles Uploader_Control2.Load

End Sub



Event load cannot be found




All help appreciated. Thanks in advance.










share|improve this question






















  • You created a custom control? Did you follow these steps, docs.microsoft.com/en-us/dotnet/framework/winforms/controls/… ?
    – dbasnett
    Nov 19 at 15:27










  • Depending which version of VS you're running there was a known issue that toggling the framework may fix: developercommunity.visualstudio.com/content/problem/160241/…
    – Nathan Champion
    Nov 19 at 15:28










  • @NathanChampion I have seen the article and unfortunatley neither of the solutions worked. Any other ideas?
    – Lupe_99
    Nov 19 at 15:37






  • 1




    By chance, Backcolor is the first property set for each control. If you comment out that line, the error will move to the next line. Chances are that the namespace or class name for the user control is mispelled, or was changed between the time the user control was firstly consumed in the form and now. Also, if rebuilding the app causes the user control to be rebuilt as part of the same solution, the .dll will be cleaned up before being recompiled. That's where the errors are coming while recompiling.
    – Alessandro Mandelli
    Nov 19 at 16:12








  • 1




    @Lupe_99 If I assume that you created a custom control.did you inherit UserControl?
    – dbasnett
    Nov 19 at 16:49















up vote
0
down vote

favorite












Hello im creating a media player program on visual studio using vb.net. A basic feature of my application is a simple GUI navigation system, in which the user can select tabs such as 'Home' and 'upload' and a different page will show on each one. To do this i have created user controls, in which i load onto my main form and simply turn visibility to false when not selected.



The problem is i having been getting errors everytime the program is built/ i close and reopen the program.




The designer cannot process unknown name 'BackColor' at line 324. The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.




Viewing this code directs to this chunk-



'
'Uploader_Control2
'
Me.Uploader_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Uploader_Control2.Location = New System.Drawing.Point(248, 23)
Me.Uploader_Control2.Name = "Uploader_Control2"
Me.Uploader_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control2.TabIndex = 0
'
'Home_Control2
'
Me.Home_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Home_Control2.Location = New System.Drawing.Point(248, 23)
Me.Home_Control2.Name = "Home_Control2"
Me.Home_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control2.TabIndex = 1
'
'Uploader_Control1
'
Me.Uploader_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control1.Location = New System.Drawing.Point(0, 0)
Me.Uploader_Control1.Name = "Uploader_Control1"
Me.Uploader_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control1.TabIndex = 0
'
'Home_Control1
'
Me.Home_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control1.Location = New System.Drawing.Point(0, 0)
Me.Home_Control1.Name = "Home_Control1"
Me.Home_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control1.TabIndex = 0


Deleting this chunk of code removes the error and shows the user controls in my form how i want them. Its starting to become a persistent and annoying issue and despite researching it i have struggled to find any information on how to fix it.



In addition to this loading any of the user controls like this returns a error-



Private Sub Uploader_Control2_Load(sender As Object, e As EventArgs) Handles Uploader_Control2.Load

End Sub



Event load cannot be found




All help appreciated. Thanks in advance.










share|improve this question






















  • You created a custom control? Did you follow these steps, docs.microsoft.com/en-us/dotnet/framework/winforms/controls/… ?
    – dbasnett
    Nov 19 at 15:27










  • Depending which version of VS you're running there was a known issue that toggling the framework may fix: developercommunity.visualstudio.com/content/problem/160241/…
    – Nathan Champion
    Nov 19 at 15:28










  • @NathanChampion I have seen the article and unfortunatley neither of the solutions worked. Any other ideas?
    – Lupe_99
    Nov 19 at 15:37






  • 1




    By chance, Backcolor is the first property set for each control. If you comment out that line, the error will move to the next line. Chances are that the namespace or class name for the user control is mispelled, or was changed between the time the user control was firstly consumed in the form and now. Also, if rebuilding the app causes the user control to be rebuilt as part of the same solution, the .dll will be cleaned up before being recompiled. That's where the errors are coming while recompiling.
    – Alessandro Mandelli
    Nov 19 at 16:12








  • 1




    @Lupe_99 If I assume that you created a custom control.did you inherit UserControl?
    – dbasnett
    Nov 19 at 16:49













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Hello im creating a media player program on visual studio using vb.net. A basic feature of my application is a simple GUI navigation system, in which the user can select tabs such as 'Home' and 'upload' and a different page will show on each one. To do this i have created user controls, in which i load onto my main form and simply turn visibility to false when not selected.



The problem is i having been getting errors everytime the program is built/ i close and reopen the program.




The designer cannot process unknown name 'BackColor' at line 324. The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.




Viewing this code directs to this chunk-



'
'Uploader_Control2
'
Me.Uploader_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Uploader_Control2.Location = New System.Drawing.Point(248, 23)
Me.Uploader_Control2.Name = "Uploader_Control2"
Me.Uploader_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control2.TabIndex = 0
'
'Home_Control2
'
Me.Home_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Home_Control2.Location = New System.Drawing.Point(248, 23)
Me.Home_Control2.Name = "Home_Control2"
Me.Home_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control2.TabIndex = 1
'
'Uploader_Control1
'
Me.Uploader_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control1.Location = New System.Drawing.Point(0, 0)
Me.Uploader_Control1.Name = "Uploader_Control1"
Me.Uploader_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control1.TabIndex = 0
'
'Home_Control1
'
Me.Home_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control1.Location = New System.Drawing.Point(0, 0)
Me.Home_Control1.Name = "Home_Control1"
Me.Home_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control1.TabIndex = 0


Deleting this chunk of code removes the error and shows the user controls in my form how i want them. Its starting to become a persistent and annoying issue and despite researching it i have struggled to find any information on how to fix it.



In addition to this loading any of the user controls like this returns a error-



Private Sub Uploader_Control2_Load(sender As Object, e As EventArgs) Handles Uploader_Control2.Load

End Sub



Event load cannot be found




All help appreciated. Thanks in advance.










share|improve this question













Hello im creating a media player program on visual studio using vb.net. A basic feature of my application is a simple GUI navigation system, in which the user can select tabs such as 'Home' and 'upload' and a different page will show on each one. To do this i have created user controls, in which i load onto my main form and simply turn visibility to false when not selected.



The problem is i having been getting errors everytime the program is built/ i close and reopen the program.




The designer cannot process unknown name 'BackColor' at line 324. The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.




Viewing this code directs to this chunk-



'
'Uploader_Control2
'
Me.Uploader_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Uploader_Control2.Location = New System.Drawing.Point(248, 23)
Me.Uploader_Control2.Name = "Uploader_Control2"
Me.Uploader_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control2.TabIndex = 0
'
'Home_Control2
'
Me.Home_Control2.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control2.Dock = System.Windows.Forms.DockStyle.Fill
Me.Home_Control2.Location = New System.Drawing.Point(248, 23)
Me.Home_Control2.Name = "Home_Control2"
Me.Home_Control2.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control2.TabIndex = 1
'
'Uploader_Control1
'
Me.Uploader_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Uploader_Control1.Location = New System.Drawing.Point(0, 0)
Me.Uploader_Control1.Name = "Uploader_Control1"
Me.Uploader_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Uploader_Control1.TabIndex = 0
'
'Home_Control1
'
Me.Home_Control1.BackColor = System.Drawing.Color.FromArgb(CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer), CType(CType(24, Byte), Integer))
Me.Home_Control1.Location = New System.Drawing.Point(0, 0)
Me.Home_Control1.Name = "Home_Control1"
Me.Home_Control1.Size = New System.Drawing.Size(1180, 656)
Me.Home_Control1.TabIndex = 0


Deleting this chunk of code removes the error and shows the user controls in my form how i want them. Its starting to become a persistent and annoying issue and despite researching it i have struggled to find any information on how to fix it.



In addition to this loading any of the user controls like this returns a error-



Private Sub Uploader_Control2_Load(sender As Object, e As EventArgs) Handles Uploader_Control2.Load

End Sub



Event load cannot be found




All help appreciated. Thanks in advance.







vb.net visual-studio






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 at 15:13









Lupe_99

202




202












  • You created a custom control? Did you follow these steps, docs.microsoft.com/en-us/dotnet/framework/winforms/controls/… ?
    – dbasnett
    Nov 19 at 15:27










  • Depending which version of VS you're running there was a known issue that toggling the framework may fix: developercommunity.visualstudio.com/content/problem/160241/…
    – Nathan Champion
    Nov 19 at 15:28










  • @NathanChampion I have seen the article and unfortunatley neither of the solutions worked. Any other ideas?
    – Lupe_99
    Nov 19 at 15:37






  • 1




    By chance, Backcolor is the first property set for each control. If you comment out that line, the error will move to the next line. Chances are that the namespace or class name for the user control is mispelled, or was changed between the time the user control was firstly consumed in the form and now. Also, if rebuilding the app causes the user control to be rebuilt as part of the same solution, the .dll will be cleaned up before being recompiled. That's where the errors are coming while recompiling.
    – Alessandro Mandelli
    Nov 19 at 16:12








  • 1




    @Lupe_99 If I assume that you created a custom control.did you inherit UserControl?
    – dbasnett
    Nov 19 at 16:49


















  • You created a custom control? Did you follow these steps, docs.microsoft.com/en-us/dotnet/framework/winforms/controls/… ?
    – dbasnett
    Nov 19 at 15:27










  • Depending which version of VS you're running there was a known issue that toggling the framework may fix: developercommunity.visualstudio.com/content/problem/160241/…
    – Nathan Champion
    Nov 19 at 15:28










  • @NathanChampion I have seen the article and unfortunatley neither of the solutions worked. Any other ideas?
    – Lupe_99
    Nov 19 at 15:37






  • 1




    By chance, Backcolor is the first property set for each control. If you comment out that line, the error will move to the next line. Chances are that the namespace or class name for the user control is mispelled, or was changed between the time the user control was firstly consumed in the form and now. Also, if rebuilding the app causes the user control to be rebuilt as part of the same solution, the .dll will be cleaned up before being recompiled. That's where the errors are coming while recompiling.
    – Alessandro Mandelli
    Nov 19 at 16:12








  • 1




    @Lupe_99 If I assume that you created a custom control.did you inherit UserControl?
    – dbasnett
    Nov 19 at 16:49
















You created a custom control? Did you follow these steps, docs.microsoft.com/en-us/dotnet/framework/winforms/controls/… ?
– dbasnett
Nov 19 at 15:27




You created a custom control? Did you follow these steps, docs.microsoft.com/en-us/dotnet/framework/winforms/controls/… ?
– dbasnett
Nov 19 at 15:27












Depending which version of VS you're running there was a known issue that toggling the framework may fix: developercommunity.visualstudio.com/content/problem/160241/…
– Nathan Champion
Nov 19 at 15:28




Depending which version of VS you're running there was a known issue that toggling the framework may fix: developercommunity.visualstudio.com/content/problem/160241/…
– Nathan Champion
Nov 19 at 15:28












@NathanChampion I have seen the article and unfortunatley neither of the solutions worked. Any other ideas?
– Lupe_99
Nov 19 at 15:37




@NathanChampion I have seen the article and unfortunatley neither of the solutions worked. Any other ideas?
– Lupe_99
Nov 19 at 15:37




1




1




By chance, Backcolor is the first property set for each control. If you comment out that line, the error will move to the next line. Chances are that the namespace or class name for the user control is mispelled, or was changed between the time the user control was firstly consumed in the form and now. Also, if rebuilding the app causes the user control to be rebuilt as part of the same solution, the .dll will be cleaned up before being recompiled. That's where the errors are coming while recompiling.
– Alessandro Mandelli
Nov 19 at 16:12






By chance, Backcolor is the first property set for each control. If you comment out that line, the error will move to the next line. Chances are that the namespace or class name for the user control is mispelled, or was changed between the time the user control was firstly consumed in the form and now. Also, if rebuilding the app causes the user control to be rebuilt as part of the same solution, the .dll will be cleaned up before being recompiled. That's where the errors are coming while recompiling.
– Alessandro Mandelli
Nov 19 at 16:12






1




1




@Lupe_99 If I assume that you created a custom control.did you inherit UserControl?
– dbasnett
Nov 19 at 16:49




@Lupe_99 If I assume that you created a custom control.did you inherit UserControl?
– dbasnett
Nov 19 at 16:49

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53377568%2floading-a-user-control-onto-form-return-error-every-time-program-is-built%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53377568%2floading-a-user-control-onto-form-return-error-every-time-program-is-built%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen