none
vertical scrollbar shows when not needed RRS feed

  • Question

  • i mostly use vb.general and vbexpress forums..

    what i have noticed is that a lot, if not all of my posts contain the vertical scrollbar.. not on this forum though..
    to prove the point, link to this thread and notice how the vertical scrollbar is added to the o.p. ( original post ) and my post as well.
    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/ed2a65ba-8285-40fd-9f82-50e124915e10

    for testing purposes, i copied my post from that thread and will paste it as the following content.. more than likely, there will be no vertical scrollbar, which seems to interact w/the mousewheel when scrolling thru a thread, taking focus away from the main window..

    ( thread content )
    --------------------------
    when i zoom, i donno how to program the picturebox so that the picture does not "jump out" of the box..

    by jump out, if you mean as not being viewable/accessible in certain areas when zoomed, try the following.

    add a panel to your form. in the panel properties , find the AutoScroll and set it to True add your picturebox inside the panel .. this should get scrollbars to your panel, depending on the image size..

    about zooming, see if this helps.

    Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    PictureBox1.SizeMode = PictureBoxSizeMode.Zoom
    Button1.Text = "zoom In"
    Button2.Text = "zoom Out"
    End Sub

    '----- give focus to the picturebox for mouse wheel event to fire
    Private Sub PictureBox1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseHover
    PictureBox1.Select()
    End Sub
    '----- use mouse wheel to zoom in/out
    Private Sub PictureBox1_MouseWheel(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles PictureBox1.MouseWheel
    PictureBox1.Width += CInt(PictureBox1.Width * e.Delta / 1000)
    PictureBox1.Height += CInt(PictureBox1.Height * e.Delta / 1000)
    End Sub

    '----- use buttons to zoom in/out
    '----- zoom in
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    PictureBox1.Width = PictureBox1.Width + 10
    PictureBox1.Height = PictureBox1.Height + 10
    End Sub
    '----- zoom out
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    PictureBox1.Width = PictureBox1.Width - 10
    PictureBox1.Height = PictureBox1.Height - 10
    End Sub

    End Class


    •.' trujade '.•
    •.' trujade '.•
    Thursday, November 5, 2009 12:28 PM

Answers

All replies

  • I believe we have a bug on this. This issue comes when you use the rich text editor, Insert code block feature (pre tags)

    I'll verify with the team.

    Thanks for reporting.
    Forums Test Lead
    Friday, November 6, 2009 8:08 PM
  • don tan, check to see if the characters in my signature might cause this also..
    i have seen threads where other members have the same problem without having anything in their signature.

    my signature html..
    <font
     size
    =3 
    color
    ="#00ccff"
    >•.'</b
    > trujade <b
    >'.•</font
    ></b
    >

    •.' trujade '.•
    Friday, November 6, 2009 8:48 PM