drag and drop word file on to windows form - winforms

Is there a way to drop a word file onto a windows form into a rich text box or text box and have it copy the contents of the word file to the text box?

Check out this documentation on MSDN 'How to: Perform Drag-and-Drop Operations Between Applications': http://msdn.microsoft.com/en-us/library/bs2c4z53.aspx
Also: 'Walkthrough: Performing a Drag-and-Drop Operation in Windows Forms': http://msdn.microsoft.com/en-us/library/za0zx9y0.aspx

Related

I can't see the output screen in vscode

vscode also opens notepad instead of running the code when i click run code while writing the c program.
when I run the c code, the open file with the application section comes out.But the output does not come out.The applications are notepad, word, etc.
I have the code runner.this problem happened later.i can only see the output of 1 or 2 codes.
You can open as many editors as you like side by side vertically and horizontally. If you already have one editor open, there are multiple ways of opening another editor to the side of the existing one:
Alt click on a file in the Explorer.
Ctrl+\ to split the active editor into two.
Open to the Side (Ctrl+Enter) from the Explorer context menu on a file.
Click the Split Editor button in the upper right of an editor.
Drag and drop a file to any side of the editor region.
Ctrl+Enter macOS: Cmd+Enter in the Quick Open (Ctrl+P) file list.

Sublime Text 3 find and replace in multiple files

I want to find and replace code in multiple files.
Does anyone know if the feature "find and replace in multiple files" in Sublime Text 3 is gone?
It used to be a feature for ST2 (shift-command-F), see screenshots ST2 and ST3.
Or is there a other way to do this?
The option is still there, but because you're using a custom theme the bar needs to be taller for you to see the entire contents of the panel.
You can grab the top of the panel and stretch it up so that everything is visible and then back down as far as it will go to make it compact again.
You only have to do this once; Sublime remembers the height of the panel and will use it next time (which is why it uses the incorrect height when you switch to a theme that makes everything in the panel taller).

Maintain text position in RichTextBox while adding and removing text to the end and beginning respectively

I have a very simple form with a RichTextBox field. It is acting as a crude log file viewer. As log data is added to the file I append the new data to the text box. This works great but I wanted to prevent the text box from scrolling when the new data was appended so the currently visible data could be read. I experimented with this for a while and I ultimately had to call the native SendEvent function to get and set the scroll position before and after appending the text. This has also been working great, however, I now have a new problem: over time the log file can grow quite large and use huge amounts of memory to keep the entire contents of the log file in the text box. So now what I've done is limited the amount of text in the text box by removing text from the beginning if the text size reaches a certain threshold.
So now my problem is that I can maintain the scroll position, but the text will change since I am removing text from the beginning. Is there a simple way to change the scroll position to maintain readability (obviously if the user is reading the first line of the text box and that is removed then there is nothing that can be done, but I think that is acceptable)?
Here's an example: say my threshold is 1MB of text in the text box. If there is currently 1MB of text, and I need to append 1000 characters then I also need to remove 1000 characters from the beginning. If I am scrolled to the middle of the text then I can maintain that scroll position after the removal and appending of text but now the text that I was reading is further up.
Maybe I need to rethink my approach?
I realized that modifying the text while the user is viewing it doesn't really make sense. So I decided to add an option to this form to 'freeze' updates to the text box. When frozen no text will be appended or removed and the user can freely scroll around. When unfrozen all of the appending/removing works as normal.

WinForms: how to scroll graphics and text continuously to a debugging console?

I'd like to scroll a mixture of text and pictures out to a debugging console written in WinForms.
For example, I might print a few lines of text, followed by a graph, followed by more lines of text, etc.
Is there some form of text box in WinForms that I can continuously append not only text, but also pictures or graphs?
You could consider a Rich Text Edit control. Here is a question whose answer links to some options. The question is old, so you may want to re-Google.
Open Source .NET Rich Text Editor UserControl with GUI all implemented

Highlight text in a PDF document viewer

I have a WinForms application and am using AxAcroPDF COM component to display PDF files in my application. I want to highlight occurrences of some text in the PDF document using the AxAcroPDF component. Is there a way to do that?
just since there are no answers here - according to Adobe's API there is a method SetCurrentHighlight, which hightlights text within the specified rectangle (I haven't tried this):
SetCurrentHighlight
Highlights the text selection within the specified bounding rectangle
on the current page.
Syntax void setCurrentHighlight(LONG nLeft, LONG nTop, LONG nRight,
LONG nBottom);
Another alternative way is there, you may like to do all kind of text editing features using Foxit PDF Reader. It is now available for major platforms like linux, Windows and Mac.
Mendeley (https://www.mendeley.com/) does the work like a charm!
In fact, Mendeley is more than a PDF-reader. You can use it to organize your docs and references .

Resources