User Profile
Collapse
-
I am trying to develop application which will go to laundry for me. ;) -
Hello
Here is example I done to search for files by its filename coded date.
...Code:System.Collections.ArrayList allMatches = new System.Collections.ArrayList(); string[] files = System.IO.Directory.GetFiles(".", "*.log"); // gets fullpath or relative path files foreach (string fileFullName in files) { // get only RRRRMMDD from filename stringLeave a comment:
-
Hello
If you want to split image for 2 or even cut out few images from one image to others I would go with this approach.
...Code:Bitmap bmpToSplit = ...; // bitmap to be splitted Bitmap split1 = new Bitmap(w1,h1,bmpToSplit.PixelFormat); Bitmap split2 = new Bitmap(w2,h2,bmpToSplit.PixelFormat); Graphics g1 = Graphics.FromImage(split1 as Image); g1.DrawImage(bmpToSplit, new Rectangle(0,0,w1,h1), new
Leave a comment:
-
The solution provided above only works when application uses Console static object to write messages.
Unfortunately I use library (dll) that still writes messages to console, I believe that library is written in c++ and uses system calls to do that.
Anyway to stop it? maybe intercept the message in WndProc that cause the console message placement, how?
thanks
AkipNGLeave a comment:
-
Great!
That worked out. I saved current console 'Console.Out' in 'saveOut' variable and when I need to call a Console command I switch it and post it then switch back to TextWriter.Null . So no other text is spamming console.
...Code:private TextWriter saveOut=null; public void WriteToConsole(messageToConsole) { if (saveOut==null) // first time use saveOut = Console.Out;Leave a comment:
-
Thank you for input.
This is not solution I was looking for. Some of the dll's I use generates console output and I can't use wrapper method on in that libraries.
Is there an other way to turn off console? Something like ECHO OFF in old dos scripts?
thanks
AkipNG...Leave a comment:
-
C#-ConsoleApp: How to turn off console notifications.
Hello
I developing console application that sometimes writes some information to console using Console.WriteLn or Console.Write.
Is it possible to turn on/off displaying of messages that will be written out into console?
Sometimes I don't want anything to be written in the console and sometimes I need it. I hope someone knows solution to this.
thanks
AkipNG
No activity results to display
Show More
Leave a comment: