473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Syntax Highlight for Editor

Hello Gurus

At present i am developing an editor using C#.....

How can i achieve Syntax highlighting, comment highlighting
and other stuffs without flickering...

thanks in advance

Nov 17 '05 #1
3 1845
Well, that's a tall order. In order to do anything without flickering
though, you need to double buffer the drawing. In other words, you create a
compatable device context, draw on that, and then copy it over to the
current device context.

You used to do it with a call to BitBlt. However, with controls, you
can just call the SetStyle method on your control and set the
OptimizedDoubleBuffer flag to true. Then, you make sure that all of your
painting is done in your overridden OnPaint method.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<Le************@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hello Gurus

At present i am developing an editor using C#.....

How can i achieve Syntax highlighting, comment highlighting
and other stuffs without flickering...

thanks in advance

Nov 17 '05 #2
There is a free eBook, "Dissecting a C# Application", downloadable from
http://www.apress.com/free/index.html which contains (among many other
things) information on writing an editor with sysntax highlighting etc. in
C#.

Chris Jobson

<Le************@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hello Gurus

At present i am developing an editor using C#.....

How can i achieve Syntax highlighting, comment highlighting
and other stuffs without flickering...

thanks in advance

Nov 17 '05 #3
Hello Chris and Nicholas

thank u very much for ur info and resource....

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tim Tyler | last post by:
Are there any syntax colouring scripts out there? Ones where you provide the script with the path or URL of some source file - and they return a web page containing correctly-coloured source...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
75
by: David MacQuigg | last post by:
Seems like we need a simple way to extend Python syntax that doesn't break existing syntax or clash with any other syntax in Python, is easy to type, easy to read, and is clearly distinct from the...
0
by: Mauricio Cruz Vidotto | last post by:
I'm planning to develop a .NET aplication using C# same Emacs Editor but I don't know how can I do syntax highlight. Any ideia about this? Tks Mauricio
4
by: Tim Conner | last post by:
Hi, I am writing an application in C# that needs a memo control with the capability of highlight certain syntax of programming languages, very similar to what the Vs.Net does, or any language...
4
by: Bob hotmail.com> | last post by:
Everyone I have been spending weeks looking on the web for a good tutorial on how to use regular expressions and other methods to satisfy my craving for learning how to do FAST c-style syntax...
11
by: Xah Lee | last post by:
Of interest: • The Semicolon Wars, by Brian Hayes. 2006. http://www.americanscientist.org/template/AssetDetail/assetid/51982 in conjunction to this article, i recommend: • Software...
2
by: rockstar_ | last post by:
Hello all- I'm developing a Content Management software for my own site, and possibly package and deploy to other sites (for friends, family, etc.) The content management software is combined...
6
by: Nathan Pinno | last post by:
Why does my compiler say invalid syntax and then highlight the quotation marks in the following code: # This program is to find primes. primes = import math import gmpy while 1: run =...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.