VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Codebox V1.0

MPCole  (2 Submissions)   String Manipulation   VB Script   Intermediate   Wed 3rd February 2021

This is a syntax highlighting codebox for almost every programming language you want. You can easily create new syntax shemes, if you want.
The highlighting algo isn't super fast, but much faster than many other examples, because it modifies directly RTF source, not the visible text.
If someone has any suggestions to improve this control or make the algo faster, then please tell me.
Hint: You will need SSubTmr6.dll from vbaccelerator to run the control. You can download it from:
https://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/SSubTimer/VB6_SSubTmr_Binary.asp
Don't
forget to register DLL before, otherwise it won't work.
Sample and Comments are in German.

API Declarations
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
Private Declare Function InvalidateRectAsNull Lib "user32" Alias "InvalidateRect" (ByVal hwnd As Long, ByVal lpRect As Long, ByVal bErase As Long) As Long
Private Declare Function GetScrollPos Lib "user32" (ByVal hwnd As Long, ByVal nBar As Long) As Long
Private Declare Function SetScrollPos Lib "user32" (ByVal hwnd As Long, ByVal nBar As Long, ByVal nPos As Long, ByVal bRedraw As Long) As Long
Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long

Rate Codebox V1.0 (7(7 Vote))

Download Codebox V1.0

Codebox V1.0 Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters