On Form1_Load(), I try Me.Hide but it doesn't work. Can anyone tell me why?
This application has a tray icon and I want it to start hidden, why doesn't Me.Hide works on the form load event? If I create a button and add Me.Hide() to the button private sub, it works. Heck, if I had a timer with 1ms interval and add Me.Hide() to the timer private sub it works too. This is currently my way of hiding it; I disable the timer right after hiding though.
But I always see the form for a small fraction of a second and I don't want to....
Go one step further. Use Windows DiskCleaner (the advanced version)
Open an elevated command prompt:
Click Start, type cmd, hold CTRL+SHIFT+ENTER. An elevated prompt should open. In this prompt copy/paste press Enter.
cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535
Disk Cleaner should be opened with a few more options. Check all the boxes and click OK. It may take a while, let it finish. You should see a gain in space on the scale of GBs.
Question
ProclaimDragon
Hi,
On Form1_Load(), I try Me.Hide but it doesn't work. Can anyone tell me why?
This application has a tray icon and I want it to start hidden, why doesn't Me.Hide works on the form load event? If I create a button and add Me.Hide() to the button private sub, it works. Heck, if I had a timer with 1ms interval and add Me.Hide() to the timer private sub it works too. This is currently my way of hiding it; I disable the timer right after hiding though.
But I always see the form for a small fraction of a second and I don't want to....
Link to comment
https://www.neowin.net/forum/topic/216462-vb-net-cant-hide-main-form-on-load-event/Share on other sites
6 answers to this question
Recommended Posts