Forum > General >

A custom "Close Button" that only closes a single window, and not the whole program?

Seniti_X

- Pastebin.com

Posts: 185

Threads: 29

Joined: Feb, 2020

Reputation: -20

Posted

https://imgur.com/a/I3Sw90a

 

How do I make it so a custom close button only closes my script hub window, and not the main window as well? I don't want to use the default windows close button.

 

Help pls and ty

I FIGURED IT OUT!

But...

  |

  |

  |

 V

Additionally, do any of you guys happen to know how I can make opening and closing animations for both my main form and my script hub?

I would deeply appreciate it!

  • 0

OWNER OF GAYSPLOIT X

Download

Also this person is a skid: https://www.roblox.com/users/671430987/profile

trollhackerdude

LUA and C# programmer

Posts: 118

Threads: 33

Joined: Jun, 2018

Reputation: 1

Replied

I don't know how to reprogram a custom close button, but if you can design your own close button you can use this code.

 

        // replace button with the name of your button, for example if the name was close it would be close_Click

        private void button_Click(object sender, EventArgs e)

        {

            this.Hide();

            this.Close();

        }

 

EDIT: Also this would fit better in the C# section (if you're using C#)

  • 0

I know LUA and some C#

 

and i own synapse x noob

jex

yes

Posts: 1791

Threads: 110

Joined: Nov, 2019

Reputation: 13

Replied

this.Hide();

  • 0

yes

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )