Click here to Skip to main content
15,888,521 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB Script as Service Pin
Christian Graus14-May-07 2:25
protectorChristian Graus14-May-07 2:25 
QuestionVB Script as Service Pin
vimal_yet14-May-07 1:21
vimal_yet14-May-07 1:21 
AnswerRe: VB Script as Service Pin
Dave Kreskowiak14-May-07 4:23
mveDave Kreskowiak14-May-07 4:23 
Question.resx file Pin
balakpn13-May-07 23:45
balakpn13-May-07 23:45 
AnswerRe: .resx file Pin
Sonia Gupta14-May-07 0:20
Sonia Gupta14-May-07 0:20 
Generalany other link pls Pin
balakpn14-May-07 2:00
balakpn14-May-07 2:00 
GeneralRe: any other link pls Pin
Sonia Gupta14-May-07 2:19
Sonia Gupta14-May-07 2:19 
GeneralRe: any other link pls Pin
balakpn14-May-07 4:24
balakpn14-May-07 4:24 
i saw that command in this article

http://www.codeproject.com/csharp/shadyrichtext.asp


using System;
using System.Windows.Forms;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Media;
using System.Drawing;
using System.Text;
using System.Text.RegularExpressions;
using System.Runtime.InteropServices;
using System.Resources;
using System.Reflection;
using Microsoft.Win32;
using System.IO;
using System.IO.IsolatedStorage;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;

namespace RTF_Parsing
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

#region Tables, Lists and Constants
#region Fonts

const string proportionalFontName = "Verdana";
const string monoFontName = "Courier New";

const string proportionalFontDefinition = @"{\f0\fnil\fcharset0 " + proportionalFontName + @";}";
const string monoFontDefinition = @"{\f1\fnil\fcharset0 " + monoFontName + @";}";

const int proportionalFontSize = 8;
const int monoFontSize = 9;

#endregion

#region Color Table

int[] rgbText = { 0, 0, 0 };
int[] rgbCharacter = { 128, 128, 128 };
int[] rgbShade = { 238, 238, 238 };
int[] rgbLiteral = { 144, 0, 16 };
int[] rgbComment = { 32, 128, 0 };
int[] rgbKeyword = { 13, 0, 255 };
int[] rgbClass = { 43, 145, 175 };

// It is useful to set up some aliases ...
public const string TX = @"\cf1 ";
public const string CH = @"\cf2 ";
public const string SH = @"\cf3 ";
public const string LI = @"\cf4 ";
public const string CO = @"\cf5 ";
public const string KY = @"\cf6 ";
public const string CL = @"\cf7 ";

// ... and their escaped versions
public const string escTX = @"\\cf1 ";
public const string escCH = @"\\cf2 ";
public const string escSH = @"\\cf3 ";
public const string escLI = @"\\cf4 ";
public const string escCO = @"\\cf5 ";
public const string escKY = @"\\cf6 ";
public const string escCL = @"\\cf7 ";

string colorDefinitions = "";

#endregion

#region ASCII Values

// Some ASCII constants
const char LF = (char)0x0A; // Line Feed
const char CR = (char)0x0D; // Carriage Return
const char Space = (char)0x20; // Space char

#endregion

#region Main Form Parameters

bool rtfvisible = false;

bool isFirstRun = true;

int maxFormHeight = 712; // Expanded
int minFormHeight = 568; // Not expanded

const int columns = 94; // Shading width

const string upArrow = "r";
const string downArrow = "s";

bool expanded = false;

#endregion

#region isoFiles

IsolatedStorageFile isoStore =
IsolatedStorageFile.GetStore(IsolatedStorageScope.User
| IsolatedStorageScope.Assembly, null, null);

const string isoF = "isolatedFirst.iso";
const string isoS = "isolatedSource.iso"; // Source
const string isoC = "isolatedClassList.iso"; // Class names

#endregion

#region Initialized Lists

string keywordList = "";

string unformattedClassList = "";
string formattedClassList = "";

#endregion
#endregion

