|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid..
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
i wanna ask, anybody can give suggestions of references for tutorial for C# windows application using Visual Studio 2019? any references like e-books, web sites, etc
|
|
|
|
|
The best way is a course: if you don't understand something, then the tutor can rephrase or explain until you do. They also require you to practice via homework, which means you learn better - we learn best by doing, not looking. Check locally for these.
The second best is a book: They are structured like a course is, and will "guide you through" the process introducing pretty much everything at sensible points and giving examples for you to code, helping the learning process. Addison Wesley, Wrox, and Microsoft Press all do excellent books that cover the subject well.
Websites are iffy - a lot of them have no idea how to teach, and even less how to learn. I'd avoid them as the very few good ones are hidden in a huge mas of dross.
The worst way is YouTube tutorials. There may be good ones out there, but I've never seen one, and all the ones I have seen have clearly known nothing about how to make a video, how to teach, how to learn, how to code and in some cases how to get the top of a bottle. Most of 'em are there purely for "Subscriptions" and the revenue stream that generates - few have any idea why code works when it does.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
I'm writing an ActiveX Controller to expose to COM and will plan to write an installer for it. I'm using some models for an ActiveX that used Java for HTML inputs. It was a model written for C#. I'm a beginner with the language. I'm a bit confused on how to tell the program that it should get its data from the control source of the report in MS Access (Office 365). I'm also not certain which methods should be private or public in the code when it passes information back and forth between the programs.
|
|
|
|
|
Active X has been dead for decades. Why are you doing it this way?
Access is also pretty dead TBH
|
|
|
|
|
For Access or other Office applications to use a custom library, it would have to be exposed via COM.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You don't need to use ActiveX for COM. .NET supports COM out of the box with the aid of the COMVisible[^] attribute.
|
|
|
|
|
I understand it needs exposure to COM, but I think the question here is more about how to reference Access as the source of the data the control uses to give its output. Specifically, how it would be referenced in a C# code.
|
|
|
|
|
What would you suggest in place of Access in terms of working with databases?
Surely it must have wide use if it is continually updated in Office releases.
Is there software that gives you the ability to generate queries and reports with the same capabilities in formatting.
|
|
|
|
|
I'd recommend you the SQL Server. Its Express edition is free.
|
|
|
|
|
Access is useful if you have no programmers and want a simple DB with a simple UI. But it's pretty dead technology overall
|
|
|
|
|
Since you never said what this ActiveX does, it's interesting to see how one builds a system to support it.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Sorry. That portion may not have copied into the post.
The input for the program would be the string from a field in the report in MS Access.
The program takes the string and uses the QR Coder Nugent Package to create a QR code image.
The program will output the QR code image as the object that is printed in the report.
|
|
|
|
|
Hello Everyone!
I am C#/ASP.NET new learning
And my english is very bad (I am Taiwanese)
My Boss give me a .NET test
the problem is like say : Use swtich(expr) expression can action on byte?, long?, String?
My answer is
byte => OK, long => unknow, String => OK
But my boss give me answer is
switch(expr) expression need is integer type / integer expression
Os long and string is not use on switch
After I fund answer in internet like
Switch Statement in C# - GeeksforGeeks
The first paragraph: The switch expression is of integer type such as int, char, byte, or short, or of an enumeration type, or of string type
Can someone talk me true answer?!
I vary appreciate, thank your
*I can not ask on Chinese Webpage beacuse i afraid my boss see this
|
|
|
|
|
it's possible your boss is using the wrong words: there are two types of switch in c# And he may be getting confused.
Strings, integers of all forms (including long), chars, enums are all legal in C# switch statements: C# switch statement | Microsoft Docs[^]
With switch expressions, the range is even bigger: switch expression - C# reference | Microsoft Docs[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I guess if he's saying something that is untrue, create a project and show him you can switch on almost anything? That was a major step forward, he's thinking of C++ I reckon
|
|
|
|
|
I cannot remember but it seems like a language I used in the past only allowed switches on integers. Christian implies that C++ is that way so my guess is your boss is not aware that most languages do allow switch on other types.
|
|
|
|
|
Hi,
I am developing a Work Load Analysis platform and there I use System.Windows.Forms.DataVisualization.Charting. The problem i have is, Xaxis is not updated when switching between different value types in runtime.
Here is the code, which i use to update chart from DateTime valuetype to int.
Here _EndWeek and _StartWeek are integer parameters pass to this method.
List<int> _Weeks = new List<int>();
int _Week_Difference = _EndWeek - _StartWeek;
for (int i = 0; i <= _Week_Difference; i++)
{
_Weeks.Add(_StartWeek+ i);
}
chart_Utilization.Series[0].Points.Clear();
chart_Utilization.Series[1].Points.Clear();
chart_Utilization.Series[2].Points.Clear();
chart_Utilization.Series[0].XValueType = ChartValueType.Int32;
chart_Utilization.Series[1].XValueType = ChartValueType.Int32;
chart_Utilization.Series[2].XValueType = ChartValueType.Int32;
chart_Utilization.ChartAreas[0].AxisX.Interval = 1;
chart_Utilization.ChartAreas[0].AxisX.IntervalType = DateTimeIntervalType.Number;
chart_Utilization.ChartAreas[0].AxisX.IntervalOffsetType = DateTimeIntervalType.Number;
chart_Utilization.ChartAreas[0].AxisX.LabelStyle.Format = "{0:0}";
chart_Utilization.ChartAreas[0].AxisX.Minimum = 1;
chart_Utilization.ChartAreas[0].AxisX.Maximum = 53;
chart_Utilization.Update();
I would be glad, if some could help me in this case.
|
|
|
|
|
You cleared all your points; I don't see you adding any back in.
chart_Utilization.Series[0].Points.Clear();
chart_Utilization.Series[1].Points.Clear();
chart_Utilization.Series[2].Points.Clear();
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
The data is added in a loop after this piece of code. Data is added, but the X-Axis labelling is wrong. They are still in Datetime format.
|
|
|
|
|
The x-axis usually is "time" in a time-series. You've provided no new information.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
I want to change the XAxis Value type to Int. How can i change it in runtime?
Because, the XAxis value type is dynamically changed according to the filter inputs from the user.
|
|
|
|
|