Makandriaco
New member
- Joined
- Sep 17, 2019
- Messages
- 3
- Programming Experience
- 10+
In VB.Net, I have a module that I use for all my projects. I just add it as a link to the project and any changes are then compiled in any project that uses it.
In that module there is a sub that assigns the icon to the form, which is passed as parameter.
It will use My.Resources depending on which project we are using.
How can I do this same thing in C#?
When I use
It is asking for specifically include the namespace for the Resources.
In that module there is a sub that assigns the icon to the form, which is passed as parameter.
VB.NET:
Public Sub CommonProcedures(ByRef frmSender As Form)
frmSender.Icon = My.Resources.FormIcon
End Sub
How can I do this same thing in C#?
When I use
C#:
public static void CommonProcedures(Form frmSender)
{
frmSender.Icon = Properties.Resources.FormIcon;
}