Click here to Skip to main content
15,918,808 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: Getting TopMost MDIChild Pin
Luis Alonso Ramos30-Mar-08 15:39
Luis Alonso Ramos30-Mar-08 15:39 
GeneralMessageBox Popup in Windows Service Pin
vijay_8321-Mar-08 21:37
vijay_8321-Mar-08 21:37 
GeneralRe: MessageBox Popup in Windows Service Pin
Eduard Keilholz25-Mar-08 21:12
Eduard Keilholz25-Mar-08 21:12 
GeneralRe: MessageBox Popup in Windows Service Pin
Herman<T>.Instance1-Apr-08 23:40
Herman<T>.Instance1-Apr-08 23:40 
GeneralRaising Events from IF hosted winfrom control to container(aspx) page Pin
Kodanda Pani21-Mar-08 6:22
Kodanda Pani21-Mar-08 6:22 
GeneralRe: Raising Events from IF hosted winfrom control to container(aspx) page Pin
N a v a n e e t h21-Mar-08 20:24
N a v a n e e t h21-Mar-08 20:24 
GeneralRe: Raising Events from IF hosted winfrom control to container(aspx) page Pin
Pete O'Hanlon22-Mar-08 9:19
mvePete O'Hanlon22-Mar-08 9:19 
GeneralScrollin bug Pin
dem21919-Mar-08 9:48
dem21919-Mar-08 9:48 
I am trying to get the position of the scoll bar in a rich text box.

I am calling the following method:

[DllImport("user32")] public static extern int GetScrollPos(IntPtr hwnd, int nBar) ;

Like this:

public const int SB_VERT = 1;
int pos = GetScrollPos(rtb.Handle, SB_VERT);

where rtb is a RichTextBox

If the form containing the rich text box does not have focus, this gives me the scroll position accurately. If the form does have focus, it gives me an inaccurate result. For example, if I scroll to the top of the rtb, and the form does not have focus, this returns 0.

But if the form has focus, this always returns a value which indicates the rtb is scrolled to the bottom (regardless of where the scroll actually is).

Anyone know why this happens, or how to work around it?

Thanks
GeneralC# --&gt; J# Pin
mr.me19-Mar-08 6:57
mr.me19-Mar-08 6:57 
GeneralRe: C# --&gt; J# Pin
led mike19-Mar-08 7:04
led mike19-Mar-08 7:04 
GeneralRe: C# --&gt; J# Pin
Dave Kreskowiak19-Mar-08 10:29
mveDave Kreskowiak19-Mar-08 10:29 
GeneralRe: C# --&gt; J# Pin
Paul Conrad20-Mar-08 6:04
professionalPaul Conrad20-Mar-08 6:04 
GeneralRe: C# --&gt; J# Pin
Luc Pattyn21-Mar-08 7:20
sitebuilderLuc Pattyn21-Mar-08 7:20 
Generalhoe to search particular file in folder under drives Pin
premsuri19-Mar-08 1:53
premsuri19-Mar-08 1:53 
GeneralRe: hoe to search particular file in folder under drives Pin
Pete O'Hanlon19-Mar-08 3:08
mvePete O'Hanlon19-Mar-08 3:08 
GeneralRe: hoe to search particular file in folder under drives Pin
Eduard Keilholz25-Mar-08 21:16
Eduard Keilholz25-Mar-08 21:16 
GeneralMake Money From My Computer Program Pin
hosdfiadsf18-Mar-08 16:40
hosdfiadsf18-Mar-08 16:40 
GeneralRe: Make Money From My Computer Program Pin
Christian Graus18-Mar-08 20:36
protectorChristian Graus18-Mar-08 20:36 
GeneralRe: Make Money From My Computer Program Pin
Brady Kelly21-Mar-08 23:50
Brady Kelly21-Mar-08 23:50 
GeneralRe: Make Money From My Computer Program Pin
hosdfiadsf22-Mar-08 3:56
hosdfiadsf22-Mar-08 3:56 
GeneralRe: Make Money From My Computer Program Pin
Luis Alonso Ramos30-Mar-08 15:44
Luis Alonso Ramos30-Mar-08 15:44 
QuestionFrom Form to DLL - How Do I Package Resource Icons and Files? Pin
Tom91118-Mar-08 7:19
Tom91118-Mar-08 7:19 
GeneralRe: From Form to DLL - How Do I Package Resource Icons and Files? Pin
Aurelius166420-Mar-08 5:38
Aurelius166420-Mar-08 5:38 
QuestionHow to populate datas in a Datagridview comboboxcolumn? Pin
kssknov18-Mar-08 2:37
kssknov18-Mar-08 2:37 
GeneralRe: How to populate datas in a Datagridview comboboxcolumn? Pin
Herman<T>.Instance1-Apr-08 23:42
Herman<T>.Instance1-Apr-08 23:42 

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.