By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,696 Members | 1,225 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,696 IT Pros & Developers. It's quick & easy.

Scroll a Panel in code ..

P: n/a

Can anyone help here? I need to scroll a panel in code, because I
don't want to display the scroll bar on screen.

Any suggestions.

N.
Nov 21 '05 #1
Share this Question
Share on Google+
17 Replies


P: n/a
What's in the panel? Controls or a picture? If they are controls you can
move them yourself .

Dim c as Control
For each c in Panel1.Controls
' New Location
c.Location = 'Wherever you want it
Next

If it's a picture just draw part that needs to be seen.

"n. Smith" <ni***@yahoo.dk> wrote in message
news:t7********************************@4ax.com...

Can anyone help here? I need to scroll a panel in code, because I
don't want to display the scroll bar on screen.

Any suggestions.

N.

Nov 21 '05 #2

P: n/a
Hi Smith,

One of our main scrollers is probably still 10 days away, check yourself
these messages about this subject from him.

http://tinyurl.com/3sufx

I hope this helps?

Cor
Nov 21 '05 #3

P: n/a
What an ingenious answer, that's quite impressive really.

Where is Hr H anyways ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Cor Ligthert" <no************@planet.nl> wrote in message
news:eT**************@TK2MSFTNGP09.phx.gbl...
Hi Smith,

One of our main scrollers is probably still 10 days away, check yourself
these messages about this subject from him.

http://tinyurl.com/3sufx

I hope this helps?

Cor

Nov 21 '05 #4

P: n/a
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> schrieb:
Where is Hr H anyways ?


:-?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #5

P: n/a
Welcome Back Herfreid, where have you been ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:uR*************@TK2MSFTNGP11.phx.gbl...
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> schrieb:
Where is Hr H anyways ?


:-?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #6

P: n/a

Thanks for the suggestion. I was hoping there was a way of sending a
scroll value to a hidden scroll bar.

I'll be adding controls to a panel dynamically - kind of plugins for a
toolbar.

but I guess your idea might work as well as anything else.

Then I can maybe track the display of the first and last controls by
checking the bounds of the panel.

Thanks. I'll check it out.

Smith.

On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
<nospam@no_thanks.com> wrote:
What's in the panel? Controls or a picture? If they are controls you can
move them yourself .

Dim c as Control
For each c in Panel1.Controls
' New Location
c.Location = 'Wherever you want it
Next

If it's a picture just draw part that needs to be seen.

"n. Smith" <ni***@yahoo.dk> wrote in message
news:t7********************************@4ax.com.. .

Can anyone help here? I need to scroll a panel in code, because I
don't want to display the scroll bar on screen.

Any suggestions.

N.


Nov 21 '05 #7

P: n/a

Private Declare Function SendMessage Lib "user32.dll" Alias
"SendMessageA" (ByVal hWnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As
Int32, ByVal lParam As Int32) As Int32

Const WM_VSCROLL As Int32 = &H115
Const SB_LINEDOWN As Int32 = 1
Const SB_LINEUP As Int32 = 0

SendMessage(Panel1.Handle, WM_VSCROLL, SB_LINEDOWN, 0)
SendMessage(Panel1.Handle, WM_VSCROLL, SB_LINEUP, 0)
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Nicky Smith" <ni***@yahoo.dk> wrote in message
news:td********************************@4ax.com...

Thanks for the suggestion. I was hoping there was a way of sending a
scroll value to a hidden scroll bar.

I'll be adding controls to a panel dynamically - kind of plugins for a
toolbar.

but I guess your idea might work as well as anything else.

Then I can maybe track the display of the first and last controls by
checking the bounds of the panel.

Thanks. I'll check it out.

Smith.

On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
<nospam@no_thanks.com> wrote:
What's in the panel? Controls or a picture? If they are controls you can
move them yourself .

Dim c as Control
For each c in Panel1.Controls
' New Location
c.Location = 'Wherever you want it
Next

If it's a picture just draw part that needs to be seen.

"n. Smith" <ni***@yahoo.dk> wrote in message
news:t7********************************@4ax.com.. .

