|
any difference ?
how about the WinForms ?
heartofdra
|
|
|
|
|
How about Win Forms [^].
“I'm an artist: it's self evident that word implies looking for something all the time without ever finding it in full. It is the opposite of saying : 'I know all about it. I've already found it.'
As far as I'm concerned, the word means: 'I am looking. I am hunting for it. I am deeply involved.'”
Vincent Van Gogh
|
|
|
|
|
I got it ----- "output type "
thanks
heartofdra
|
|
|
|
|
This will create a Console application, not a WinForms. It's not a good idea because this creates a few problems for your WinForms app that you have to code around.
Put it back to what it was. In your application, you have a couple of ways of creating a console window. One is to use the Win32 functions AllocConsole and AttachConsole. You then have to get the streams from the console and attach them to .NET streams, ... It's pretty messy.
A simple method it to launch CMD.EXE as a new Process, then you've already got the stream objects to write to. You can't use Console.WriteLine, but you can use something like myCmdProcess.StandardInput.WriteLine. StandardInput is a normal StreamWriter object which has all the usual methods you would expect[^].
|
|
|
|
|
There isn't really a nice way to do this - the UI needs a separate thread to your console stuff. Which gives problems when you want to shut things down...
The easiest way is to create your app as a console app, and add a form to that - it's not "nice" but it will work:
private static MyForm myForm = new MyForm();
static void Main(string[] args)
{
Console.WriteLine("Console");
Thread t = new Thread(() => myForm.ShowDialog());
t.Start();
while (true)
{
string s = Console.ReadLine().ToUpper();
if (s == "X") break;
}
if (t.IsAlive)
{
myForm.Invoke(new MethodInvoker(delegate { myForm.Close();}));
}
}
Never underestimate the power of stupid things in large numbers
--- Serious Sam
|
|
|
|
|
I believe this[^] is what you want to do.
Edit: A better link here[^].
/ravi
|
|
|
|
|
Hello,
There are 3 Windows Service I am running now and one service stops automatically without any error (I have try and catch blocks to capture errors and log in a text file). At first I thought it is due to tuneup maintenance and antivirus program I'm running but if it is the case, shouldn't all services stop?
I put them on recovery mode to restart after fail, but it doesn't work for that particular windows service. How do I check what stops the service? And how do I set recovery options programmatically?
Hope someone can help me. Thank you!
modified 2-Jan-14 4:16am.
|
|
|
|
|
|
Yes, I did. Without any exception or error, the service stops and can see event log entry "In OnStop" there.
|
|
|
|
|
There is no way to determine what told your service to stop unless the program that did it out something in the event log saying that it is stopping your service.
|
|
|
|
|
Now I know why!
My Norton antivirus terminates my services! It says Generic Load Point detected by Virus Scanner and it terminates and removes my services! How can I prevent this? I couldn't find any setting to exclude these particular services during virus scan.
|
|
|
|
|
I don't use Norton Antivirus so I don't know. Either someone who does use it is going to have to answer (good luck waiting for that), or you contact Symantec Support and ask them.
|
|
|
|
|
That would be silly to wait. Anyway thanks! I've figured it out.
|
|
|
|
|
How exactly do you know that it "stops automatically"?
How do know it even started? How do you know it started successfully?
Did you check to see if the server restarted? And if it did restart then did the service correctly start?
|
|
|
|
|
Hello
when the user print any document in virtual printer how i can receive what he print in my application.
How I can receive what the user print in my application.
Note :I use Redmon and Ghostscript
And Redmon redirect to my application but how I can receive in my application
thanks
|
|
|
|
|
i am have WPF app to capture image ((BitmapSource)imgCapture.Source )from camera after capture image i want to rotate this image 180 degree pixel by pixel ????
|
|
|
|
|
Then try the WPF forum.
Veni, vidi, abiit domum
|
|
|
|
|
Hello all,
I added a new dynamicdata\custompage aspx page to the existing Data Scaffolding project. I want to remove the existing "delete" option in the gridview, and hence need to create a custompage to accomplish this.
How to make sure the default page is reading this newly created page? I rebuilt the solution. but every time I try to access this page, it comes back with a page not found message.
Am i missing something?
Thank you!
|
|
|
|
|
vkEE wrote: Am i missing something? Yes, this is the C# forum, you want the ASP.NET one.
Veni, vidi, abiit domum
|
|
|
|
|
Not able to generate reports (which has large data 16000 lines) in production server (high configuration 6 GB, MySQL, 32-bit OS) which takes at least 25min to load 'Generating Report' message.
Where as the same report is able to generate in test server (low configuration 2GB, MySQL, 64-bit OS which takes 15sec to load 'Generating Report' message.
Please advise.
Language: C#,
Reporting Tool: Telerik.
|
|
|
|
|
0) For quick response you should post this question in Telerik forum.
1) Optimize your database & query
2) Filter data while generating report.
3) Optimize your code. (Dispose the report related things properly after use)
4) Cross verify the report process.(Run the report from test server application using the production server database)
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
Hi,
We have winform application, We already publish the application via clickonce that publish contains the all assemblies and files, but we want to publish certain files (not all files or Assembly) via clickonce in VS2010.
Thks in advance
|
|
|
|
|
AFAICT, it's not supported. ClickOnce always builds an entire distribution. It does not just "update" an existing one with new content.
|
|
|
|
|
Hi ,
I have two .xml files with contents as below:
demo1.xml
------------
="1.0"="ISO-8859-1"
<agenda>
<Appointment>
<Id> 7 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> test </Subject>
<Description> testttt </Description>
<Place> paris </Place>
<Modtime> 182204 </Modtime>
</Appointment>
<Appointment>
<Id> 8 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> whatever </Subject>
<Description> whateverrr </Description>
<Place> where ever </Place>
<Modtime> 182204 </Modtime>
</Appointment>
</agenda>
demo.xml
-----------
="1.0"="ISO-8859-1"
<agenda>
<Appointment>
<Id> 7 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> test </Subject>
<Description> testttt </Description>
<Place> paris </Place>
<Modtime> 182204 </Modtime>
</Appointment>
</agenda>
See from the two files above, Id=7 is common in both .xml files.
I want to select Id=8 which is not present in demo.xml.
So my output should be as below:
<Appointment>
<Id> 8 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> whatever </Subject>
<Description> whateverrr </Description>
<Place> where ever </Place>
<Modtime> 182204 </Modtime>
</Appointment>
I tried the below code but I could not arrive at what I need.
string origPath = @"F:\demo.xml";
string inPath = @"F:\demo1.xml";
XElement xmlObject = XElement.Load(origPath);
var xDoc = xmlObject.Descendants("Appointment");
XElement xmlObject1 = XElement.Load(inPath);
var xDoc1 = xmlObject1.Descendants("Appointment");
var notIn = xDoc1.Except(xDoc);
foreach (XElement ele in notIn)
{
richTextBox1.AppendText(ele.ToString() + "\n");
}
When executing the code above I got:
<Appointment>
<Id> 7 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> test </Subject>
<Description> testttt </Description>
<Place> paris </Place>
<Modtime> 182204 </Modtime>
</Appointment>
<Appointment>
<Id> 8 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> whatever </Subject>
<Description> whateverrr </Description>
<Place> where ever </Place>
<Modtime> 182204 </Modtime>
</Appointment>
But the below code provides me the result what actually I need:
double[] numbers1 = { 2.0, 2.1, 2.2, 2.3, 2.4, 2.5 };
double[] numbers2 = { 2.2 };
IEnumerable<double> onlyInFirstSet = numbers1.Except(numbers2);
foreach (double number in onlyInFirstSet)
richTextBox1.AppendText(number.ToString() +"\n");
The immediate above code provided:
2,2.1,2.3,2.4,2.5
Please let me know what is wrong in my code to fetch distinct elements from xml file?
BR,
Arjun
modified 30-Dec-13 5:06am.
|
|
|
|
|
You did not explain what results you did get.
Veni, vidi, abiit domum
|
|
|
|