|||||||    TIPS    |||||||
All the web pages here have been created with Bhaum, the text/HTML editor -> Bhaum
 Bhaum

Arrow   by the space :
Shift + Space inserts  . ( applicable to version 1.19 or higher )

Arrow Copying the short path/name
Arrow Converting named colors to HTML Codes
Arrow Better Find/Replace
Arrow Promoting paragraphs to table data on the spot
Arrow Moving across words fast
Arrow Saving(Converting) the RTF files as(into) Plain Text files
Arrow Moving from the top to the bottom or from the bottom to the top

 C++ Builder

Arrow Assigning a shortcut to a dynamically created menu item
Arrow Getting the Windows Directory
Arrow Suppressing the TColor Warning







 icon How can I get the name of the actual Windows folder?

Use GetWindowsDirectory function :

 char wd[MAX_PATH];
 GetWindowsDirectory(wd,MAX_PATH);
 Label1->Caption=wd;

 Now the Label1->Caption shows the name of the Windows folder.





 icon Suppressing the TColor warning

I assigned color value in BGR(0xbbggrr) format to a TColor variable and the compiler keeps displaying the following warning with every compilation :

C++ warning : assigning int to TColor

Anyway suppressing this warning?


 
 Use simple type casting as shown below :

 TColor col = TColor(0xff0000);
--------------------------------------------------
 History(?) has it that the following is better:

 TColor col = (TColor)0xff0000;





 icon Assigning a shortcut to a dynamically created menu item - 05022001

Assigning a shortcut to a menu item. By the 'Object Inspector' you can achieve this easily at design time. But when it comes to dynamically doing it at run time, it may require you to take little trouble :



The following shows how to assign a shortcut "Ctrl+F6" to a menu item named "mnuClose" :

mnuClose->ShortCut = ShortCut(Word(VK_F6), TShiftState() << ssCtrl);





Netscape icon  Looks good in Netscape v4.x or higher, now.
Viewed best in IE v4 or later.




 icon Saving(converting) RTF files as(into) Plain text files

How could I save(convert) RTF files as(into) Plain text files?



Do the following :

  1. Load Bhaum.

  2. Make sure the Options --> Auto-convert RTF item has a check mark on it.

  3. Load the RTF file the user want to convert with Bhaum.
  4. Bring up the Save As... dialog box.
  5. Change the file filter to that of Plain Text.

  6. Remove the ".rtf" extension from the filename.
    ex) "filename.rtf" ---> "filename"
    The user may change the file name also, if he (or she) wants.

  7. Click on the save button to save it as plain text.

  8. The extension ".txt" is automatically attached to the filename :
    ex) "filename.txt".

  9. To confirm the conversion, just press the Reload button.
    Done!

    But, with version 1.19 or higher the user should not click the 'Reload' button.
The same logic can be applied to saving plain text files as RTF files.






 icon Moving from BOD to EOD or from EOD to BOD

Moving from the beginning to the end or from the end to the beginning of a document.



The following do those :
Move to the top :

Ctrl + Home
Alt + A ( one-hand operation )
Right mouse click on the Find button ( handy )
Right mouse click on the Find Again button ( handy )

Move to the bottom :

Ctrl + End
Alt + Z ( one-hand operation )
Right mouse click on the Replace button ( handy )





 icon Moving across words fast - 05242000

Moving cursor position in Bhaum word by word ( fast moving ).



Very simple :

Ctrl + one of the arrow keys on the keyboard. That's all.





 icon Better Find/Replace - 10082000

Applicable to v1.15 or higher


Finding words on the real spot ( handy ).


Select a range of text to search for and click on the 'Find Again' button or press 'F3' to find another match.



Replacing words on the real spot ( handy ).


Select a range of text to be replaced and click on the 'Replace' Button or select 'Replace...' item from the pop-up menu.

Do your due operation.






 icon Converting named colors to HTML Codes - 01212001

Applicable to v1.17 or higher
Supports up to 146 colors including 16 base colors.


  1. Select a named color in an HTML document.

    ex) ...spacing="2" color="antiquewhite" cell....

  2. Make sure the HTML color button's drop-down menu item-> 'Code' is checked.

  3. Click the HTML color button on the HTML Bar again to drop down its drop-down menu.

  4. Now, select 'More...' item from the drop-down menu ( Or just press 'F8' ) to bring up the Color Dialog box.

  5. Then the Color Dialog box pops up with the named color selected as expected.

  6. Nothing to bother further!
    So, just press the 'OK' button on the Dialog box or hit the 'Enter' key on the keyboard and all is done as intended like the following :

    ex) ...spacing="2" color="#FAEBD7" cell....

    The same logic can be applied to converting an HTML color code to a named color if it's named ( with the 'Code' item unchecked )






 icon Copying the short path/name of a file - 03212001

Applicable to v1.19 or higher


  1. Open a document with Bhaum.

  2. Check the 'Short Path/Name' menu item which is a sub-item of the 'ReOpen' item under the 'File' menu.

  3. Then all the listed MRU items' names are changed to those in short format. So now, just click the ' Copy Path/Name' from the 'Edit' menu to copy the current file's path/name.

    Done!

    example)

      C:\Program Files\Internet Explorer\License.txt
      <- the long name

      C:\PROGRA~1\INTERN~1\LICENSE.TXT
      <- the short name just copied


Copyright (C) 2000 NK Computing

  HOME
Come and enjoy browsing in my home!
 


End Of Document