2018-10-21 14:58:33

So, yeah, in my school I have to learn C SHarp which I don't really like due to exclusiveness to Windows and syntax, but still, I have to learn it and I will learn it.
But how is the Gui creation in this language? I will need it, that's why I ask. And do I have to get the whole VS Studio to get it working?

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com

2018-10-21 16:15:01

It will often be a pain, but during school you are going to be forced to use all manner of programming languages.  Most you will probably feel neutral about, some you'll enjoy, and others you will hate with a passion, haha!  It's just part of the process, and indeed it's better in the end if you've been forced to use a dozen different languages on projects, because it gives you a more well-rounded view of programming as a whole.

I'm guessing things have changed with C sharp since I last used it.  I don't remember any Gui at all.  In my day C# was entirely text based just like C++.

- Aprone
Please try out my games and programs:
Aprone's software

2018-10-21 16:59:25

C# isn't inherently GUI based. I don't know which Visual Studio components you need to use but you do need Visual Studio, ,the Visual C# component and the .net framework components.

I find that windows forms is the easiest UI I've had to use. The IDE is useable though querky and often kind of laggy. If you can, just code the UI parts yourself without using the forms designer. for help with control layout, look at components like the FlowLayoutPanel.

Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic.

2018-10-21 17:31:55

C# is nice! Except the fact that it can be reverse engineered easy. I'm not here to talk about this though.
I used windows forms all the time for gui creation. I use visual studio2017 though the version number doesn't really matter. 2015 even 2010 sometimes can do what you want. If you are doing it with visual studio things are too easy for you to do. If you are coding it yourself then things are more nasty because you need to set the designer up along with its stuff, blah blah blah. I recommend using of visual studio with windows forms

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2018-10-22 18:50:58

You could also use VS Code, which is more lightweight than full-blown VS. You can install various languages, such as Java and Python, which will allow you to compile them using VS Code.

#FreeTheCheese
"The most deadly poison of our times is indifference. And this happens, although the praise of God should know no limits. Let us strive, therefore, to praise Him to the greatest extent of our powers." - St. Maximilian Kolbe

2018-10-22 19:23:37

Thanks guys, but can someone record a simple presentation of this WinFForms thingy?

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com

2018-10-22 21:45:44 (edited by Ethin 2018-10-22 21:46:22)

@4, the reverse engineering can be solved by obfuscating your compiled binary. The full VS comes with one if you need to use it.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2018-10-23 12:21:09

Yeah I also have heard of them. I used dot net reactor once to protect one of my codes but i'm not sure that it is completely unable to be decompiled. I heard that there's always a way, which is easier than decompilation of C++ or other languages to decompile the C# code even if obfescated.

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2018-10-23 19:43:13

Hi there,
Windows Forms? Simply no!
It is an old system, which isn't supported anymore and really isn't the best way to go. Instead, use WPF (Windows Presentation Foundation). There are few reasons to do it:
- WF uses DPI for managing placement of components. This is however a bad solution, because there are many mobile devices currently, which represents DPI in different way. Result is, that your app will look differently on pc and smartphone and differences won't be nice.
WPF uses DIP (device independent pixel) instead, what causes, that your app will look the same on all devices.
- WF uses absolute positions of objects to represent a form. While it can be good for simple forms, it gets more complicated in more complex projects, what will hurt your code as well as result application.
Because html showed as a very practical way to design forms on web, WPF gets inspired and use xml, a language very similar to html to design forms. As a programmer who works with WPF already, I can tell you, that it is very useful. You can make bindings to objects directly in it, so you can for example use a List in your class to fill a ListBox on the screen without doing anything for it, WPF will do it automatically based on the binding.
- WPF uses Direct 3D to draw forms, what is much faster and more efficient for cpu than KDI, which is used by WF. Also it isn't limited by basic Windows elements like KDI, you can do anything you want in it like inserting images to buttons or comboboxes.

I thing your school is doing good forcing you to use C#. remember, C# is one of the most modern languages, designed to work with the most modern oop techniques, where for example c++ still gets stuck. Just use oop everywhere and your code will look very nice for you as well as other people.
Also, my recommendation, stick with Microsoft technologies included in C#. No, they really aren't like Skype, teams working on them made much better job. WPF ist just one example, but there are many others. LINQ is something that you will simply love when you learn it, no other language have such a powerful tool. Tasks, asynchronous programming and other methods of managing threads are another good example, while they are partially included also in other languages, C# is doing best in my opinion, because it was designed to simplify work, but preserve oop as well.
And with technologies like Xamarin and Mono, you can bring you app not to windows only, but to Android, iOS, Mac or Linux as well. It is possible to develop directly for choosed platform, but there is also way to have just one code base and then compile for all platforms from it.

