Can I change the default modifier from Friend to Private in Windows Forms Designer in VS 2008?

When I develop a Windows Forms application in Visual Studio using C #, each control that I add to my form is marked as private by default, which is what I want.

When using VB.NET, each control is by default marked as Friend (equivalent to internal in C #), which is not what I want.

Can I change this default value? It seems to be somewhere somewhere.

+7
visual-studio-2008 visual-studio windows-forms-designer
source share
2 answers

Annoying, isn't it.

What I usually do when the form is stable, I replace Friend WithEvents with Private , and then add WithEvents to controls that have Handles suggestions.

Yes, you might think that there was a setting, but I did not find it.

+3
source share

It was suggested by Microsoft, but they chose not to fix it .

[Sorry to post this as an answer because I don’t have enough points to add comments.]

+1
source share

All Articles