hide form scrollbar in C# [closed] - c#

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Maybe this isn't a new question; but unfortunately I'm unable to solve my problem.
My Form needs to show scrollbar, but I don't want use scrollbar all the time.
I want to know how to show the ScrollBar only in specific conditions.
For example:
I want to set specific Form Position without using / showing the scrollbar when form is out of working area boundaries.
Thus my question: How to move Form Horizontally without using scrollbar?
Update: It seems still my question is unclear.
Please find bellow the following conditions:
Form requires ScrollBar functionality when the form border is smaller than the page.
Show ScrollBar when the Form is out of Working Area boundaries.
I wait for your useful replies!

You can set the AutoScroll to false and then update the scroll values programmatically:
this.HorizontalScroll.Value = this.HorizontalScroll.Maximum;

Related

How can i disable moving between Tab Control tabs by mouse in c# [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to move between tab on tab control using Navigation Buttons , and i don't want the user try to move between tabs using mouse , How can i do that ??
This doesn't really make a lot of sense.
Short of disabling the mouse cursor entirely, I don't know how you would possibly achieve this. Even if there were a way of "ignoring" mouse clicks on the tab control tabs, that would be incredibly bad UI. As far as the user would be concerned, your application would be pathetically broken—"I try to do the same thing I do in all other apps, but this one just sits here like it's dead. Stupid buggy program."
So that's a non-starter. If the goal here is to force the user to navigate through the tabs in a particular order (like a wizard), then I recommend just hiding the tabs altogether. Then the user won't be tempted to click on them or switch between them in an arbitrary order. You will have to control tab switching through code, by setting the SelectedTab or SelectedIndex property. This will also give you a place to run any additional code that you want when switching tabs.
You'll find instructions on how to hide the tabs on the TabControl in Hans's answer here.

stretch image in windows store app [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to implement stretch image function, user can drag each corner to stretch and pinch the image to make it smaller or bigger. Anyone can help? I use C# and xaml.
Basically you have to write the following on yourself:
Add the Image in XAML
Add four squares
position the squares to the edge
add a mousedown handler to the squares and save the square on mousedown to a property
add a mousemove handler to your application, check if the property is filled
resize the image by calculating the image size. For example for the right-bottom corner (pseudo code):
image.width=square.offset.x-image.offset.x
image.height=square.offset.y-image.offset.y
Add a mouseup handler to your application and release the square-property.
This is very basic. There are lot of good examples out there, mostly for WPF, but you can reuse it for Windows 8. This is a good one, but for image cropping.

How to display text or anything without form frames? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
For example, on the second monitor I want to display the text I wrote in the textbox, but without form frames, just black background and white letters.
You can make a Form transparent (I assume that you are working with WinForms).
Set the BackColor of the form to some color that will be used as transparent color (e.g. Color.Red).
Set the TransparencyKey to the same color.
Set FormBoderStyle to None
Or you can give any color to the background without making it transparent. Just don't define the TransparencyKey. The important part is setting the FormBoderStyle to None. This not only hides the border but the title bar together with the form icon and the control box.
Then place a Label on that form with the desired text. That's it.

create a wizard [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to implement a wizard using winforms and VS 2010.
I've got this tutorial, but as I'm new to Visual Studio and C# I don't really understand it.
Could someone help me out?
My main problem is that I don't know where to put the listings in this tutorial?
Should I put all the code in one class? Or in one form.cs? How is it divided?
greetz
Bl!tz
It looks as if you will need to create a UserControl (right-click your project, New... User Control) for each page of the Wizard, and you will need to implement IWizardPage on your UserControl. Than you have your WizardHost which is a single Form.
So to answer your question you will have one Form and a UserControl for each page of the Wizard.
This is a simple example, use groupboxes, and set them all on visibility hidden, but only show the first one, then when u click the button u set the visibility of the first groupbox to hidden, and the set the visibility of the 2e one to show.
a groupbox can contain controls, so that u wont have to show or hide individual controls

Difference between Grid and GridSplitter [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am new to wpf.I know well to use Grid control.But i don't know where should i use GridSplitter,the use of GridSplitter and why should i use it.Please tell me the difference.
A grid is used for layout. For example, you can say your grid has 2 columns and 2 rows with Width="*", then they will size automatically to take up a quarter of the space.
Now if you want to resize them (like with the navigation pane on the left of windows explorer, you can drag the border to change its width), you can use a GridSplitter. That enables you to grab the edge between the grid's columns (or rows) and resize them.
The grey line that you can drag is a GridSplitter:

Categories