Can anyone help here? I need to scroll a panel in code, because I
don't want to display the scroll bar on screen.

Any suggestions.

N.

Nov 21 '05 #8

P: n/a
Terry,

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> schrieb:
Welcome Back Herfreid, where have you been ?


I am currently making my driver's license and thus don't have enough time to
be active in this group. I'll be back in a few days, hopefully...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #9

P: n/a
Good Luck with your licence

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Terry,

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> schrieb:
Welcome Back Herfreid, where have you been ?
I am currently making my driver's license and thus don't have enough time

to be active in this group. I'll be back in a few days, hopefully...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #10

P: n/a
Do what? I don't think you understood his question. He DOES'T want
scrollbars. Your code will only work with Autoscroll = True. Which will show
the scroll bar.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...

Private Declare Function SendMessage Lib "user32.dll" Alias
"SendMessageA" (ByVal hWnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As
Int32, ByVal lParam As Int32) As Int32

Const WM_VSCROLL As Int32 = &H115
Const SB_LINEDOWN As Int32 = 1
Const SB_LINEUP As Int32 = 0

SendMessage(Panel1.Handle, WM_VSCROLL, SB_LINEDOWN, 0)
SendMessage(Panel1.Handle, WM_VSCROLL, SB_LINEUP, 0)
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Nicky Smith" <ni***@yahoo.dk> wrote in message
news:td********************************@4ax.com...

Thanks for the suggestion. I was hoping there was a way of sending a
scroll value to a hidden scroll bar.

I'll be adding controls to a panel dynamically - kind of plugins for a
toolbar.

but I guess your idea might work as well as anything else.

Then I can maybe track the display of the first and last controls by
checking the bounds of the panel.

Thanks. I'll check it out.

Smith.

On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
<nospam@no_thanks.com> wrote:
>What's in the panel? Controls or a picture? If they are controls you can
>move them yourself .
>
>Dim c as Control
>For each c in Panel1.Controls
> ' New Location
> c.Location = 'Wherever you want it
>Next
>
>If it's a picture just draw part that needs to be seen.
>
>
>
>"n. Smith" <ni***@yahoo.dk> wrote in message
>news:t7********************************@4ax.com.. .
>>
>> Can anyone help here? I need to scroll a panel in code, because I
>> don't want to display the scroll bar on screen.
>>
>> Any suggestions.
>>
>> N.
>


Nov 21 '05 #11

P: n/a
OK Dr Screwup, dont get your braids in a twizzle.

I didnt check this with Autoscroll set to true, however this doesent matter
because you can hide the scroll bars by dragging another panel to obscure
the virtical scroll bars and it works just fine.

HTH

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Dr Screwup" <nospam@no_thanks.com> wrote in message
news:10*************@corp.supernews.com...
Do what? I don't think you understood his question. He DOES'T want
scrollbars. Your code will only work with Autoscroll = True. Which will show the scroll bar.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl...

