Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
VB.NET Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
C#
Windows Forms
Creating Form1 txt file, to use in Form2 (HangMan)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="jmcilhinney, post: 25643, member: 3"] I don't really know where that is coming from. The user code file already includes a constructor, e.g. [CODE=csharp]public Form2() { InitializeComponent(); }[/CODE] You can simply edit that, e.g. [CODE=csharp]public Form2(string data) { InitializeComponent(); // Use data here }[/CODE] or add a new constructor, e.g. [CODE=csharp]public Form2() { InitializeComponent(); } public Form2(string data) : this() { // Use data here }[/CODE] I have a bit of an idea that, at some stage, the first option may not have worked well because the designer required a parameterless constructor but, if that was the case, it no longer is. I just tested to check. The second option would always have worked. [/QUOTE]
Insert quotes…
Verification
Post reply
C#
Windows Forms
Creating Form1 txt file, to use in Form2 (HangMan)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom