Click here to Skip to main content
15,921,530 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Bizzare ViewState issue Pin
Christian Graus4-Dec-08 8:44
protectorChristian Graus4-Dec-08 8:44 
GeneralRe: Bizzare ViewState issue Pin
dmartu4-Dec-08 22:56
dmartu4-Dec-08 22:56 
Questionrepeater control Pin
madan raj3-Dec-08 22:56
madan raj3-Dec-08 22:56 
AnswerRe: repeater control Pin
Abhijit Jana3-Dec-08 23:02
professionalAbhijit Jana3-Dec-08 23:02 
AnswerRe: repeater control Pin
nazeerahamad3-Dec-08 23:22
nazeerahamad3-Dec-08 23:22 
AnswerRe: repeater control Pin
J4amieC3-Dec-08 23:32
J4amieC3-Dec-08 23:32 
QuestionNeed to highlight text area in an image Pin
Navinchandran3-Dec-08 22:44
Navinchandran3-Dec-08 22:44 
AnswerRe: Need to highlight text area in an image Pin
Imran Khan Pathan4-Dec-08 0:17
Imran Khan Pathan4-Dec-08 0:17 
Navinchandran wrote:
i want to know is ,how can select a particluar area in a image , and identify the text.


Here I give you sample code.
This helps you.

Bitmap b = new Bitmap(500, 100);
Graphics g = Graphics.FromImage((System.Drawing.Image)b);




//g.FillRegion(Brushes.Red,


string message = "This is the string to highlight a word in.";

// Declare the word to highlight.
string searchWord = "string";

// Create a CharacterRange array with the searchWord
// location and length.
CharacterRange[] ranges =
new CharacterRange[]{new CharacterRange
(message.IndexOf(searchWord), searchWord.Length)};

// Construct a StringFormat object.
StringFormat stringFormat1 = new StringFormat();

// Set the ranges on the StringFormat object.
stringFormat1.SetMeasurableCharacterRanges(ranges);

// Declare the font to write the message in.
Font largeFont = new Font(FontFamily.GenericSansSerif, 16.0F,
GraphicsUnit.Pixel);

// Construct a new Rectangle.
Rectangle displayRectangle = new Rectangle(20, 20, 200, 100);

// Convert the Rectangle to a RectangleF.
RectangleF displayRectangleF = (RectangleF)displayRectangle;

// Get the Region to highlight by calling the
// MeasureCharacterRanges method.
Region[] charRegion = g.MeasureCharacterRanges(message,
largeFont, displayRectangleF, stringFormat1);

// Draw the message string on the form.
g.DrawString(message, largeFont, Brushes.Blue,
displayRectangleF);

// Fill in the region using a semi-transparent color.
g.FillRegion(new SolidBrush(Color.FromArgb(50, Color.Fuchsia)),
charRegion[0]);
b.Save(Server.MapPath("MyImage.png"), System.Drawing.Imaging.ImageFormat.Png);


Regard
IMrankhan

please don't forget to vote on the post that helped you.

AnswerRe: Need to highlight text area in an image Pin
Christian Graus4-Dec-08 8:45
protectorChristian Graus4-Dec-08 8:45 
Questiongoogle problem Pin
Monu1603-Dec-08 22:05
Monu1603-Dec-08 22:05 
AnswerRe: google problem Pin
SeMartens3-Dec-08 22:18
SeMartens3-Dec-08 22:18 
GeneralRe: google problem Pin
Monu1603-Dec-08 22:29
Monu1603-Dec-08 22:29 
GeneralRe: google problem Pin
SeMartens3-Dec-08 23:37
SeMartens3-Dec-08 23:37 
Question[Message Deleted] Pin
mr_muskurahat3-Dec-08 21:22
mr_muskurahat3-Dec-08 21:22 
AnswerRe: Can we Get Client Computer Name in ASP.net?? Pin
SeMartens3-Dec-08 22:12
SeMartens3-Dec-08 22:12 
GeneralRe: Can we Get Client Computer Name in ASP.net?? Pin
mr_muskurahat3-Dec-08 22:19
mr_muskurahat3-Dec-08 22:19 
GeneralRe: Can we Get Client Computer Name in ASP.net?? Pin
Abhijit Jana3-Dec-08 22:51
professionalAbhijit Jana3-Dec-08 22:51 
GeneralRe: Can we Get Client Computer Name in ASP.net?? Pin
SeMartens3-Dec-08 23:19
SeMartens3-Dec-08 23:19 
AnswerRe: Can we Get Client Computer Name in ASP.net?? Pin
SachinKumar M3-Dec-08 22:49
SachinKumar M3-Dec-08 22:49 
AnswerRe: [Message Deleted] Pin
Christian Graus4-Dec-08 8:47
protectorChristian Graus4-Dec-08 8:47 
Questionhelp me with the hotel system please... Pin
yueningjun3-Dec-08 20:05
yueningjun3-Dec-08 20:05 
AnswerRe: help me with the hotel system please... Pin
SeMartens3-Dec-08 22:14
SeMartens3-Dec-08 22:14 
GeneralRe: help me with the hotel system please... Pin
yueningjun4-Dec-08 2:42
yueningjun4-Dec-08 2:42 
AnswerRe: help me with the hotel system please... Pin
Ashfield4-Dec-08 1:34
Ashfield4-Dec-08 1:34 
GeneralRe: help me with the hotel system please... Pin
yueningjun4-Dec-08 2:44
yueningjun4-Dec-08 2:44 

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.