I am using Visual basic 2010 for coding. I have develop the code on desktop. Where I have adjusted form as per my desktop screen. I am going to run the application on Laptop. When I run the app the screen is not fitting to Laptop screen. SO I deciede to include vertical scroll. If moved up and down we can see all the parameter.
How can I do it?
I have added image for reference.
The scroll bar(s) should be inside the individual TabPages. You should set the Anchor and/or Dock properties of the TabControl so that it resizes with the form and set the AutoScroll property of each TabPage to True if you want it to display scroll bars if and when any of its child controls are outside its viewable area.
Related
I have a panel which has a vertical scroll bar on it. Inside the panel are several DataGridViews. When I use the application on a touch screen such as the Lenovo ThinkPad, I'd like to be able to move the whole panel up or down by sliding my finger up and down the screen. However, this doesn't happen. If I touch the screen, I can select an individual row on a data grid. Or if I touch the slider on the side, I can make the screen move up and down just as if I was using a mouse, but apart from that, I can't make the panel move.
If I use my browser, and the page is larger than the screen, then I can use my finger to slide the entire page up and down. I realize that this is a browser and not a Windows forms application, but that is the functionality that I need.
My app is a Windows Forms application.
Thanks.
You could make a new form, turn AutoScroll on there and stretch it to the width of your choice.
Then in your other form your simply add it as control in your panel.
Example (Form1 = Main Form, Form2 = AutoScroll Form, Panel1 = Your Panel):
Sub Form1_Load(...) Handles MyBase.Load
Dim ScrollFrm As New Form2()
ScrollFrm.TopLevel = False
Panel1.Controls.Add(ScrollFrm)
ScrollFrm.Dock = DockStyle.Fill
ScrollFrm.Show()
End Sub
Hope that helps :)
I ended up using this link to put my answer together. I had to make a few slight modifications to suit my needs, but the basic idea was the same.
how to get smartphone like scrolling for a winforms touchscreen app ( scrolling panel )
I have a form with an A4 image in the background (a standard questionaire). on that form i have textfields to fill. But if we scroll to the bottom of the form, the textfields scroll, but the background does not. How to fix the background to stick with the texfields ? VB.NET visual studio 2010.
Place a panel on the Form.
Place all your controls inside the panel.
Set the Background of the panel to your image.
Size your panel so that it is large enough to hold all the controls.
Place the panel at 0,0
Set the Form to AutoScroll
I am trying to create an animation to a control.
So think of the animation and control of a now playing page on most touch screen devices. You see the control (album photo) and swipe either way and get it to slide off the screen and then the next control (album photo) slides on in its place.
I am not asking for you to code me this, but I am having trouble wrapping my head around a way that this could be done.
The control content is always changing, when you swipe one way, an image is removed from the view and then the next is added.
What you need is FlipView control which can get you the interface you described.
Here are some references:
Quickstart: Adding FlipView controls (XAML)
XAML FlipView control sample
I am developing a Outlook 2013 Addin. I have a Panel which I align to bottom of the user control programatically by:
botpanel.Location=New Point(0,Me.height-botpanel.Height-5)
This works fine when the Menu Ribbon is not pinned.But When the Ribbon is pinned the botpanel goes beyond the visible screen.
Need help on this.
Instead of setting the panel location programatically, set the Dock property on the Panel to Bottom at design time. This way the panel will be automatically positioned when the UserControl is resized (due to the Ribbon being pinned \ unpinned).
The problem was actually caused by the panel above it.
I re-initiated the above panel as
abv_panel.location=New Point(0,0)
So that re-initiating this location of panel on User-Control Resize event will bring back everything normal.
I have a Windows Forms VB.NET application, with a panel that contains a few other controls.
I set the panel's AutoScroll property to True, and that seems to appropriately apply the scroll bars when they are needed. The issue is that a user must scroll all the way to the right to access the vertical scroll bar. Is there a way to always show the vertical scrollbar no matter where the user is scrolled horizontally?
EDIT
I guess the main problem I have here is that I have a DataGridView inside of a panel. I want the panel to do the vertical scrolling, and not the DataGridView. Why is it when I turn off vertical scrollbars on the datagridview and have autoscroll on the panel, a vertical scroll bar is never shown?
You could add a VScrollBar on the right side of the panel and set code behind to move the panel scroll up and down.
or
A better option may be to switch your panel to a FlowLayoutPanel which provides quite a bit of control over the scroll handles both vertical and horizontal.
Check out MSDN and see how to use all of the properties of the FLP: