The SCIVB Control is not at all difficult to get going with. In essence to get scintilla onto your form all you need to do is add the SCIVB.ocx to your project, and place the SCIVB control on your form. Then you need to add this simple line of code to your Form's Load Event.

SciMain.InitScintilla Me.Hwnd.

That's it. Run the app and you should see a scintilla window on your form.

Now a common problem that many users have when first experimenting with this control is the Scintilla Window doesn't show up. This is because the SciLexer.dll is not available. SciLexer.dll is the actual Scintilla control. The SCIVB control will try to load SciLexer.dll from both the system directory and the main application directory. If it is not available it will fail to create the window. In this event an error message will be sent to the OnError event within SCIVB, and InitScintilla will return false.

As a general rule the best place to store the SciLexer.dll file is within the windows system directory. Example being
  • C:\Windows\System32 on WindowsXP
  • C:\WINNT\System32 on Windows 2000
  • ETC