o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

VB6 - Coloring of SQL statements ... Done !!!! :)) -

Put 2 Richtextboxes and a command button on a form and paste this code.

VB Code:
  1. Option Explicit
  2.  
  3. Dim m_objFont As New StdFont
  4.  
  5. Private Sub Command1_Click()
  6. Dim l_objParse As New MSSQLParser.vbSQLParser
  7.    
  8.     rtbParsed.Text = l_objParse.ParseSQLSyntax(rtbSource.Text, vbSqlServerSyntax)
  9.    
  10.     rtbSource.TextRTF = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Tahoma;}}" & _
  11.                "{\rtf1 \colortbl ;" & _
  12.                "\red0\green0\blue255;" & _
  13.                "\red255\green127\blue127;" & _
  14.                "\red255\green0\blue255;" & _
  15.                "\red0\green0\blue0;" & _
  16.                "\red127\green127\blue127;" & _
  17.                "\red255\green0\blue0;" & _
  18.                "\red0\green0\blue0;" & _
  19.                "\red0\green128\blue128;" & _
  20.                "\red0\green0\blue0;" & _
  21.                "\red0\green0\blue0;" & _
  22.                "}\viewkind4\uc1\pard" & _
  23.                rtbParsed.Text & "\par }"
  24.                
  25.     rtbSource.SelStart = 0
  26.     rtbSource.SelLength = Len(rtbSource.Text)
  27.    
  28.     'Set font properties
  29.     rtbSource.SelFontName = m_objFont.Name
  30.     rtbSource.SelFontSize = m_objFont.Size
  31.    
  32.     'UnSelect all text
  33.     rtbSource.SelLength = 0
  34.    
  35.     Set l_objParse = Nothing
  36. End Sub
  37.  
  38. Private Sub Form_Load()
  39.     m_objFont.Name = rtbSource.Font
  40.     m_objFont.Size = rtbSource.SelFontSize
  41. End Sub

 

coloring -
Is any way for coloring any column in dbgrid? Thanks for help.


RTB coloring -
hi there i have read a tutorial on the basics of RTB coloring. i basically want to be able to color some keywords entered in the RTB if we load a file and if we enter text into the RTB. how do i go about doing this? i am really sorry - perhaps a stupid question but i would love t


Code Coloring is no longer working -
John, just to let you know that the Code coloring functionality is messed up.


What's the concept of coloring HTML code -
Hello, I'd like to know the concept behind coloring the HTML tags in TextBox control? Is there any tutorial or project sample? Many thanks..


automatic coloring in MS Word -
Hi all, Is there any way to automatic coloring if we type something between < and > in MS Word? It should work like syntax highlighting in programming editors. Thanks in advance.


code coloring in the rtf control -
is there a way to color syntax in the rtf control without using the find method? if not, then is there a free control available online for coloring syntax and a way to automatically insert text?


Outputting formatted code -
Hi, I'm looking for a way to export all of the code from my VB6 project while keeping the IDE formatting (predominently the coloring). I've found a number of solutions enabling me to print the code with formatting but none allowing me paste it into a word document with the colori


about filling in a color on an image -
Hi. I don't really know how to ask this, so I'll just explain my objective instead. I want to be able to have an image, best example would be a map of the United States. Then depending on certain circumstances, the states would each be colored a different color, for example a clim


filling in a color on an image -
Hi. I don't really know how to ask this, so I'll just explain my objective instead. I want to be able to have an image, best example would be a map of the United States. Then depending on certain circumstances, the states would each be colored a different color, for example a clim


Coloring Tabs In SStab -
The Other Day I ask about coloring tabs in SStab This Is My Solution to this if there is another way then Lets Hear it.


Coloring Sstab -
Lets Try This One For and Example Of Coloring SStab


Disable code coloring -
Maybe its an idea to have an option to disable the coloring of the code between the [ CODE ] and the [ /CODE ]. It's nice when it's vb code that is posted, but when you post C/HTML/Java/etc its looks kinda messed up.


[2005] Datagridview Colors Resetting -
I searched for this but couldn't find anything similiar... Anyhow, I am using a datagridview on my screen and coloring the rows pending on a code in one of the columns. My coloring is working fine until someone clicks on the column header, to sort the column, and all of my colors a


<b>Alternate coloring schemein my TDBGrid</b> -
Hello all, I want alternate coloring scheme in my TDBGrid? How can I achieve that even rows comes inblue color and odd rows should have light gray color.


if... an if statement -
Is there any possible way to if a set of if statements so if the inside if statements return true then execute the outside if statements code? A lot of if in that line.


coloring in Flash -
I have been coloring some pictures in flash, and it's really creating quite the effect. Here are a few sample thumbs. Full pics on my main page. cheers, Ian


UserControl Initialization Problem -
I'm writing a user control that will allow the user to select the color for the little square check area (which I'll call the tick area) within a checkbox. The code I have written works when the user checks or unchecks the checkbox, but I can't find a way to color the tick area before


