1

I want to enable the 'ReaderMode' for paning/scrolling my control in .Net. Closest thing I found was this Win API function http://msdn.microsoft.com/en-us/library/bb775599(VS.85).aspx. However, I'm not sure how to call this one, in the documentation it says,

Note This function is not declared in any public header. To use it, you must access it as ordinal 383 from Comctl32.dll.

I've never called a function that didn't have a name before, can anyone describe how to do this in VB.Net?

Kratz
  • 4,280
  • 3
  • 32
  • 55
  • Is there any working implementation of this anywhere? – Varun Mahajan Sep 22 '11 at 08:51
  • 1
    I added an example on pinvoke.net here: http://pinvoke.net/default.aspx/comctl32/DoReaderMode.html , you just have to Call the `SetReaderMode` function when the user clicks the middle mouse button. – Kratz Sep 22 '11 at 19:51
  • I tried the same. But I am facing a problem. The scrolling is not functioning as intended and the scrolling arrow remains there till I set focus to any other window. – Varun Mahajan Sep 26 '11 at 08:46

1 Answers1

1

Well you should try:

<DllImport("Comctl32.dll", EntryPoint:="#383", _
     CallingConvention:=CallingConvention.StdCall)> _

to specify a function by its ordinal. You should also pass the structure, but I suppose you know how to proceed.

Felice Pollano
  • 32,832
  • 9
  • 75
  • 115
  • Thats what I was looking for. I am having trouble getting it to work though. I posted a new question, http://stackoverflow.com/questions/6270046/error-pinvoking-function. – Kratz Jun 07 '11 at 18:42