16 Replies
BlazeBin - tywbbdfnunmk
A tool for sharing your source code with the world!
You must override or subscribe to OnPaint event
huh
You cannot simply draw once because if the window is redrawn the graphics will disappear
https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.onpaint?view=windowsdesktop-8.0
idk if im just stupid but the microsoft sites r so hard for me to understand
ðŸ˜
maybe its just cus im a beginner
It has examples if you scroll
the examples r equally as confusing ðŸ˜
yourcontrol.Paint += YourMethod;
is how you subscribe to an event.
The method will be called when the event has been called / invoked.
The paint event will be called when the control needs a repaint, like when you resize or move the window.but it doesnt get resized or moved
YourMethod
Can be
No matter
You can do this
pictureBox1.Paint += YourMethod;
Which will subscribe to the paint event.
And just follow the code that was posted above which is the example in Microsofts documentation.i dont wanna seem stupid, but what is "YourMethod" here? ðŸ˜
still havent figured out how to fix this ðŸ˜
I took a look at your code further, you are doing an early return if it isn't "cube"
Meaning only "cube" execute
You must think logically
return means it will stop execution and return a value, if the return has been hit, anything after a return will be ignored.
!=
not equals
==
equals
oh my god.
thank you so much
i didnt know thats what the code did
that helps alot
i was just told to use != without further explanation
neither did i know what return did ðŸ˜
BlazeBin - xifyvlcqfimg
A tool for sharing your source code with the world!
done now :3
@Net🅱orking is🎄save me pls thank you so much again