HTML Tag Coloring, anyone -
Hey guys and gals - I am working with an RTFText Box, and I need to make tag coloring for HTML elements such as: carrots (<, and >), equal signs with quotation marks (=""), and text that's in between the quotation marks (="text"). If anyone can help me out


VB Paint Program -
Would it be possible to create a type of paint program with vb 6.0? I want to write a coloring book for my nephews. Just a window that displays a pic that can be colored on with some color crayon buttons to change the color of the pencil. If anyone has any links to tutorials that would


I FIXED IT!! -- Read On -
I feel as if I should post this in the c++ section cause it is very c++ related...see about half-way through the few functions I Wrote to init parts of Dx, it would be at Init_DInput function I wrote. Now I had an if statement for if the progammer wants mouse or keyboard or both ini


MSFlexgrid row coloring gets lost after refreshing data control -
Hi, I have an MSFlexgrid bound to a Data control which points to an Access 2000 database. When the user of the flexgrid selects a row, it should color blue to mark the row selected which works fine. Based on a timer, I refresh the data control which has as result that all the da


Syntax Coloring RTF -
I'm creating a code editor and I am [trying] to program in the automatic sysntax coloring when a keyword is entered. I have a text file holding all the keywords then at the beginning of the program I load them into an array, so after the user has typed a new word (clarrified through


Stored Procedure - SQL Server 7 -
Hi all, Over the weekend I tried to write a stored procedure that included Select... Into, Alter Table, and Update statements. I tried adding GO after each statement and that worked fine in the query analyzer. I tried copy and pasting the statements into the stored procedure and


FAST coloring code -
I got some code to colorize the code but it is really slow and doesn't work completely; really I am intersted because it's one of the my college projects my instructor requests me to add a specfic color tags to the code and I want to colorize any 'String' between " " , C


select case with non integer numbers -
Hello I have got a select case structure with non integer values, it goes like this select case power case 0.001 'statements case 1 'statements case 2 'statements case 20.001 'statements case 40 'statements case 40.001 'statements case 60 'statements


Replacing IF statements -
Instead of having a bunch of IF statements? what can i do? On my previous question I have already asked about randomising within a customised restriction and when that value is returned, I have to do an action depending on what it is. And each value has a different set of actions.


is it possible to change the way statements are executed in vb -
I just wanted to know a simple thing: If it possible to change the execution plan, the way vb executes the statements...can something like this be done: If x=1 then goto statement 10 else Nothing End if if the value of x is one then it should skip all the statements and go to


Audit trail of error SQL -
Hi there, I want to find out all the SQL statements that are failed[i.e produced error] against a particular database in SQL server. Is it possible? Lets say 1000 SQL statements are executed per day. I want to find out at the end of the day, which SQL statements have crashed.


[2005] # of nested program control statements - Rule of Thumb -
Hi all, I'm asking because I recently download some sample code from somewhere where there were so many nested statements that a lot of the code was running off the right side of the screen. I'm guessing there may be some times where you need a number of nested statements but is


case select -
Working with 'select case'. example : case 1 frmHelp.show statements case 2 frmBill.show statements case ... Now I'm executing the statements in case 1. On the form in case 1 I have a button 'next'. If I click on that button I want to execute the statements which are d


coloring text -
...


Performance SQL processing DAO/Access -
Hoi VB'ers I have written an app that will fill a access 97 database. I expect to execute 250000-350000 sql statements from a set of 30 i coded in my program. I'm using DAO because tests showed me that this is the fastest way to process the data/sql statements. From info f


Syntax Coloring in RTB -
how can i implement this??


If True Then.. -
hi all, hope this hasn't been covered before...I have searched without success I have (unfortunately) inherited a large, poorly commented, VB5 application which I have to debug & support. This code has a multitude of statements of the form below. If True Then ..sta


ADO: SQL Statements -
I can't find out how to use SQL statements with ADO. Can anybody point me towards any tutorials on this? Or give me a pointer?


no clue and vector spaces -
hey everyone well here's my prob: K is a Body, V is a vector space over K u,v,w are element of V Prove that the following statements are equivalent: (i) u,v,w are linearly dependent (ii) One of the following statements is true (1) v=0 (2) a element of K with w=a*v


SQL Variables -
I have a bunch of SQL statements that are bult in my program through several variables. I have heard that it is better and faster to put these SQL statements as stored proceedures in my database and call them from my program. My question is...is there a way to create a stored


combining tables or sql statements -
Greetings, Can anyone post a link or a code which tells you how to combine datatables or sql statements? Thanks


How to execute a sql file which has multiple sql statements -
hello, The problem is that I need to execute a sql file in which many sql statements are there.All I am going to specify in my Visual Basic code is the path of the input file. The file has to be taken as input and then the statements inside the file have to be executed one by one an


Does VB have these statements: On Error, On Break... -
Does VB have the following statements: