Ask a questionAsk a question
 

Questionvertical scrollbar shows when not needed

  • Thursday, November 05, 2009 12:28 PM•.trujade.• Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    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<br/>
    <br/>
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br/>
            PictureBox1.SizeMode = PictureBoxSizeMode.Zoom<br/>
            Button1.Text = "zoom In"<br/>
            Button2.Text = "zoom Out"<br/>
        End Sub<br/>
    <br/>
        '----- give focus to the picturebox for mouse wheel event to fire<br/>
        Private Sub PictureBox1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseHover<br/>
            PictureBox1.Select()<br/>
        End Sub<br/>
        '-----  use mouse wheel to zoom in/out<br/>
        Private Sub PictureBox1_MouseWheel(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles PictureBox1.MouseWheel<br/>
            PictureBox1.Width += CInt(PictureBox1.Width * e.Delta / 1000)<br/>
            PictureBox1.Height += CInt(PictureBox1.Height * e.Delta / 1000)<br/>
        End Sub<br/>
    <br/>
        '-----  use buttons to zoom in/out<br/>
        '-----  zoom in<br/>
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br/>
           PictureBox1.Width = PictureBox1.Width + 10<br/>
            PictureBox1.Height = PictureBox1.Height + 10<br/>
        End Sub<br/>
        '-----  zoom out<br/>
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click<br/>
            PictureBox1.Width = PictureBox1.Width - 10<br/>
            PictureBox1.Height = PictureBox1.Height - 10<br/>
        End Sub<br/>
    <br/>
    End Class<br/>
    
    


    •.' trujade '.•
    •.' trujade '.•

All Replies

  • Friday, November 06, 2009 8:08 PMDon TanMSFT, AdministratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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 06, 2009 8:48 PM•.trujade.• Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    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 '.•