❔ c# forms

Hi, I want to understand how forms in c# is working but dont know how here is Windows Form Programming Practice Task what I want to do but dont know how : Create an application that will serve as a purchase form. The user enters the name of the product, the price per item, the number of items, the product code, the company (which represents the product) and whether it is a VAT payer (radiobutton). After entering, the user presses a button that calculates the total price (increased by any VAT in the form of 21%) and stores the transaction number in the listbox (starting with 0001, 0002, 0003,...). The user will be able to select the transaction in the listbox and list all its properties (Product name, price per piece, number of pieces, product code, company, whether it is VAT payer, total price, transaction number). Create a button that adds up all the total prices of the transactions in the sheet and prints it to the MessageBox.
23 Replies
JakenVeina
JakenVeina2y ago
first off, don't use WinForms unless you're being obligated to second, what are you having trouble with understanding?
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
I need to use windows forms for school,otherwise I wouldn't use it , I want to understand it but I can't manage to make a class,constructor and then I don't understand it anymore
JakenVeina
JakenVeina2y ago
is your issue actually with C#?
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
i dont uderstand that how i can do things easier or sometimes how to do something
JakenVeina
JakenVeina2y ago
like, have you built programs with C# before, without WinForms? or in other languages?
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
no i only tried python at school
JakenVeina
JakenVeina2y ago
and this is for a class?
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
and now i need to learn c# forms yes we now doing forms in c#
JakenVeina
JakenVeina2y ago
what have you done up until now? just some work with Python?
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
we did things in the .net framework and now we doing c# forms only one hour he told some informations
JakenVeina
JakenVeina2y ago
did you have any previous assignments in C#?
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
what i dont remember and tomorrow will be correction test and I don't understand the code nor
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
here is code what is for this assigment in c# forms
JakenVeina
JakenVeina2y ago
look, the point I'm getting at is that expecting you to jump into GUI programming with no other experience in C# is objectively terrible
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
i know but i need to learn it somehow at least for tests I don't know how but
JakenVeina
JakenVeina2y ago
the instructor that's doing this is either bad at what they do, or you're not being genuine about what the class has covered so far, and you're panicking now that you've put it off to the last moment regardless C# is object-oriented building programs in C# involves writing classes, and then using them writing a class involves defining the class's state (fields) and logic (methods) I.E. values stored in memory that make up the state of the object and executable code that runs when you tell it to, and reads or manipulates these values making the jump to GUI programming means you'll do most of your work in the form of using EXISTING classes, that make up the GUI framework classes that represent pieces of the GUI the most basic being Form which, as its name suggests, represents a form to be presented to the user generally, you'll describe YOUR form by writing a class that inherits from the Form base class, adding controls to it, and then adding logic to describe how those controls interact one of the other big things to realize about WinForms, especially when using Visual Studio, is that you don't "write" all of the code
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
we could look at the code together to see what's what and what it's for to get somewhere. so if you understand windows forms ?
JakenVeina
JakenVeina2y ago
a lot of it will be generated for you
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
i know what is that windows forms im not 100% beginner in that
JakenVeina
JakenVeina2y ago
well, your initial question was "how does WinForms work", so.... if you have a more pertinent question, ask it if you have something you've tried to do, but isn't working, ask about that No one here is going to write this for you, or be interested in reading your entire codebase, even if this wasn't for classwork. We can help provide context, if you help us understand what context you need.
NOKIA SIROCCO
NOKIA SIROCCOOP2y ago
I understand
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server