Click here to Skip to main content
15,913,854 members
Home / Discussions / C#
   

C#

 
Questionhow do I program Outlook EXPRESS 6 ? Pin
erajsri17-May-05 18:48
erajsri17-May-05 18:48 
AnswerRe: how do I program Outlook EXPRESS 6 ? Pin
Christian Graus17-May-05 19:06
protectorChristian Graus17-May-05 19:06 
GeneralC# type casting or converting Pin
kmm_e17-May-05 18:24
susskmm_e17-May-05 18:24 
GeneralRe: C# type casting or converting Pin
Christian Graus17-May-05 19:04
protectorChristian Graus17-May-05 19:04 
GeneralRe: C# type casting or converting Pin
S. Senthil Kumar17-May-05 19:40
S. Senthil Kumar17-May-05 19:40 
QuestionHow to synchronize client database and server database using C#? Pin
pubududilena17-May-05 18:15
pubududilena17-May-05 18:15 
AnswerRe: How to synchronize client database and server database using C#? Pin
Christian Graus17-May-05 19:05
protectorChristian Graus17-May-05 19:05 
GeneralResizing a richTextBox to fit contents please help Pin
OnlyTaz17-May-05 17:44
OnlyTaz17-May-05 17:44 
I have a richtextbox with the following event handler for the ContentsResized event. The richtextbox Multiline property is set to true and the Scrollbars property is set to none.

The problem I have is when typing in lines of text. The first line dissappears (scrolls) above the top of the richtextbox. Other than that the richtextbox resizes itself accordingly.

Can anyone please help me rectify this problem? Am I using the correct method? Is there a better way to do it?

The code for the event handler:

private void ContentsResized(object sender, System.Windows.Forms.ContentsResizedEventArgs e)
{
// Create a new object that refers to the control that fired the event
RichTextBox richBox = (RichTextBox)sender;
Font stringFont = richBox.Font;
string queString = richBox.Text;
System.Drawing.Graphics objGraphics;
objGraphics = CreateGraphics();
SizeF layoutSize = new SizeF(richBox.Width, ClientRectangle.Height);
SizeF stringSize = new SizeF();
stringSize = objGraphics.MeasureString(queString, stringFont, layoutSize);
richBox.Height = Convert.ToInt32(stringSize.Height);
objGraphics.Dispose();
resetPositions();

}
GeneralC++ dll interoperate with C# Pin
ivyhill17-May-05 15:09
ivyhill17-May-05 15:09 
GeneralRe: C++ dll interoperate with C# Pin
Mervick17-May-05 15:27
Mervick17-May-05 15:27 
GeneralRe: C++ dll interoperate with C# Pin
ivyhill20-May-05 13:19
ivyhill20-May-05 13:19 
GeneralFlushing/closing streams Pin
methodincharge17-May-05 14:04
methodincharge17-May-05 14:04 
GeneralRe: Flushing/closing streams Pin
S. Senthil Kumar17-May-05 19:48
S. Senthil Kumar17-May-05 19:48 
Question?How can I get the I/O Address of a parallel port using WMI? Pin
Member 162442717-May-05 12:26
Member 162442717-May-05 12:26 
Generalmanage a textbox from another form Pin
Sasuko17-May-05 12:20
Sasuko17-May-05 12:20 
GeneralRe: manage a textbox from another form Pin
DavidNohejl17-May-05 13:24
DavidNohejl17-May-05 13:24 
GeneralRe: manage a textbox from another form Pin
Anonymous17-May-05 21:11
Anonymous17-May-05 21:11 
GeneralRe: manage a textbox from another form Pin
MoustafaS18-May-05 2:16
MoustafaS18-May-05 2:16 
Generalfsdffsfsa Pin
Ken Fredrikson17-May-05 11:17
Ken Fredrikson17-May-05 11:17 
GeneralRe: fsdffsfsa Pin
Luis Alonso Ramos17-May-05 19:34
Luis Alonso Ramos17-May-05 19:34 
GeneralRe: fsdffsfsa Pin
MoustafaS18-May-05 2:18
MoustafaS18-May-05 2:18 
GeneralC# debugging Pin
methodincharge17-May-05 10:34
methodincharge17-May-05 10:34 
GeneralRe: C# debugging Pin
Judah Gabriel Himango17-May-05 11:01
sponsorJudah Gabriel Himango17-May-05 11:01 
GeneralRe: C# debugging Pin
Tom Larsen17-May-05 12:23
Tom Larsen17-May-05 12:23 
GeneralRe: C# debugging Pin
leppie17-May-05 13:54
leppie17-May-05 13:54 

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.