// ----------------------------------------------------------------------------------------
// ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD ON LOAD
// ----------------------------------------------------------------------------------------
private void Form1_Load(object sender, EventArgs e)
{
// Startup screen
this.Height = minFormHeight;
btnArrow.Text = downArrow;

// Set Font properties for both Rich Text Boxes
rt1.Font = new Font(proportionalFontName, proportionalFontSize, FontStyle.Regular);
rt2.Font = new Font(monoFontName, monoFontSize, FontStyle.Regular);

rt1.Text = "";

t1.Visible = false; // t1 shows the background RTF encoding

string r = @"\red";
string g = @"\green";
string b = @"\blue";

string tx = r + rgbText[0].ToString() + g + rgbText[1].ToString() + b + rgbText[2].ToString() + ";";
string ch = r + rgbCharacter[0].ToString() + g + rgbCharacter[1].ToString() + b + rgbCharacter[2].ToString() + ";";
string sh = r + rgbShade[0].ToString() + g + rgbShade[1].ToString() + b + rgbShade[2].ToString() + ";";
string li = r + rgbLiteral[0].ToString() + g + rgbLiteral[1].ToString() + b + rgbLiteral[2].ToString() + ";";
string co = r + rgbComment[0].ToString() + g + rgbComment[1].ToString() + b + rgbComment[2].ToString() + ";";
string ky = r + rgbKeyword[0].ToString() + g + rgbKeyword[1].ToString() + b + rgbKeyword[2].ToString() + ";";
string cl = r + rgbClass[0].ToString() + g + rgbClass[1].ToString() + b + rgbClass[2].ToString() + ";";

// These colors will make up a new color table
colorDefinitions = tx + ch + sh + li + co + ky + cl;

// On first run, we will create in isolated storage
// a Class List (isoC) and a source file (isoS). The
// default, first run, source file content is a resource.

Rose | [Rose] keywordList = Resources1.Keywords; Rose | [Rose]
InitializeDataFiles();
}

resources one is resx file




with regards
Balagurunathan.B

GeneralRe: any other link pls Pin
ctlqt1214-May-07 6:05
ctlqt1214-May-07 6:05 
GeneralRe: any other link pls Pin
balakpn14-May-07 23:03
balakpn14-May-07 23:03 
Generalanother problem Pin
balakpn14-May-07 23:53
balakpn14-May-07 23:53 
QuestionXSTL Transformation Include in .net 1.1 (Please Help) Pin
Cape Town Developer13-May-07 21:51
Cape Town Developer13-May-07 21:51 
AnswerRe: XSTL Transformation Include in .net 1.1 (Please Help) Pin
Sonia Gupta13-May-07 22:15
Sonia Gupta13-May-07 22:15 
GeneralRe: XSTL Transformation Include in .net 1.1 (Please Help) Pin
Cape Town Developer13-May-07 23:02
Cape Town Developer13-May-07 23:02 
QuestionError while updating webreference in VB.net Project Pin
chepps13-May-07 21:31
chepps13-May-07 21:31 
Questionpowerpoint automation via Microsoft.Office.Interop.PowerPoint in vb.net Pin
uglyeyes13-May-07 21:27
uglyeyes13-May-07 21:27 
AnswerRe: powerpoint automation via Microsoft.Office.Interop.PowerPoint in vb.net Pin
uglyeyes14-May-07 17:19
uglyeyes14-May-07 17:19 
Questionintegration of .net framework 2.0 Pin
Sonia Gupta13-May-07 20:19
Sonia Gupta13-May-07 20:19 
AnswerRe: integration of .net framework 2.0 Pin
Christian Graus13-May-07 20:31
protectorChristian Graus13-May-07 20:31 
QuestionRe: integration of .net framework 2.0 Pin
Sonia Gupta13-May-07 20:52
Sonia Gupta13-May-07 20:52 
QuestionPrint without prompt [modified] Pin
Suhail Shahab13-May-07 20:12
Suhail Shahab13-May-07 20:12 
AnswerRe: Print without prompt Pin
Dave Kreskowiak14-May-07 4:16
mveDave Kreskowiak14-May-07 4:16 
GeneralRe: Print without prompt Pin
Suhail Shahab15-May-07 20:44
Suhail Shahab15-May-07 20:44 
GeneralRe: Print without prompt Pin
Dave Kreskowiak16-May-07 13:27
mveDave Kreskowiak16-May-07 13:27 
QuestionHow to get data in column from dataset Pin
somchoto13-May-07 19:33
somchoto13-May-07 19:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.