Private Declare Function SendMessage Lib "user32.dll" Alias
"SendMessageA" (ByVal hWnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32

Const WM_VSCROLL As Int32 = &H115
Const SB_LINEDOWN As Int32 = 1
Const SB_LINEUP As Int32 = 0

SendMessage(Panel1.Handle, WM_VSCROLL, SB_LINEDOWN, 0)
SendMessage(Panel1.Handle, WM_VSCROLL, SB_LINEUP, 0)
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Nicky Smith" <ni***@yahoo.dk> wrote in message
news:td********************************@4ax.com...

Thanks for the suggestion. I was hoping there was a way of sending a
scroll value to a hidden scroll bar.

I'll be adding controls to a panel dynamically - kind of plugins for a
toolbar.

but I guess your idea might work as well as anything else.

Then I can maybe track the display of the first and last controls by
checking the bounds of the panel.

Thanks. I'll check it out.

Smith.

On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
<nospam@no_thanks.com> wrote:

>What's in the panel? Controls or a picture? If they are controls you can >move them yourself .
>
>Dim c as Control
>For each c in Panel1.Controls
> ' New Location
> c.Location = 'Wherever you want it
>Next
>
>If it's a picture just draw part that needs to be seen.
>
>
>
>"n. Smith" <ni***@yahoo.dk> wrote in message
>news:t7********************************@4ax.com.. .
>>
>> Can anyone help here? I need to scroll a panel in code, because I
>> don't want to display the scroll bar on screen.
>>
>> Any suggestions.
>>
>> N.
>



Nov 21 '05 #12

P: n/a
Whatever.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
OK Dr Screwup, dont get your braids in a twizzle.

I didnt check this with Autoscroll set to true, however this doesent
matter
because you can hide the scroll bars by dragging another panel to obscure
the virtical scroll bars and it works just fine.

HTH

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Dr Screwup" <nospam@no_thanks.com> wrote in message
news:10*************@corp.supernews.com...
Do what? I don't think you understood his question. He DOES'T want
scrollbars. Your code will only work with Autoscroll = True. Which will

show
the scroll bar.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in

message
news:%2****************@TK2MSFTNGP15.phx.gbl...
>
> Private Declare Function SendMessage Lib "user32.dll" Alias
> "SendMessageA" (ByVal hWnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As > Int32, ByVal lParam As Int32) As Int32
>
> Const WM_VSCROLL As Int32 = &H115
> Const SB_LINEDOWN As Int32 = 1
> Const SB_LINEUP As Int32 = 0
>
> SendMessage(Panel1.Handle, WM_VSCROLL, SB_LINEDOWN, 0)
> SendMessage(Panel1.Handle, WM_VSCROLL, SB_LINEUP, 0)
>
>
> --
>
> OHM ( Terry Burns )
> . . . One-Handed-Man . . .
> If U Need My Email ,Ask Me
>
> Time flies when you don't know what you're doing
>
> "Nicky Smith" <ni***@yahoo.dk> wrote in message
> news:td********************************@4ax.com...
>>
>> Thanks for the suggestion. I was hoping there was a way of sending a
>> scroll value to a hidden scroll bar.
>>
>> I'll be adding controls to a panel dynamically - kind of plugins for a
>> toolbar.
>>
>> but I guess your idea might work as well as anything else.
>>
>> Then I can maybe track the display of the first and last controls by
>> checking the bounds of the panel.
>>
>> Thanks. I'll check it out.
>>
>> Smith.
>>
>>
>>
>>
>>
>> On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
>> <nospam@no_thanks.com> wrote:
>>
>> >What's in the panel? Controls or a picture? If they are controls you can >> >move them yourself .
>> >
>> >Dim c as Control
>> >For each c in Panel1.Controls
>> > ' New Location
>> > c.Location = 'Wherever you want it
>> >Next
>> >
>> >If it's a picture just draw part that needs to be seen.
>> >
>> >
>> >
>> >"n. Smith" <ni***@yahoo.dk> wrote in message
>> >news:t7********************************@4ax.com.. .
>> >>
>> >> Can anyone help here? I need to scroll a panel in code, because I
>> >> don't want to display the scroll bar on screen.
>> >>
>> >> Any suggestions.
>> >>
>> >> N.
>> >
>>
>
>



Nov 21 '05 #13

P: n/a
Dear Dr.

Tried it, and it worked like a charm.

Thx.

Smith.

On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
<nospam@no_thanks.com> wrote:
What's in the panel? Controls or a picture? If they are controls you can
move them yourself .

Dim c as Control
For each c in Panel1.Controls
' New Location
c.Location = 'Wherever you want it
Next

If it's a picture just draw part that needs to be seen.

"n. Smith" <ni***@yahoo.dk> wrote in message
news:t7********************************@4ax.com.. .

Can anyone help here? I need to scroll a panel in code, because I
don't want to display the scroll bar on screen.

Any suggestions.

N.


Nov 21 '05 #14

P: n/a
Nick,

Glad I could help. I was wondering if I understood your question because so
many people were offering you some silly suggestions like using the APIs to
send messages. Sometimes the simplest answer is the best answer.

Good luck on your project.
"Nicky Smith" <ni***@yahoo.dk> wrote in message
news:0o********************************@4ax.com...
Dear Dr.

Tried it, and it worked like a charm.

Thx.

Smith.

On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
<nospam@no_thanks.com> wrote:
What's in the panel? Controls or a picture? If they are controls you can
move them yourself .

Dim c as Control
For each c in Panel1.Controls
' New Location
c.Location = 'Wherever you want it
Next

If it's a picture just draw part that needs to be seen.

"n. Smith" <ni***@yahoo.dk> wrote in message
news:t7********************************@4ax.com. ..

Can anyone help here? I need to scroll a panel in code, because I
don't want to display the scroll bar on screen.

Any suggestions.

N.

Nov 21 '05 #15

P: n/a
My solution worked exactly as you originally requested

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Nicky Smith" <ni***@yahoo.dk> wrote in message
news:0o********************************@4ax.com...
Dear Dr.

Tried it, and it worked like a charm.

Thx.

Smith.

On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
<nospam@no_thanks.com> wrote:
What's in the panel? Controls or a picture? If they are controls you can
move them yourself .

Dim c as Control
For each c in Panel1.Controls
' New Location
c.Location = 'Wherever you want it
Next

If it's a picture just draw part that needs to be seen.

"n. Smith" <ni***@yahoo.dk> wrote in message
news:t7********************************@4ax.com.. .

Can anyone help here? I need to scroll a panel in code, because I
don't want to display the scroll bar on screen.

Any suggestions.

N.

Nov 21 '05 #16

P: n/a
> My solution worked exactly as you originally requested

LOL! Duh! Panel1.AutoScrollPosition = New Point(3, 3) does the same
thing.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:eg**************@tk2msftngp13.phx.gbl...

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Nicky Smith" <ni***@yahoo.dk> wrote in message
news:0o********************************@4ax.com...
Dear Dr.

Tried it, and it worked like a charm.

Thx.

Smith.

On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
<nospam@no_thanks.com> wrote:
>What's in the panel? Controls or a picture? If they are controls you can
>move them yourself .
>
>Dim c as Control
>For each c in Panel1.Controls
> ' New Location
> c.Location = 'Wherever you want it
>Next
>
>If it's a picture just draw part that needs to be seen.
>
>
>
>"n. Smith" <ni***@yahoo.dk> wrote in message
>news:t7********************************@4ax.com.. .
>>
>> Can anyone help here? I need to scroll a panel in code, because I
>> don't want to display the scroll bar on screen.
>>
>> Any suggestions.
>>
>> N.
>


Nov 21 '05 #17

P: n/a
Christ your right, well knock me down with a feather; how long have you been
searching for that then cuz you didnt mention it yesterday ;-)

