A notepad viewer embed on vfp form

Published on by Yousfi Benameur

yNotepad_Viewer


This is a lister and editor of any kind of txt file (htm,html,prg,mpr,log,h,....)

Its based essentially on the windows notepad.exe who is an awesome tool for texts ANSI, UNICODE and UTF8 encodings.

Notepad supports all languages implemented in windows and its an universal tool.

VFP form as window can embed any kind of executables and makes it as child windows with apis SetParent and SePosWindow functions by playing with handles.

What is available for notepad is also available for word, excel,notepad++, ie,....but with some particular precautions.

API used  for this purpose:

FindWindow
SetParent
SetWindowPos
SEndMessage

 

This application have a behavior as a txt files (or equivalent) viewer.the goal is to gather,list on a vfp grid all these filesand make them clickable and send to the notepad viewer. It scans a single folder (warning i dont make the search recursive)

The viewer have all PEM of notepad.exe.Even if you modify the texts in this viewer its not be saved anywhere.

A blank txt file has added to use as draft. Use the notepad standard rightclick to fire the contextuel menu (editing,formatting,unicode Right to left,...)

Test the unicode txt files added in the folder ytxt to see the power of notepad.

 

 

Warning : dont modify the font otherwise you modify the font of all your system txt files. As you the notepad menu is hidden for bad manipulations.

Can use same method for  browser OLECONTROL  IE as viewer and other pplications.

Use this code free of any charge but with any warranties.

 

 

Author: Yousfi Benameur El Bayadh Algeria

22 décembre 2014

 

Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).
Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).
Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).
Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).
Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).
Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).
Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).
Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).
Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).

Note that the syntaxhighLighter attached on the form is available only for ansi text (not unicode ones).

Published on Notepad, viewer, Visual Foxpro

To be informed of the latest articles, subscribe:
Comment on this post
V
Great blogs Can you help me to view MS Office doc, xls and pdf files in a vfp form as well as notepad embedded and how to use google hindi input IME in vfp form textbox with krutidev10 font. Thanks a lot
Reply
V
Thanks Really Great Blogs, if possible please guide about universal docs viewer (ms office docs, pdf, etc...) in vfp form and also how to use google hindi input in text box with kruti dev 10 font Thanks a lot
Reply
Y
Nowadays office applications as word,excel are full of security considerations and its very difficult <br /> to embed them on a vfp form.<br /> for ex.for excel you can visit this UT page where i participated to discussion around this subject and there is many solutions shown .<br /> https://www.universalthread.com/DataEntryThreadView.aspx?ID=1637287&LXMenu=2<br /> <br /> maybe the best solution at all is to preserve the original application as it and dont try to embed on a vfp form.CreateObject is your friend and automation can do that easily(word.application,excel.application...)<br /> for pdf can use IE and nivigate to the pdf destination as URL.<br /> if you have MS office installed on your machine can use the activeX MS Textbox: "Forms.TextBox.1"<br /> you can use RTFbox ,HTML,Word......all are unicode.