-
Recent Posts
-
Recent Comments
Archives
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- February 2014
- January 2014
- December 2013
- October 2013
- August 2013
- June 2013
- December 2012
- September 2012
- July 2012
- June 2012
- November 2011
- May 2011
- April 2011
- February 2011
- December 2010
Categories
- .NET
- 3D
- 3D graphics
- ADO.NET
- algorithms
- animation
- API
- arrays
- attributes
- audio
- books
- C#
- C# programming
- calculations
- challenges
- classes
- clipboard
- coding
- combinatorics
- console
- controls
- cryptography
- curve fitting
- database
- debugging
- dialogs
- directories
- Drag and Drop
- drawing
- drawings
- enums
- Event
- events
- example program
- Excel
- extension methods
- extensions
- files
- finance
- fonts
- formatting
- forms
- fractals
- ftp
- games
- GDI+
- generic
- geometry
- globalization
- graphics
- html
- IDE
- image processing
- inheritance
- interfaces
- internationalization
- internet
- interoperability
- LINQ
- lists
- localization
- mathematics
- memory
- menus
- MessageBox
- methods
- miscellany
- multimedia
- network
- Office
- OOP
- operators
- parsing
- performance
- phone
- PowerPoint
- printers
- printing
- productivity
- programs
- puzzles
- recursion
- reflection
- registry
- regular expressions
- serialization
- settings
- SQL
- stories
- strings
- syntax
- system
- threading
- three-dimensional graphics
- tips
- tools
- transformations
- Uncategorized
- user interface
- variables
- VBA
- web
- Windows Forms programming
- WMI
- Word
- wpf
- XAML
- XML
Meta
Tag Archives: PictureBox
Make a PictureBox act like a button in C#
This program uses several images to make a PictureBox behave like a button. These images give you complete control over how the “button” looks as it is pressed and released. A button should have these behaviors: When the mouse is … Continue reading
Posted in controls, user interface
Tagged button, C#, C# programming, controls, example, example program, PictureBox, PictureBox button, user interface, Windows Forms programming
Leave a comment
Tile a PictureBox in C#
If you set a form’s BackgroundImageLayout property Tile, then the control fills itself with copies of its background image. Strangely the PictureBox control does not have a corresponding Tile property. This example shows one way you can tile images on … Continue reading
Posted in drawing, graphics, image processing
Tagged C#, C# programming, drawing, example, example program, graphics, image processing, picture box, PictureBox, TextureBrush, tile, tile image, Windows Forms programming
Leave a comment
Display thumbnails for image files in a directory in C#
This example shows how to display thumbnails for the images in a directory. It displays a tooltip when the mouse hovers over a picture and it opens the image file in the default application if you double-click on an image. … Continue reading
Make shaped PictureBoxes in C#
This example shows how to use regions to make shaped PictureBoxes. The PNG image format allows you to define transparent pixels. As you might guess, if you draw an image with transparent pixels, those pixels are not drawn and whatever … Continue reading
Posted in algorithms, geometry, graphics, image processing
Tagged AddEllipse, algorithms, C#, C# programming, example, example program, geometry, graphics, GraphicsPath, image processing, images, PictureBox, Region, shaped control, shaped PictureBox, shaped PictureBoxes, transparent images, Windows Forms programming
1 Comment
Use a loop to load pictures in C#
When the form loads, the following code loads pictures into the form’s PictureBoxes. private void Form1_Load(object sender, EventArgs e) { string dirname = Path.GetFullPath( Path.Combine(Application.StartupPath, @”..\..\”)); // Make an array holding the PictureBoxes. PictureBox[] pics = { PictureBox1, PictureBox2, PictureBox3, … Continue reading
Posted in graphics, image processing
Tagged C#, C# programming, example, example program, graphics, image processing, load pictures, PictureBox, PictureBoxes, Windows Forms programming
2 Comments
Zoom and scroll a picture drawn in C#
This program lets you zoom and scroll a picture drawn by the program. The program contains a Panel with AutoScale set to true. Inside the Panel is a PictureBox with SizeMode set to AutoSize. The PictureBox contains a Bitmap that … Continue reading
Posted in drawing, graphics
Tagged AutoScroll, C#, C# programming, draw image, drawing, example, example program, graphics, pan, Panel, PictureBox, scroll, smiley, smiley face, Windows Forms programming, zoom
2 Comments
Drag and drop images in C#
This example shows how to drag and drop images in C#. The example Drag and drop text in C# explains basic drag and drop operations. See that example for the fundamentals. One of the first things you must do before … Continue reading
Use double buffering to prevent flicker in a PictureBox in C#
The example Use double buffering to prevent flicker when drawing in C# shows how to make a form use double-buffering to reduce flicker. Rather than drawing everything on the screen as it is generated, the form draws onto an image … Continue reading