console-application

Send windows message to a console application

╄→尐↘猪︶ㄣ 提交于 2021-02-10 12:46:14
问题 I have a DLL that send message to the UI application, most of the messages that the DLL send contains text in them, the GUI application get the message and act according to the message. I need to create a console application that works with the same DLL, Is there any option to get the messages to the console application, as in console application I do not have a windows message procedure. In the GUI application I load the DLL and use one of its function to set my current HWND to the DLL, once

Turn off Windows 10 console “Mark” mode from my application

风流意气都作罢 提交于 2021-02-10 06:15:57
问题 I've got a console application written in Python. Windows 10 console's "Mark" mode is frustrating me to no end as users accidentally click in the application while doing something as simple as switching windows. Do I have any way to control and stop this? For those who are unaware of Mark mode, it is when a user selects some text in the console window. When the program next writes to stdout, the entire program is paused , which is very very very annoying. Thanks! 回答1: Automatic "Mark" mode

Turn off Windows 10 console “Mark” mode from my application

若如初见. 提交于 2021-02-10 06:15:19
问题 I've got a console application written in Python. Windows 10 console's "Mark" mode is frustrating me to no end as users accidentally click in the application while doing something as simple as switching windows. Do I have any way to control and stop this? For those who are unaware of Mark mode, it is when a user selects some text in the console window. When the program next writes to stdout, the entire program is paused , which is very very very annoying. Thanks! 回答1: Automatic "Mark" mode

Multiple lines input from console in c#

五迷三道 提交于 2021-02-08 13:59:16
问题 I am trying to read some values in c# from console and then processing them. However i am stuck at a error. The input from console is: Name:ABCD School:Xyz Marks:80 //here the user enters a new line before entering new data again Name:AB School:Xyz Marks:90 //new line again Name:AB School:Xyz Marks:90 and so on. I do not know before hand the number of console inputs...How can i detect that user has stopped entering & store the input. I tried using string line; while((line=Console.ReadLine())!

Get current console font info

给你一囗甜甜゛ 提交于 2021-02-08 04:45:53
问题 I am writing an Image Viewer in C# .NET for the console. My problem is that the console font characters are not squares. And I'm treating them as pixels, this stretches the images when drawn on screen. I want to somehow read the font information about the currently used font, with width , height etc properties... I found this answer, but it seems like it just lists all the currently available fonts. I played around with this code: [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct

Where does console output go in an IIS hosted app?

微笑、不失礼 提交于 2021-02-07 11:40:35
问题 Say I have a WCF app hosted in IIS. And in that app I run this line of code: Console.WriteLine("Testing, testing 1 2 3"); Where will that be written to? Or is it ignored and just lost? Is there someway to capture it when needed? 回答1: Nowhere. More specifically: NullStream , which is defined as "A Stream with no backing store.". All the methods do nothing or return nothing. It is an internal class to Stream . The following code is taken from Microsoft's source code. Basically, when one of the

Where does console output go in an IIS hosted app?

一曲冷凌霜 提交于 2021-02-07 11:40:03
问题 Say I have a WCF app hosted in IIS. And in that app I run this line of code: Console.WriteLine("Testing, testing 1 2 3"); Where will that be written to? Or is it ignored and just lost? Is there someway to capture it when needed? 回答1: Nowhere. More specifically: NullStream , which is defined as "A Stream with no backing store.". All the methods do nothing or return nothing. It is an internal class to Stream . The following code is taken from Microsoft's source code. Basically, when one of the

Tab Based Autocomplete in Console App

萝らか妹 提交于 2021-02-07 02:43:07
问题 I am writing a console based Java application in which the user will be presented a custom command prompts where she can type certain commands, I want to implement an auto complete feature for the app by which while typing the command, if the user presses TAB then the command should complete. The functionality is similar to auto complete in Linux command prompt. In Java Console App we don't get the control over TAB and a TAB pressed will by default append 8 spaces. I need some trick using

vb.net unable to Console.SetWindowPosition

旧巷老猫 提交于 2021-02-05 09:56:05
问题 I'm creating a Windows Console application in VB.NET, and I am unable to set the window position relative to the screen. In short, I want a function to centre the window to the screen. I have tried to use Console.SetWindowPosition(w, h) method and Console.WindowTop , Console.WindowLeft properties. When returning the values for WindowTop and WindowLeft , they both return 0, and if I attempt to change these values with Console.WindowLeft = n (n > 0), the program throws an OutOfBounds exception,

C# Click and drag or Mouse Wheel with PostMessage / SendMessage

China☆狼群 提交于 2021-02-05 09:42:40
问题 I am creating a CONSOLE application , I need to scroll a certain part of the window from positions (x = 350, y = 240) to (x = 350, y = 120) (vertical scroll), I tried different ways but I couldn't. I was also unable to use the WM_MOUSEWHEEL option. Follow the code I use for clicks that work perfectly, I just need to adapt it to click and drag or determine a Y point on the window and use the mouse scroll. Could you please help me? Sorry for bad English, I used a translator. public class Win32