i have project in c# and i want to do zoom on the image displayed in the form without using panel or picture box. Please, how its possible to make scrolling in the form using scroll-bar? thanks for all.
Related
I'm trying to create an image matching game in C#.
My idea was to load all the pictures when I create the form. Then, when I launch the program and the form loads, I wanted to turn all those icons to black, hiding the pictures.
I've tried changing icon.BackColor = Color.Black but it doesn't do anything. Setting the visibility to hidden is also not an option.
Is there a way, or do I need to load the pictures individually using image.fromFile... went he form loads?
EDIT : As I was not able to find a way to answer this question, I took another approach. simply loading only black colored pictureboxes, attributing a random assigned name to each of them corresponding to an image. And on click, this image is shown.
As I was not able to find a way to answer this question, I took another approach. Simply loading only black-colored picture boxes, attributing a randomly assigned name to each of them corresponding to an image. And on click, this image is shown.
I am drawing rectangles inside a picture box, based on data that is being pulled from database. Everything works correctly, now my question is, is that possible to select created rectangles? I'd like to be able to select the rectangle and change the data in it.
I guess one of the options will be to along with rectangles display the list of them, and select them from there.
If anyone has any experience with this, I would greatly appreciate a tip.
Thank you,
H
You could, instead of adding directly a rectangle to the form picture box, create a custom windows forms control that holds a rectangle, and add it to the form directly, or to some kind of container.
There you can easily handle the click event of your custom control.
Look here for help on how to do this.
I'm working on a winforms application using C#. I have a form with background image, and a panel on that with transparent background. Some data and controls will be dynamically created on this panel.
This panel has a scroll bar, when I scrolls that background image is splitting and page and data is looking very odd.
Can anyone help me in fixing this issue? All I need that background image should not split on scrolling of the panel...
Thanks in Advance.
Suhasini
This seems to be a limitation on winforms. Check out this post for an explanation.
I´m using WinForms. I want to make a little class, which modifys controls to show it´s working.
I want to draw an overlay over for example a button. It should be a half-transparent gray.
After that i want to draw a ProgressBar on over it (in the center). Similar to This, except using a progress bar.
How can i realize this? I don´t want to set the position of the progressbar, just drawing it on the other one.
How could i do this?
Thanks :)
I have done something similar before.
You need to use Button.DrawToBitmap(Bitmap, Rectangle) to get the image of the button. Then make the Bitmap grayscale (there are multiple algorithms available for this; I have used the last one successfully although probably not originally from this site).
Now, I did this with an entire form instead of a button, but I disabled the form, and then covered the entire form with an image of itself, altered and then covered it with the progress bar (itself in a panel with other controls).
You could just as easily disable the button, cover it with a panel containing the image and the progress bar on top of it.
I am trying to do some charting in my of my C#.NET applications using the .NET Chart Control.
Is there a way to make a popup that shows the exact data point that the cursor is over when it is hovering over the chart?
Check the MapArea class: http://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.maparea.aspx
It'll let you create maps that apply to different areas of the chart and contain their own tooltip.