How to check textual user input in a PowerPoint presentation? - powerpoint

Is it possible to check textual user input in a PowerPoint presentation?
I would like to create some kind of password field that users need the fill in correctly, before they can move on to the next slide.
To be clear: This is while the presentation is running, not in the edit mode.

An ActiveX text box can receive user input while the presentation is in slideshow view and has a Password Character property which, if set, displays the chosen character instead of whatever the user is typing; keeps the password safe from prying eyes.

Related

How to consistently search and replace RTF text

Thanks for looking.
Background
I am working on a MS Outlook plug in that requires certain text to be injected into the body of a new meeting request when a button click event fires.
The meeting request window only allows plain text or RTF (no HTML). The text that my application needs to enter should be able to be swapped out when the button is clicked again, but should not remove any text that the user may have added either above or below mine.
For now, I use a string of underscores with a leading and trailing set of hidden slashes like this:
\v//\v0__________________________________________________________________
{MY CUSTOM TEXT GOES IN BETWEEN}
__________________________________________________________________\v//\v0
Problem
With plain text, this is not a problem, but the problem arises when the user edits the body, and then clicks the update button again, it seems that the structure of the RTF encoding changes in a way that is not predictable and I therefore can not search for my text boundaries. For example, after the user adds their own text and clicks the "update button", my code now receives the following which I am unable to find using IndexOf():
//}{\\rtlch _______________________________________________________________
Question
Is their an easier, more consistent way to have essentially merge fields in RTF that the user may edit? I essentially just need to swap in or out a chunk of very simple text regardless of whether the user has written above or below it.
Thanks.
Actually HTML for appointments is supported by Outlook 2016. In any case however, Inspector.WordEditor returns an instance of the Word's Document object, so you can add a bookmark around your text using the Word Object Model rather then by injecting text visible to the end user.

How to blur the subject field in a compose mail inspector?

I have an Outlook VSTO 2010 add-in providing a button to insert text from a custom lookup, into the subject. The basics of this work just fine by grabbing the inspectors CurrentItem (MailItem) and appending to the Subject string.
Where it comes unstuck, is if the user is focused in the subject field, enters some text, then clicks the custom button to add some more text to the subject. The text that the user entered, isn't yet saved to the underlying MailItem, so manipulating MailItem.Subject ignores the users text.
I can work around this by saving the mail item before manipulating the subject, ensuring that the subject input field is saved to the object, but this is at odds with the standard Outlook behaviour, and could lead to a lot of un-sent drafts saved to the users mailbox. What alternatives are there? Anything that blurs the subject field would work (I can't find a way to even do that), but there might be a more elegant solution?

How can I make a console-like textbox?

I am making a program called "BasicSys". It is a BASIC System simulator that uses a textbox for the console. So far I have everything working great but I need to have the text box act like a command prompt window. It needs to be able to ask for input and retreive the value without allowing the user to modify anything outside of the prompt space (the space where the user should only be able to type is after a ":" or a ">"). Some feilds are password feilds that require either no echoing or having the chartacters replaced by *'s. Is it possible to make a console out of a textbox?
P.S. I also want to know if there are any small BASIC v2 compilers for Win32 so BasicSys can compile and run BASIC programs.
Depending on how realistic you want it to be you can use the API to open a real console window and interact with it. There are many examples available that you can find by searching such as this one. My suggestion though would be to fake it with a multi-line textbox. It would not be very tricky. Set an index every time you draw the prompt, then as long as the cursor is positioned after the index the textbox is read / write. If the user scrolls backwards make the textbox read only. It should be fairly simple using the KeyDown event and setting the ReadOnly property True / False to get a passable "command" window.

Rails 3: How to store screen resolution?

I want to store user's screen resolution in database when user login. How to detect and store it to database when user login?
Read it with JavaScript (browsers don't send screen resolution information by default, so it isn't available to Ruby or anything else server side unless you make it so), then generate a hidden input, set the name and value based on the data you've gathered, then add it to the form containing the username and password inputs.
Oh, and you might find the window size more useful than the screen resolution. Not everybody maximizes their windows.

How do you create a textbox in visual Studio with c#?

I feel kind of silly asking this question as it seems really simple, but how do I create a text box that I can type in instructions and stuff like that. I don't need the user to be able to change it, it is just to give instructions. I tried the label, but it only allows one line. I need something that can allow about a paragraph or so. Similar to the box in an installer that describes what the program does. What did I miss?
You can use a label but set its AutoSize property to false. This allows you to size the label as you wish and it will automatically wrap the text to fit.
You can also anchor the label to the parent form to have it automatically resize and reflow the text if the user resizes the parent form.
You want a text box, but set its Read Only property to TRUE, and maybe Enabled to FALSE

Resources