So I'm in a bit of a bind here as it seems Windows Universal Apps don't have access to the System.Drawing namespace. I'm building an interactive sign in sheet with an NDA box and a submit button.
The basic idea is that once the person signs in, they can press the submit button and a label printer nearby will print the name the user entered into a pair of text boxes.
I looked at the documentation provided by Microsoft here, but this seems to indicate going to some alternative page upon pressing a button. Is there a way to just print a string variable as with the PrintDocument class from the System.Drawing namespace?
Related
I have made a virtual keyboard for UWP application that will be used in Windows 10 IoT. For me to be able to use it i need to get a reference to textboxes/fields that is outside my program. I want to be able to read and write from thees text fields but do not know how this can be done.
One example could be if i was on a web page like google and would like to send information from the keyboard to the search bar in google. Or on facebook and would like to send a message. If there is to a textbox in my program then i would know how to send the information. But i also would like to write in all possible textfields like the examples above.
How do i get the keyboard to get the information of where to send it, feel where my mouse pointer has clicked and get a reference of some sort to send my output.
I am sorry if this question has been posted before but as i am in unknown territory i did not know what to search for.
I have a WebView and it can load a website, say http://www.google.com. Suppose the website has a textbox and when I click/touch it, the default Windows Touch Keyboard springs up.
I don't want to use the default keyboard as I'm creating my own custom keyboard. What I want is for the characters entered in my custom keyboard (implemented in the same UserControl along with the WebView) to send the entered characters into the currently selected textbox of a webpage loaded inside the WebView.
How would I go about doing this ?
If y want insetr text into some HTML element (input,textarea,etc), you may to use DOM and property innerHTML
You can't override the default behavior of input elements in Windows Store apps, including Web apps hosted inside WebView. There are no APIs for custom keyboards in Store apps, and you will not be able to prevent the keyboard from popping up at when a text-based input element is focused.
I need to do simple game console - like from Quake, Counter-Strike or other games for simple 3D game using openGL and C#.
Just press button for example ~ and it will show the console.
I can write my commands in it and it will have effect on my application.
For example it will change value of some variable or call some method from my application.
Console should be in left top corner of the window. It's just window application(no full screen).
Have somebody any idea how to do it? Piece of code - how to draw the the console or some tutorial?
Thanks a lot.
Text Editing is difficult in Open GL. It isn't something you want to start off with. C# has text fields and rich text windows. The simplest way would be to create a Window with a TextField inside it in C#. When the user pressed ~ slide the window in and give it focus. When the user presses enter any text in the field is captured, the field is cleared, and the captured text is sent off to the game to be processed.
To give the full console feel you want to make re-print that entered text back out in. You can do that with another, non-editable text field above the first on. Just concat the recently entered string on the end of text already entered in that field.
I would not recommend starting with this. Get something on the screen, get it responding to the keyboard directly. Then worry about how you are going to have you debug data entered. For now you can just hardcode debug commands to random keys that you don't user for your control scheme.
I'm developing an application to help the user write common text faster.
What I have in mind is a Windows app where the user can configure his key combinations, so that when he's, for instance, writing an email on Outlook or Gmail, he just has to press those keys and the text he configured before will be pasted into whatever app he's using.
So, instead of a user having to write "Dear sir, your order has been received succesfully" every time he receives an order and wants to send a confirmation email, he could just press something like "Crtl + O + R", and the corresponding text will be written for him.
I think that in order to achieve that my app has to do two things:
Intercept the key combination pressed buy the user when he's focused on a different app.
"Paste" the corresponding text to that app.
I have no real clue on how to achieve this, because what my app will be doing is something like "pasting" text on another app (otlook, word, notepad or whatever thing a user can type into), replacing the short text the user wrote with the long text he defined.
Any suggestions? I've looked into hot keys, but I'm not sure they're the way to go, and I also have no idea on how to "paste" the new text.
Thanks.
Have you considered simply adding text to the clipboard? Show the text next to a button that says "Copy to clipboard", and the user can just grab it and click Ctrl-V.
Can't think of a Windows app that does it this way, but I know it's possible; heck, Bit.ly can do it from your browser.
What I mean is how can I get text from another running active window. For example I have a program let's say word or msn. I am chatting with someone while my own program is running in the tray. I want to set a key let's say right click and ctrl to open up my program and get the word I clicked on.
I am using C#.
I direct you to my answer to the question Unified way to scrape HTML from any type of browser process
The answer links to an article on Coding the Wheel which details how to access text in other windows via system dll hooks. That should have what you require.
you could copy the word and then get the word out of the clip board in your application... otherwise your talking API's for any application you might was to get a word from.