I'll remember that, thanks Dr Screwup

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Dr Screwup" <nospam@no_thanks.com> wrote in message
news:10************@corp.supernews.com...
My solution worked exactly as you originally requested
LOL! Duh! Panel1.AutoScrollPosition = New Point(3, 3) does the same
thing.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in

message news:eg**************@tk2msftngp13.phx.gbl...

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Nicky Smith" <ni***@yahoo.dk> wrote in message
news:0o********************************@4ax.com...
Dear Dr.

Tried it, and it worked like a charm.

Thx.

Smith.

On Mon, 27 Sep 2004 07:34:18 -0500, "Dr Screwup"
<nospam@no_thanks.com> wrote:

>What's in the panel? Controls or a picture? If they are controls you can >move them yourself .
>
>Dim c as Control
>For each c in Panel1.Controls
> ' New Location
> c.Location = 'Wherever you want it
>Next
>
>If it's a picture just draw part that needs to be seen.
>
>
>
>"n. Smith" <ni***@yahoo.dk> wrote in message
>news:t7********************************@4ax.com.. .
>>
>> Can anyone help here? I need to scroll a panel in code, because I
>> don't want to display the scroll bar on screen.
>>
>> Any suggestions.
>>
>> N.
>



Nov 21 '05 #18

This discussion thread is closed

Replies have been disabled for this discussion.