|
To be honest, we really can't help you - you need to start by looking at the computers where it fails, and the computers where it doesn't, and try to establish some connection or difference which separates them into the two groups.
We can't do that: we can't run your code here and see your problem, and we can't access teh computers where it works or doesn't!
Sorry, but ... there is nothing we can do!
"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!
|
|
|
|
|
Thank you.
Start some computer Windows 10 installation.
now~~

|
|
|
|
|
You're welcome!
"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!
|
|
|
|
|
Maybe the "black screens" are the ones with no data; and they're "black" because of your (background) color choices.
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
|
|
|
|
|
|
Hello. I want to open a connection to a local server, the NORTHWND database. When I open the connection it does not print the desired data I requested below.I do not get anything. Just black window on console when I run code. Here is the code
<pre lang="C#">using System;
using System.Linq;
using System.Configuration;
using System.Data.SqlClient;
using Microsoft.IdentityModel.Protocols;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
SqlConnection sqlConnection = new SqlConnection();
sqlConnection.ConnectionString = ConfigurationManager.ConnectionStrings["Northwind"].ConnectionString;
try
{
using (sqlConnection)
{
sqlConnection.Open();
Console. WriteLine("State of connection {0}", sqlConnection.State.ToString());
Console.WriteLine("Name of Base {0}", sqlConnection.Database);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
sqlConnection.Close();
}
}
}
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="Northwind" connectionString="Data Source=.;Initial Catalog=NORTHWND;Integrated Security=SSPI"/>
</connectionStrings>
</configuration>
|
|
|
|
|
There are just too many possible problems here for us to be able to tell - it needs your code running on your system, with your data - and we do not have access to that.
So, it's going to be up to you.
Fortunately, you have a tool available to you which will help you find out what is going on: the debugger. If you don't know how to use it then a quick Google for "Visual Studio debugger" should give you the info you need.
Put a breakpoint on the first line in the function, and run your code through the debugger. Then look at your code, and at your data and work out what should happen manually. Then single step each line checking that what you expected to happen is exactly what did. When it isn't, that's when you have a problem, and you can back-track (or run it again and look more closely) to find out why.
Sorry, but we can't do that for you - time for you to learn a new (and very, very useful) skill: debugging!
"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!
|
|
|
|
|
Probably not the cause of your problem but ...
You are abusing the 'using' keyword. It is meant to be used to create and dispose of objects, but you have already created it and then you manually close it at the end.
Even so, you should get one of your WriteLine's to display.
As @OriginalGriff has already said ... use the debugger.
|
|
|
|
|
I would like to place a gauge on my form. I did an online search and there are quite a few programs but these programs are expensive for a newbie/hobbyist. Can anyone suggest an inexpensive way to accomplish this problem?
application type: Controlling servo or stepper motor.
the gauge you're trying to make: Analog to indicate the position in degrees to name one type.
the code you've used: To create a gauge. None.
the problem you're having: I don't know how to create a gauge.
Thank you for any help,
Ken
modified 18-Jul-21 13:19pm.
|
|
|
|
|
Search the articles for "C# gauge" and pick for the application type of your choice.
|
|
|
|
|
Dave,
I reposted my question. I hope in the proper format.
|
|
|
|
|
My answer doesn't change. Search the articles using the Search box above.
|
|
|
|
|
I have looked at the articles and I don't know what I'm doing wrong. Please advise.
|
|
|
|
|
Considering you haven't posted anything at all about your application type, the gauge you're trying to make, the code you've used, nor the problem you're having, it's quite impossible to help you.
|
|
|
|
|
<Quote: Go to ParentConsidering you haven't posted anything at all about your application type, the gauge you're trying to make, the code you've used, nor the problem you're having, it's quite impossible to help you.
application type: Controlling servo or stepper motor.
the gauge you're trying to make: Analog to indicate the position in degrees to name one type.
the code you've used: To create a gauge. None.
the problem you're having: I don't know how to create a gauge.
|
|
|
|
|
Grrrrr!
Application type: Console, Windows Forms, WPF, ASP.NET, MVC, ... ? Each draws differently, so yeah, it matters.
Quote: the code you've used: To create a gauge. None.
the problem you're having: I don't know how to create a gauge.
This is why I keep telling you to search the articles. You are not going to get a description of how to create a gauge in a couple of forums posts. There's just too much information.
|
|
|
|
|
Quote: Grrrrr!
As I indicated in my post "I'm a newbie" and I have no idea where to start.
Quote: Application type: Console, Windows Forms, WPF, ASP.NET, MVC, ... ? Each draws differently, so yeah, it matters.
I don't know what to search, Console, Windows Forms, WPF, ASP.NET, MVC, ... ?
modified 18-Jul-21 14:29pm.
|
|
|
|
|
|
Thank you, Dave. That's what I was looking for.
|
|
|
|
|
Ken12133 wrote: don't what to search, Console, Windows Forms, WPF, ASP.NET, MVC
What Dave means is that we have no idea what environment you are writing your code for: and since that will have a massive impact on what type of controls you can use it's a very relevant question - and one that only you can possibly answer!
So ... are you writing a Console app (text only, runs in a CMD prompt: hold the WINKEY and press R, then type "cmd" and press enter. If it looks like that, it's a Console app)?
Or are you using a GUI (buttons, textboxes, labels, icons, menus. If it looks like Visual Studio, it's a GUI app)?
"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!
|
|
|
|
|
In Visual Studio, it's a GUI app.
|
|
|
|
|
OK, good start.
So ... is it going to run directly on a desktop / lappie, a mobile device, or in a browser?
"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!
|
|
|
|
|
Ok, I'm starting to understand how a question should be structured.
|
|
|
|
|
Perhaps a start could be :
I'm using Visual Studio xxxx
I'm developing something with Forms
My favourite programming language is C#
And ...
When using the search-function only of this Forum you will get some examples for Gauge-Controls - ready to use ... 
|
|
|
|
|
Ralf,
Thank you for the suggestion.
Ken
|
|
|
|