Help files using Notepad
-
Hi All, Using Notepad is a convenient method of displaying a HELP file. Does anybody know how to control the Notepad properties once it has been invoked? i.e how can you disable menu items and the text window in VB.NET code? thanks
Wow - that's a really bad idea. What's so hard about creating your own dialog with a window to display text ? Or live with the fact that Notepad will let them change/save it. You can control Notepad, but it's more work than you need to do, and it sure can't be done with a language as limited as VB. Christian Graus - Microsoft MVP - C++
-
Hi All, Using Notepad is a convenient method of displaying a HELP file. Does anybody know how to control the Notepad properties once it has been invoked? i.e how can you disable menu items and the text window in VB.NET code? thanks
rswipe wrote: how can you disable menu items and the text window in VB.NET code? Since Notepad doesn't expose any kind of automation interface, you'll have great difficulty in pulling this off, in ANY language, Christian! ;). Christian is correct, though. It's much quicker, and FAR easier, to build a form specifically for displaying your help file in a read-only TextBox. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
rswipe wrote: how can you disable menu items and the text window in VB.NET code? Since Notepad doesn't expose any kind of automation interface, you'll have great difficulty in pulling this off, in ANY language, Christian! ;). Christian is correct, though. It's much quicker, and FAR easier, to build a form specifically for displaying your help file in a read-only TextBox. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Dave Kreskowiak wrote: Since Notepad doesn't expose any kind of automation interface, you'll have great difficulty in pulling this off, in ANY language, Christian! True, but there are articles here on CP that do it in C++, I believe. Like I said, it's a hell of a lot of work, and a complete waste of time ( the article was proof of concept more than 'here's something useful' ). Christian Graus - Microsoft MVP - C++
-
Dave Kreskowiak wrote: Since Notepad doesn't expose any kind of automation interface, you'll have great difficulty in pulling this off, in ANY language, Christian! True, but there are articles here on CP that do it in C++, I believe. Like I said, it's a hell of a lot of work, and a complete waste of time ( the article was proof of concept more than 'here's something useful' ). Christian Graus - Microsoft MVP - C++
Christian Graus wrote: Like I said, it's a hell of a lot of work, I haven't seen the article, but, I'm going to guess it involves window finding and sending a bunch of messages to tell the controls to disable themselves? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Christian Graus wrote: Like I said, it's a hell of a lot of work, I haven't seen the article, but, I'm going to guess it involves window finding and sending a bunch of messages to tell the controls to disable themselves? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
OK guys, thanks for the comments. i agree making your own dialog box isn't so difficult although getting the format right is sometimes time consuming depending on how big the help file is. i'm all for an easy life and if there was a "one-liner" to do what i wanted then all the better. thanks anyway.
-
OK guys, thanks for the comments. i agree making your own dialog box isn't so difficult although getting the format right is sometimes time consuming depending on how big the help file is. i'm all for an easy life and if there was a "one-liner" to do what i wanted then all the better. thanks anyway.
I'm not quite sure what you mean by "format". But it is easy enough to place a read-only RichTextBox control on a dialog box you create. Then you can simply load your help file into the RichTextBox with the LoadFile command (
RichTextBox1.LoadFile("help.rtf")
). It's a "one-liner" and unlike NotePad, you can display a RTF where you can have more than just text! If that fails to please, you could always use the HTML Help Workshop to create a help file :) -
I'm not quite sure what you mean by "format". But it is easy enough to place a read-only RichTextBox control on a dialog box you create. Then you can simply load your help file into the RichTextBox with the LoadFile command (
RichTextBox1.LoadFile("help.rtf")
). It's a "one-liner" and unlike NotePad, you can display a RTF where you can have more than just text! If that fails to please, you could always use the HTML Help Workshop to create a help file :)