Let's say that I make a new project called Welcome Program. Okay Visual Studio creates the project and places that in a new folder called Welcome Program. Next, I create a source code file and I call that WelcomeProgram.cpp.
Now here is where I notice that instead of placing that source code file in the main Welcome Program folder that Visual Studio just created, it automatically creates another new folder inside the Welcome Program folder, and it also calls it Welcome Program.
I'm wondering why Visual Studio does this?
Is it better organized this way?
Is there a way to tell Visual Studio not to create another folder, but rather place my source code in the main folder?
I'd like to know...even though I will probably not change it.
I have a question. I am programming a Windows Forms Application (C++) for the first time in Visual Studio 2015 and I want to add a "save" button. I also want to be able to read the data from that "savefile" into a graph.
I have researched a bit as to how I can do that. I found a solution with mysql database, but I would prefer not using a data base. I am hoping to just save them in a .txt file and then be able to read from
that text file.
Can anyone help me please? I am guessing its like a four line code, I am just not able to find it.
I hope someone can help me, thanks
The easiest way (IMO) to use text files is to use one of the "AllText" commands.
(Sorry; I dont't do C++)
string path = @"c:\temp\MyTest.txt";
// This text is added only once to the file. if (!File.Exists(path))
// Create a file to write to.string createText = "Hello and Welcome" + Environment.NewLine;
// This text is always added, making the file longer over time // if it is not deleted.string appendText = "This is extra text" + Environment.NewLine;
// Open the file to read from.string readText = File.ReadAllText(path);
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
Using: VS2015, C#, WinFORMS
I am developing a dashboard with several tools with C# in a winform. A project for evaluating my skills.
The purpose of the dashboard is to have all the tools needed right on the WINFORM.
I found the initial code from a forum and modified to meet my needs.
I got the code working but, the code I found doesn’t keep the format from the PowerShell file when you Drag and drop the file onto the RichTextBox.
The following code is what I am using….
object filename = e.Data.GetData("FileDrop");
if (filename != null)
var list = filename as string;
if (list != null && !string.IsNullOrWhiteSpace(list))
When I drag and drop a PowerShell file onto the RichtextBox it reads and load the content in plain text as below: