I feel like this thread, along with other GDI threads, isn't getting the attention it deserves.
Maybe it's just me, but I think things like this are really cool.
Maybe it's just me, but I think things like this are really cool.
|
.NET
[VB/C#] Matrix Fall | GDI+ Matrix-Grid-ish Control |
|
Jun 26, 2015 02:14 PM
(This post was last modified: Jun 26, 2015 02:16 PM by Hawk HF.)
(Jun 26, 2015 01:58 PM)SubGenius Wrote: Filthy GDI peasants still using timers and .FillRectangle There was a time a while ago where I made a thread to take requests for GDI controls. https://hackforums.net/showthread.php?ti...id36989738 ![]() Let's not get cocky. ;) (Jun 26, 2015 02:14 PM)Hawk HF Wrote: There was a time a while ago where I made a thread to take requests for GDI controls. 🤫 Hey, that was like 1.5 years ago...
Jun 29, 2015 02:08 PM
(This post was last modified: Feb 27, 2016 04:27 AM by Odus.)
(Jun 24, 2015 07:20 PM)Oliver Sykes Wrote: Odus, trvp did this with numbers as well. Maybe add that? I was actually going to 1up him and allow a custom array of characters, will update OP shortly. (Jun 28, 2015 06:53 PM)AustinPape10101 Wrote: Stupid question but with your example. How would we go about using a combobox to change the color and also change the size of the objects? Not at all. The Colors property is of type color array, so you can change the colors using that. In the demonstration, I used a Dictionary of String & Color() to hold my colors and set the ComboBox's data source to the dictionary. So the keys (string) front the ComboBox items but the value is really your colors (color()). Like so: Code Dim cd As New Dictionary(Of String, Color()) From {When using, I just cast the selected item to a KeyValuePair and set the Colors property to its value: Code MatrixFall1.Colors = DirectCast(ComboBox1.SelectedItem, KeyValuePair(Of String, Color())).ValueFor the objects' size, use the BlockSize property which is of type Size. So in your NumericUpDown ValueChanged event, set the BlockSize to their values: Code MatrixFall1.BlockSize = New Size(Convert.ToInt32(NumericUpDown1.Value), Convert.ToInt32(NumericUpDown2.Value))This was for a demo so I didn't bother changing the control names. I'm glad so many people like it though! |
|
|
| Possibly Related Threads... | |||
| Thread / Author | Replies | Views | Last Post |
| [.NET] by ๖ۣۜMephobiaNov 14, 2025 07:54 PM | 171 | 21,479 |
Nov 14, 2025 07:54 PM Last Post: ProxyLand |
| [.NET] by QuobiAug 6, 2022 02:23 PM | 0 | 407 |
Aug 6, 2022 02:23 PM Last Post: Quobi |
| [.NET] by PolarisGangJun 21, 2022 10:09 AM | 1 | 353 |
Jun 21, 2022 10:09 AM Last Post: gigajew |