In summary, just don't worry, even if you don't like syntax of C#, it is still very powerful language. If your school will teach you the most modern ways to work with it, well, that is another thing to consider. Schools are often outdated with their technologies, what can seriously hurt you. only way to solve this problem is to learn yourself. If something seems too complicated for you, just look for easier way to do it, there is high chance you will find one.
Nothing is complicated in C#, you must only figure a way how to do it properly.

That is all for now.

Best regards

Rastislav

2018-10-23 20:50:22

I started liking the language much and much more. It is kinda good.

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com

2018-10-23 21:12:17

@Rastislav Kiss: I heard in a post that you mentioned you have some good stuff wrapped for C# which they do the job of sound pool and other stuff like that which we have in bgt. I think it'll help if you upload them somewhere and sharing the link with us if you like

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2018-10-24 07:43:48 (edited by Ethin 2018-10-24 07:44:43)

@9, WPF has some major accessibility issues; apps that are made with it are usable, but aren't as accessible as windows forms, and yes, windows forms is still accessible. By your own logic, WPF is just as "deprecated" because MS wants people to use windows store UI stuff now. Please, stop with the "oh this GUI system is better than this" stuff - seriously, guys, just don't start arguments like this -- because what GUI system is better is extremely subjective and is based off of opinion. Windows forms is just as supported as it was 5 years ago. It won't be going any time soon.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2018-10-24 23:12:55 (edited by Rastislav Kish 2018-10-24 23:15:12)

@Ethin: you are comparing uncomparable. Windows store is of course good, but it isn't compatible with older systems, because it uses Metro. Because Windows 7 is still very popular and frequently used, relying on Metro isn't a good idea.
WPF vs. WF is a completely different story. WPF is technologically far more advanced than WF. All you can do in WF you can do in WPF as well, but not reversely.
Thus if you are a new developer, you should to work in WPF and just have some basic info about WF in case you must to work with app in it.
Yes, WPF really have some issues with  accessibility, but they aren't so serious, you can avoid them by right design easily.

@Kianoosh: of course, I can share my code, if it helps someone. I had planned to do so few months ago, but then other problems came and I forgot it.
Current Windows version of BgtKit contains a wrapper around universalspeech to provide access to screenreaders, a Sound class for playing of sounds, Crypto class for cryptography related stuffs and a C# version of bgt timer.
I was thinking about implementing SoundPool as well, but while Fmod allows you to play one sound more times at once, I doesn't see any real use in it.
Android version contains these features as well as TouchWrapper, which provides easy way to manage screen touchs and gestures.
I will write out some basic documentation and post it along with the library on my website.

Best regards

Rastislav

2018-10-25 09:43:03

@13, that may be so, but calling WF deprecated or old is like calling windows 10 old -- its completely untrue. WF is still used by many modern applications, and yes, my post was quite comparable ad my comparisons were perfectly valid.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2018-10-26 16:33:33

@Ethin: interesting. You are now quite effectively going against yourself. In one post you write, that WPF isn't better than WF and in other you agree, that it is technologically more advanced than WF.
I have mentioned many pros for WPF already, but the biggest may be is still use of Xaml. It better separates logic layer from a presentation layer, what makes code more readable, faster to develop, faster and simpler to extend. On the professional level it saves time, what saves money and other costs of development.
Yes, some modern projects are still in WF, but it isn't because it would better suit their needs, but because WPF didn't existed when they were started and now it would take too many resources to recode them.
So if you take your work at least bit seriously, you should always go for WPF, because it is better.
Of course, if all what you want is to have one form to catch key presses, then it really doesn't matter much which framework do you use. But that still does not change anything on fact, that WPF is better than WF.
You can code things like it in BGT as well. But that doesn't mean that BGT is better language than C# and if you have to select between them, I think you would go for C#.

Or do you have any real reasons, why WF is better than WPF in your opinion? I have listed many for WPF, thus I would expect that you will do the same for WF. Otherwise your first statement in post 12 that WPF isn't better than WF is simply not true.

Best regards

Rastislav

2018-10-26 18:08:09

