© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
14 replies
Careca_Lisinha_

❔ How to access a button from a different class?

Hello. Recently, I was developing a project and decided to start splitting my code into separate files instead of keeping everything in form1.cs. I'm a beginner, and this may be a very basic question, but I really don't know how to access a button or another designer element from a different class other than form1.cs. I've searched everywhere, but I couldn't find a tutorial that taught me this.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ How to access variable from another class?
C#CC# / help
3y ago
Binding a class to a button
C#CC# / help
13mo ago
❔ How can I access a member of a different class in a dictionary
C#CC# / help
4y ago