Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
OriginalGriff15-Jul-19 3:46
mveOriginalGriff15-Jul-19 3:46 
AnswerRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
phil.o14-Jul-19 23:52
professionalphil.o14-Jul-19 23:52 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx715-Jul-19 0:34
wrightyrx715-Jul-19 0:34 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
phil.o15-Jul-19 0:43
professionalphil.o15-Jul-19 0:43 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx715-Jul-19 1:00
wrightyrx715-Jul-19 1:00 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
OriginalGriff15-Jul-19 1:30
mveOriginalGriff15-Jul-19 1:30 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
wrightyrx715-Jul-19 1:35
wrightyrx715-Jul-19 1:35 
GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
OriginalGriff15-Jul-19 1:47
mveOriginalGriff15-Jul-19 1:47 
No - that's just using ShowDialog to display Form2, which causes the Form1 code to "freeze", waiting for the new form to close before executing any more code (this is technically called a "Modal Form" but you don't need to worry about it).

There is also Form.Show which returns immediately, and that type needs Events to "Know" when data is available for Form1 to process. Follow the link I gave you, and you'll find a download of a source project that shows it all working with Show.
If you are going to use Events - and it's a good idea, .NET is built on the buggers - then also have a look here: A Simple Code Snippet to Add an Event[^] - it makes it a lot easier to create them in your own forms and other classes.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
phil.o15-Jul-19 1:46
professionalphil.o15-Jul-19 1:46 
AnswerRe: C# error: “An object reference is required for the non-static field, method, or property” Pin
Sagar-Jaybhay16-Jul-19 4:19
Sagar-Jaybhay16-Jul-19 4:19 
QuestionPowerpoint addin - where to start? Pin
pr1mem0ver12-Jul-19 5:04
pr1mem0ver12-Jul-19 5:04 
AnswerRe: Powerpoint addin - where to start? Pin
OriginalGriff12-Jul-19 5:25
mveOriginalGriff12-Jul-19 5:25 
GeneralRe: Powerpoint addin - where to start? Pin
pr1mem0ver15-Jul-19 14:53
pr1mem0ver15-Jul-19 14:53 
QuestionPredicateBuilder Question Pin
Kevin Marois10-Jul-19 7:32
professionalKevin Marois10-Jul-19 7:32 
AnswerRe: PredicateBuilder Question Pin
Luc Pattyn10-Jul-19 7:41
sitebuilderLuc Pattyn10-Jul-19 7:41 
GeneralRe: PredicateBuilder Question Pin
Kevin Marois10-Jul-19 7:52
professionalKevin Marois10-Jul-19 7:52 
GeneralRe: PredicateBuilder Question Pin
Luc Pattyn10-Jul-19 7:55
sitebuilderLuc Pattyn10-Jul-19 7:55 
QuestionAvoid ASP Page Refresh after button click Pin
ahmadroheed9-Jul-19 18:04
ahmadroheed9-Jul-19 18:04 
AnswerRe: Avoid ASP Page Refresh after button click Pin
Gerry Schmitz10-Jul-19 6:22
mveGerry Schmitz10-Jul-19 6:22 
QuestionI have two questions concerning what Visual Studio adds when you make a GUI project Pin
Member 129742359-Jul-19 13:29
Member 129742359-Jul-19 13:29 
AnswerRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
Dave Kreskowiak9-Jul-19 14:06
mveDave Kreskowiak9-Jul-19 14:06 
AnswerRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
BillWoodruff9-Jul-19 17:00
professionalBillWoodruff9-Jul-19 17:00 
AnswerRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
OriginalGriff9-Jul-19 20:24
mveOriginalGriff9-Jul-19 20:24 
GeneralRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
BillWoodruff9-Jul-19 22:20
professionalBillWoodruff9-Jul-19 22:20 
GeneralRe: I have two questions concerning what Visual Studio adds when you make a GUI project Pin
OriginalGriff9-Jul-19 22:25
mveOriginalGriff9-Jul-19 22:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.