SMTP config window popping up

Greetings everyone.
The forum helped me complete a smtp mailer.
Recently, I separate the basic SMTP setting( Server, User, password, port, etc) giving it a “SMTP Config Window”.

When I run the mailer, at the end of the program
.
SendMailSocket.Messages.Append(mail)
SendMailSocket.SendMail

the separate window with the SMTP setting would pop up and stay.
Currently I’m stopping it by “EmailConfigWindow.Hide”

Is there any reason why it is popping up?

Thanks.

Most likely cause is ImplicitInstance being set on the config window. It you close the window and then refer to any of it’s properties, it will automatically open again.

I have a separate button that opens the config window but if I were to turn off the Implicit Instance, I will get an error when compiling.
How do I open a window that has it’s Implicit Instance turned off?

Thanks

Add a property s as EmailConfigWindow to your main window or main class. Then do

s = new EmailConfigWindow

when you need the window and

s.hide

to hide the window.

Tried the option,
Manually opening it is not a problem.
It is still opening the window at the end of sendmail.
Still have to manually hide it.

So even if we turn the implicit Instance to “off”
We still have to manually hide it…meaning it is popping up automatically once a content in its window is being referred to.

Implicit Instance button no effect?

Thanks

Turn off “Implicit Instance” in the IDE. Then you can’t refer to the window accidentally.