Reputation:
I am trying to connect a checkbox to change 'Form.TopMost'.
Everytime I use the Form.TopMost i get the following error:
An object reference is required for the non-static field, method, or property
'System.Windows.Forms.Form.TopMost.get'
N:\VisualStudio\Projects\SpriteProject\YoutubeOverlay\Browser.cs 23 13
YoutubeOverlay
Can anyone help on this?
Upvotes: 0
Views: 196
Reputation: 9323
If you are changing the property in the code behind of the form, you should use:
this.TopMost = true;
Upvotes: 2