|
hello guys i have windows form having three dialog box which dispaly proper in win 8 but when i run the same application in windows 10 my forms dialog box have space between each other an its look very ugly
can any one tell me how should i give same look & feel in windows 10 also i mean i run my form in any of win 10 or 8 it should display proper look (without space in dialog box).
|
|
|
|
|
Pick "Windows Classic" in Control Panel on both systems and you should be good to go.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
|
Ask the manufacturer for the technical documentation.
|
|
|
|
|
|
To give you an answer is difficult because of 2 reasons :
- at first : your answer is not very useful ...
- second : I suppose that most of us doesn't know your device. I don't know it too.
But following Suggestion :
Look for the Vendor-ID of your device.
Try to find out if you get get with this ID Information inside the Registry of your System which tells you if the device is currently connected and which Com-Ports are assigned. Most of the USB-Devices I know are writing Information like this into the Registry.
In this case I could give you a Sample-code which allows you to read this Information into your Application ...
But now it's up to you ...
|
|
|
|
|
Com port lists are a Windows registry function; nothing to do with what is actually hooked up (or not).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Hello, I have been working with C# for not very long. Less than a year and Im trying to use C#. My app basically adds in the argument needed such as host name, file location, etc to an app that acts like a listener for incoming dicom files(storescp.exe). My goal is to make this work as like an agent so one could start this app put in the arguments needed and click start and bobs ur uncle. However, when I do this storescp.exe goes into a listening mode like it should but until I kill that exe my app is frozen. My long winded question is how do I keep my app from freezing after I start storescu or storescp? Please help. I tryed using Awaiting Async but it didnt seem to work as I thought it would.
__________________
private void button2_Click(object sender, EventArgs e)
{
string port;
port = textBox3.Text;
string AE;
AE = textBox1.Text;
string dicompath;
dicompath = textBox7.Text;
string finalpath;
finalpath = port + " -pm" + " --fork " + " -aet " + AE + " -od " + ((char)34) + dicompath + ((char)34);
ProcessStartInfo startInfo2 = new ProcessStartInfo();
startInfo2.CreateNoWindow = true;
startInfo2.UseShellExecute = false;
startInfo2.RedirectStandardOutput = true;
startInfo2.WindowStyle = ProcessWindowStyle.Hidden;
startInfo2.FileName = "storescp-tls";
startInfo2.Arguments = finalpath;
startInfo2.RedirectStandardOutput = true;
var proc = Process.Start(startInfo2);
Thread.Sleep(10 * 1000);
string s = proc.StandardOutput.ReadToEnd();
string t = startInfo2.Arguments;
textBox2.Text = t;
textBox8.Text = s;
|
|
|
|
|
|
I'm reading this excellent article about MEF and a question came to mind.
In the article Tim discusses importing Property and Methods, and I thought, "Why would I want to import just a property or method? Why would not want to import the entire class?"
Under what circumstances would this be needed?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
You should post your question in the article forum so the author can reply.
|
|
|
|
|
I could have, but then only He and his readers would see my question. And, I was hopi9ng for more diverse opinions than just his.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
You could use MEF as a DI-driven stand-in for the factory pattern in a lot of scenarios using class-level composition.
You could inject properties and methods that are appropriate for the current application composition (Such as "I'm using YAML in this app instead of XML for configuration, let's inject a method to handle that").
Using shared parts, you could provide application-wide access to a variable without exposing the parent object.
That's off the top of the head.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Okay, importing a property is a fairly common way to avoid having an ImportingConstructor. The idea here is that you can inject the appropriate implementation in as a property, rather than using the constructor. As an example:
public class MyClass
{
private readonly IMyFirstService firstService;
private readonly IMySecondService secondService;
[ImportingConstructor]
public class MyClass(IMyFirstService firstService, IMySecondService secondService)
{
this.firstService = firstService;
this.secondService = secondService;
}
public IMyFirstService MyFirstService{ get { return firstService; } }
public IMySecondService MySecondService { get { return secondService; } }
} Now here's the Import version
public class MyClass
{
[Import]
public IMyFirstService { get; set; }
[Import]
public IMySecondService { get; set; }
} I don't mind the extra typing of the first version but some people would rather stick with the second.
This space for rent
|
|
|
|
|
So, I'm creating a bot within C# which will get some data from an API site. The data on the API site is in JSON.
If it returns something such as,
'{"Id":2,"Username":"JohnDoe","AvatarUri":null,"AvatarFinal":false,"IsOnline":false}',
how would I return the value in say Username to be JohnDoe?
Any help is greatly appreciated.
|
|
|
|
|
|
What have you tried so far ?
|
|
|
|
|
Hi, all master, I need to read the data from textfile to datagridview, but I am fail about this Operator " | ", please suggest me to good solution
example:
this data in textfile
3333;3333;3333|
6666;6666;6666|
-- modified 18-Mar-17 19:47pm.
|
|
|
|
|
Good solution for what? You haven't described a problem at all.
That character isn't "an operator". It's just a pipe character in a text file.
|
|
|
|
|
Read the file in and replace the | character with an empty string if you don't know what else to do with it.
This space for rent
|
|
|
|
|
|
Please tell me what you are trying to do? then I can help you. Every times you need call for help you should give detail information about your problem so that someone could help you immediately.
Regards,
Sokhanh
modified 26-Mar-17 10:40am.
|
|
|
|
|
reference: FastColoredTextBox
output is "example"
event:
private void codeBox_TextChanged(object sender, FastColoredTextBoxNS.TextChangedEventArgs e)
functions:
my_Parser.FunctionParse(singleLine);
var fileLines = System.IO.File.ReadAllLines(IncludesFolder + "\\" + output + ".inc");
foreach (var singleLine in fileLines)
{
string lastOutput = "";
foreach (char m_str in my_Parser.FunctionParse(singleLine))
{
if (m_str.ToString() == "(")
{
break;
}
else
{
lastOutput += m_str.ToString();
}
}
e.ChangedRange.ClearStyle(PinkStyle);
e.ChangedRange.SetStyle(PinkStyle, @"" + lastOutput);
}
|
|
|
|
|
And?
What does it do that you didn't expect, or not do that you did?
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I'm doing some research for a project I'm going to start.
What's involved in running a MEF Plugin in a separate thread? How hard it is? Any pitfalls/issues I need to know about?
The basic idea is to have a Windows Service load & run MEF plugins in their own threads.
Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
modified 17-Mar-17 11:06am.
|
|
|
|