So dude what is your website? Also is there a tutorial for FMOD with C#? You know working your way around with the C Fmod tutorial is a pain lol.

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2018-10-28 08:01:20 (edited by Ethin 2018-10-28 08:03:19)

@15, your post doesn't even make sense. I did not go against myself. I never said I thought WPF was deprecated, or less technologically advanced than WF. (And considering that you can make custom widgets and controls in both if you have the know-how, they're both pretty much equal in that department.) Stop twisting my words into something that fits your incorrect worldview of C# and .NET. For your information, I said that WPF has major accessibility issues that make it hard to use for blind people when controls like tree views are brought into play. Furthermore, I said that, by your own logic of calling WF deprecated, your calling WPF deprecated as well, since WPF was introduced in .NET 3.0, and both technologies are old. Like I also said, if you want modern, use XAML and windows store apps. Please read my posts more thoroughly.
@16, FMOD in C# is simple -- comparable to C++ without the pointers. FMOD relies heavily on FMOD results, which tell you whether the action you want to do completed or not. To resolve that it uses ou variables, i.e.:

RESULT System.createDSPByPlugin(  uint handle,  out DSP dsp);

In C# 7.0 and later (it might be 6.0) you can call it like so:

system.createDPSByPlugin(handle, out dsp);

This makes things a bit easier; you don't need to declare the variable before you pass it in. (I may be wrong; I'm a bit rusty on C#). Working through the C FMOD tutorial is a pain, yes; use a C++ one (which more closely matches one of C#'s roots and will help you orient yourself with C# and FMOD). So far as I know there are no tutorials that teach modern FMOD with C#.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2018-11-09 19:13:04

OK, so we're diving into more and more advanced topics but there are some things which I want to learn by myself. Is there any good CSharp book I can pick up?

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com

2018-11-09 23:24:39

My votes are for the following:
* C# 7 and .NET Core: Modern Cross-Platform Development, Second Edition (9781787129559)
* C# 7 and .NET Core Cookbook (9781787286276)
* C# 7.0 Pocket Reference: Instant Help for C# 7.0 Programmers (9781491988534)
* Professional C# 6 and .NET Core 1.0 (9781119096603, 9781119096719, or 9781119096634)

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2018-11-10 12:36:20

Thanks @Ethin. You're always of great help smile

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com

2018-11-10 17:06:15

Another question guys: I am very clunky if it comes to using the Visual STudio IDE. Is there anythin' I can read about it to help myself understand the IDE better?

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com

2018-11-11 17:46:21

Hi there,

here's a book recommendation for C# from me:
C# 7.0 In A Nutshell: The Definitive Reference

Its a bit more expensive, but its an ongoing series which should cover all diferent ways of coding you can ever imagine to do with C#. The C# 7.0 version is just the latest one, written for the most latest C# standard enhancement. Its not like a guide which will teach you how to program in C#, but more of a reference which will help you find a solution to whatever problem you might face.

If it comes to IDEs, I usually stick to the command line as far as possible. Simple C# projects can easily be created with VS, but all the compilation stuff can be done by CLI thanks to MSBuild. The only thing you need to do is add files and folders via VS so the csproj file registers them, but if you want to you could even do so by editing the file directly by using the editor you like most. Same goes for NuGet packages, there even exists a CLI NuGet package manager if i'm not entirely wrong.
Imagine a project called MyTestProject, you can simple cd into the project's directory and do:
MSBuild MyTestProject.sln
and it will build the main project configuration for you, printing all errors and warnings in this CLI for your reference. Of course MSBuild knows loads of arguments, you can for example control the project's configuration which you want to build(Debug or Release or whatever), just consult the online reference for those or check the built-in help command.

Note: MSBuild is automatically available if you're using the VS-internal Developer Console. Just check out your search field (also known as Cortana) and search for Developer, it should bring up the results you want.
Best Regards.

Hijacker

2018-11-11 20:15:24 (edited by Nuno 2018-11-11 20:16:05)

Thanks Hijacker. That helped me.
But when it comes to designing GUIs, Toolbox would be useful. And it seems not being accessible

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com

2018-11-11 22:23:08

@23, oh, its accessible. Everything in VS is accessible -- you just need to get used to its quirks.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2018-11-11 23:13:54

Could you please tell me how can I use the toolbox? When I press enter on for example a button it is probably added, but I cannot do anything with it, because I cannot get to it's XAML code.

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com