Creating a Windows form program using C# 8.0
-
When using NET.Framework I can't find anyway of dragging objects to a form (eg textbox, button). When using NET.Core I can't find anyway of displaying the form so I can place objects on the form. All I get is the code for the form. Has there been some major changes to version 8.0 of C# which prevents me from doing certain things, such as dragging objects such as a button on to a form?
-
When using NET.Framework I can't find anyway of dragging objects to a form (eg textbox, button). When using NET.Core I can't find anyway of displaying the form so I can place objects on the form. All I get is the code for the form. Has there been some major changes to version 8.0 of C# which prevents me from doing certain things, such as dragging objects such as a button on to a form?
-
You need to provide more information. When are you doing this, where are the objects being dragged from etc.? What part of the C# language do you believe is affecting this?
On older version of c#. I could display the form on the screen and on the left side of the screen I had a list of tools such as button, textbox. I could then select an object from the list then drag it on the form and position it on the form where I wanted the object to appear (when I say object I mean things like buttons and textboxs). In C# 8.0 I don't seem to be able to do this unless you know of a way or something in the setup I need to change first.
-
On older version of c#. I could display the form on the screen and on the left side of the screen I had a list of tools such as button, textbox. I could then select an object from the list then drag it on the form and position it on the form where I wanted the object to appear (when I say object I mean things like buttons and textboxs). In C# 8.0 I don't seem to be able to do this unless you know of a way or something in the setup I need to change first.
-
On older version of c#. I could display the form on the screen and on the left side of the screen I had a list of tools such as button, textbox. I could then select an object from the list then drag it on the form and position it on the form where I wanted the object to appear (when I say object I mean things like buttons and textboxs). In C# 8.0 I don't seem to be able to do this unless you know of a way or something in the setup I need to change first.
If you're talking about designing the from in Visual Studio, you can get the ToolBox to show up from the View menu. Just click the View menu, then Toolbox. Or you could hit Ctrl-W, X.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
When using NET.Framework I can't find anyway of dragging objects to a form (eg textbox, button). When using NET.Core I can't find anyway of displaying the form so I can place objects on the form. All I get is the code for the form. Has there been some major changes to version 8.0 of C# which prevents me from doing certain things, such as dragging objects such as a button on to a form?
I think, and I may be wrong but is winforms supported in NET.Core? I believe the visual designer may not be included yet.
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
-
If you're talking about designing the from in Visual Studio, you can get the ToolBox to show up from the View menu. Just click the View menu, then Toolbox. Or you could hit Ctrl-W, X.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave KreskowiakHi Dave. I tried clicking on Toolbox in the View menu but when I do that the only thing I see on the screen is a list of tools. I need to have both the form and the list of tools displayed on the screen at the same time. In past versions of C# things were put in panels on the screen so the form display was put in one panel in the middle of the screen and the list of tools was put in the left side panel. Can panels be setup with C# 8.0 like they have been in the past for the user interface?
-
Hi Dave. I tried clicking on Toolbox in the View menu but when I do that the only thing I see on the screen is a list of tools. I need to have both the form and the list of tools displayed on the screen at the same time. In past versions of C# things were put in panels on the screen so the form display was put in one panel in the middle of the screen and the list of tools was put in the left side panel. Can panels be setup with C# 8.0 like they have been in the past for the user interface?
Then you double-click the form you want to open. The Toolbox doesn't have a maximize button so it cannot be taking up the entire window. There is a small pushpin icon next to the Close (X) button in the ToolBox window. That can pin the toolbox window or allow it to autohide into a tab on the left edge of the Visual Studio window.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
When using NET.Framework I can't find anyway of dragging objects to a form (eg textbox, button). When using NET.Core I can't find anyway of displaying the form so I can place objects on the form. All I get is the code for the form. Has there been some major changes to version 8.0 of C# which prevents me from doing certain things, such as dragging objects such as a button on to a form?
If you're running the current release of Visual Studio 2019, you'll need to enable the .NET Core Windows Forms designer in the "preview features" settings. It's still not complete, and there's a newer version available with the preview version of Visual Studio. Windows Forms Designer for .NET Core Released | .NET Blog[^] The .NET Framework version of the designer and toolbox should not have changed.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Then you double-click the form you want to open. The Toolbox doesn't have a maximize button so it cannot be taking up the entire window. There is a small pushpin icon next to the Close (X) button in the ToolBox window. That can pin the toolbox window or allow it to autohide into a tab on the left edge of the Visual Studio window.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave KreskowiakThanks Dave. I found I had to dock some things such as toolbox so the interface becomes panels and is the way I want things to appear. Brian
-
I think, and I may be wrong but is winforms supported in NET.Core? I believe the visual designer may not be included yet.
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
In that case I'll need to use only Net.Framework
-
If you're running the current release of Visual Studio 2019, you'll need to enable the .NET Core Windows Forms designer in the "preview features" settings. It's still not complete, and there's a newer version available with the preview version of Visual Studio. Windows Forms Designer for .NET Core Released | .NET Blog[^] The .NET Framework version of the designer and toolbox should not have changed.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Thanks Richard. I updated Microsoft Visual Studio today and now have a form displayed when using Net.Core Brian