I'm creating a custom control panel to replace the top border control panel/box. I start with a panel that docks at top of form, and add 3 pictureboxes, with light and dark colors, for when mouse enters. (optional 4th for docking options) My problem is the red_pb ("Form Closing" picturebox) I can't seem to conjure up ANY code that will allow me to control a future parent form. This will also be a problem in the SizeMode-Normal/SizeMode-Maximized (yellow_pb), as well as the Minimize Form control (green_pb). The entire reason for the existance of the custom panel is to control the parent form's geometrics. (And to give my own creations a noticable identifier. :-) )
I have an event handler: Private Sub red_pbClick(sender As Object, e As EventArgs) to handle the click event.
I have tried :
ParentForm - nope...
Parent.Form - nope...
Form1 - nope...
Form = Form1 - nope...
I have no idea how to control a form that does not yet exist.
Any Ideas?
P.S. I did use AddHandler/AddressOf in the Public Sub New() - That part is a go.
For those who don't know of me, I am a hobbyist. I have no formal training, just books, and experimentation...