Click here to Skip to main content
15,893,588 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Internet Explorer - Mouse being disabled Pin
Paul Conrad23-Aug-08 18:25
professionalPaul Conrad23-Aug-08 18:25 
GeneralRe: Internet Explorer - Mouse being disabled Pin
Mycroft Holmes23-Aug-08 22:44
professionalMycroft Holmes23-Aug-08 22:44 
GeneralRe: Internet Explorer - Mouse being disabled Pin
Paul Conrad24-Aug-08 8:16
professionalPaul Conrad24-Aug-08 8:16 
GeneralRe: Internet Explorer - Mouse being disabled Pin
Paul Conrad23-Aug-08 8:51
professionalPaul Conrad23-Aug-08 8:51 
QuestionPicturebox transparent Pin
~V~22-Aug-08 1:04
~V~22-Aug-08 1:04 
AnswerRe: Picturebox transparent Pin
Dave Kreskowiak24-Aug-08 17:26
mveDave Kreskowiak24-Aug-08 17:26 
QuestionRich textbox Pin
~V~22-Aug-08 0:59
~V~22-Aug-08 0:59 
AnswerRe: Rich textbox Pin
John Ad22-Aug-08 4:09
John Ad22-Aug-08 4:09 
Hi,

The scrollbars maximum position value changes with the amount of text in the control. Therefore if we could get the value of that we could adjust our height accordingly. So here is a little function that I did up. I haven't tested it extensively yet but as far as I can tell it works just fine for me. It uses the API function GetScrollRange and constant SB_VERT. These should be available in the API Viewer but if not they are in the winuser.h file. Also the scrollbars property may have to be set vertical. Please refer to the below mentioned code:

<br />
Public Sub AdjustHeight(ByVal rtfRichEdit As RichTextLib.RichTextBox, ByVal lpMinHeight As Long)<br />
Dim lpMax As Long    ' Max scroll position<br />
Dim lpMin As Long    ' Min scroll position<br />
	    <br />
' get the scroll range<br />
GetScrollRange rtfRichEdit.hwnd, SB_VERT, lpMin, lpMax<br />
	    <br />
' It may not be necessary to subtract the lpMin value from lpMax because I can't think of anytime that lpMin would be anything but 0... but just in case....<br />
If ((lpMax - lpMin) * Screen.TwipsPerPixelY < lpMinHeight) Then<br />
' This allows you to set a minimum height for your control<br />
rtfRichEdit.Height = lpMinHeight<br />
Else<br />
' Else the control height should be equal to the text height - the max scroll value.<br />
rtfRichEdit.Height = (lpMax - lpMin) * Screen.TwipsPerPixelY<br />
End If<br />
End Sub<br />


I hope this would be helpful.

John Adams
ComponentOne LLC.
www.componentone.com

GeneralRe: Rich textbox Pin
~V~22-Aug-08 21:33
~V~22-Aug-08 21:33 
QuestionHow to call a Gateway using TCP Pin
Exelioindia22-Aug-08 0:39
Exelioindia22-Aug-08 0:39 
GeneralWant to change C# to VB.Net Pin
Golden Jing22-Aug-08 0:10
Golden Jing22-Aug-08 0:10 
GeneralRe: Want to change C# to VB.Net Pin
Tom Deketelaere22-Aug-08 2:34
professionalTom Deketelaere22-Aug-08 2:34 
GeneralRe: Want to change C# to VB.Net [modified] Pin
Golden Jing22-Aug-08 16:33
Golden Jing22-Aug-08 16:33 
GeneralRe: Want to change C# to VB.Net Pin
Tom Deketelaere23-Aug-08 4:35
professionalTom Deketelaere23-Aug-08 4:35 
Questionproblem with picturebox Pin
shee_dee8621-Aug-08 22:10
shee_dee8621-Aug-08 22:10 
AnswerRe: problem with picturebox Pin
prubyholl22-Aug-08 0:05
professionalprubyholl22-Aug-08 0:05 
QuestionUndo the string Pin
neha.lad21-Aug-08 20:45
neha.lad21-Aug-08 20:45 
AnswerRe: Undo the string Pin
Christian Graus21-Aug-08 20:52
protectorChristian Graus21-Aug-08 20:52 
QuestionListVIew Control Pin
shee_dee8621-Aug-08 15:00
shee_dee8621-Aug-08 15:00 
AnswerRe: ListVIew Control Pin
Christian Graus21-Aug-08 15:34
protectorChristian Graus21-Aug-08 15:34 
AnswerRe: ListVIew Control Pin
jzonthemtn21-Aug-08 15:56
jzonthemtn21-Aug-08 15:56 
GeneralRe: ListVIew Control Pin
Mycroft Holmes21-Aug-08 16:38
professionalMycroft Holmes21-Aug-08 16:38 
QuestionNeed someone to write FTP code for me [modified] Pin
ryan66666621-Aug-08 9:03
ryan66666621-Aug-08 9:03 
AnswerRe: Need someone to write FTP code for me Pin
Jon_Boy21-Aug-08 9:17
Jon_Boy21-Aug-08 9:17 
GeneralRe: Need someone to write FTP code for me Pin
astanton197821-Aug-08 9:41
astanton197821-Aug-08 9:41 

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.