Don't get angry! I have googled and I have come across answers - but mainly inconclusive answers.
I understand that taking the argument for new Form1() away (application.run()) is something I should do. But then the code in Form1 wouldn't be executed, would it? I don't quite understand how to go about doing this.
12 4694
Well, you could just put
in the constructor of the startup form.
Just curious, why do you want to hide the form on startup?
Well, you could just put
in the constructor of the startup form.
Just curious, why do you want to hide the form on startup?
Because the form is pointless as it has no content. I am creating an app that allows me to access IP addresses I have and save them to the clipboard (makes things easier for me, I won't go into detail why).
Is there a better way to do this?
Console app, maybe? Depends on what the exact functionality is. Is it something you just run once, and it finishes?
Because the form is pointless as it has no content. I am creating an app that allows me to access IP addresses I have and save them to the clipboard (makes things easier for me, I won't go into detail why).
Is there a better way to do this?
A better way to hide the form? Not really, you can have it automatically minimized and still visible when clicked on.
joedeene
A better way to hide the form? Not really, you can have it automatically minimized and still visible when clicked on.
joedeene
I meant a better way than using forms.
Console app, maybe? Depends on what the exact functionality is. Is it something you just run once, and it finishes?
Well, in the future I'm going to add functionality to it like adding IP's, etc. So I'll just leave it as is.
Because the form is pointless as it has no content. I am creating an app that allows me to access IP addresses I have and save them to the clipboard (makes things easier for me, I won't go into detail why).
Is there a better way to do this?
If you're going to make it completely invisible a notify tray icon might be handy. That way it doesn't have to appear in the start bar at all.
Give it method for double-click that goes something like - this.Visible = !this.Visible;
-
to act like a show/hide toggle.
If you're going to make it completely invisible a notify tray icon might be handy. That way it doesn't have to appear in the start bar at all.
Give it method for double-click that goes something like - this.Visible = !this.Visible;
-
to act like a show/hide toggle.
Aye, I had thought of that already.
Markus.
Its not very intuitive, but actually in the form.Shown() eventhandler is the best place to put the .Visible=false. For me this provides a split second blip, just so you know it happened. (I also use that NotifyIcon). Its fast enough that I never see the window, just a disturbance in pixels.
The Application.Run(new Form1()); call from what I have seen follow this:
Constructor
form_Load()
form_Shown()
I like to use that last one to make sure components have been initialized and whatnot
I feel a great disturbance in the Pixels. As if millions of them suddenly cried out in terror, and were suddenly silenced.
I have found that if you create a Console App, there is no way to remove the command window from popping up during the running of the application.
Instead, choose a "Windows Application" but set the startup object to be "static main()" or "Sub Main", and not a form. Optionally remove the Form objects.
Just override the OnVisibleChanged method and change the visibility of the form there, like this: - protected override void OnVisibleChanged(EventArgs e)
-
{
-
base.OnVisibleChanged(e);
-
this.Visible = false;
-
}
And that's it! Simple and clean.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: StressPuppy |
last post by:
(posted this in VB group but then realized I probably should have posted here)
I have a TabControl with several TabPages. Upon startup, I only want to
show the first TabPage, hiding the rest....
|
by: PMBragg |
last post by:
Thank you in advance for any and all assistance.
Is there a way to hide the Main Access window with tables, queries, forms
etc programmatically?
Michael
|
by: Mark Reed |
last post by:
Hi all,
Access 2002 XP platform.
I am trying to learn a little about programming (I know next to nothing
so far) and have found some code which hides the toolbars. However, this bit
of code is a...
|
by: Amber |
last post by:
The DataGrid allows you to make columns visible or invisible on demand
- even edit and other special columns. This article will show you how
it is done.
Some developers have reported problems...
|
by: Michael Rich |
last post by:
I am writing a program that primaryly runs in the system tray. When the
program starts, I would like to hide the main form and only show the tray
icon.
in the Form Load event I set Me.Visible =...
|
by: Tony Vitonis |
last post by:
Hello. I've written an app that I want to "live" in the system tray.
I want it to start up with just a tray icon showing, and if the user
selects "Settings..." from the icon's context menu, to...
|
by: Johnnie Miami |
last post by:
I'm using VB.Net 2005 beta 2 and have my login form (login.vb) specified as
the startup form. If the user is successful logging in, I call my main form
(main.vb). This all works fine but the...
|
by: Wilfried Mestdagh |
last post by:
Hi,
I have an application with a main form, but I want to hide it as fast as
possible. Seems the only way to not show a single flicker is setting
Opacity = 0 in the constructor, and Visible =...
|
by: BA |
last post by:
Hi there
I am trying to write an "application" in Access 2000, that displays a front
end and allows the user to interact with the database without seeing Access
loaded, in the background, nor on...
|
by: Anthony P. |
last post by:
Hello Everyone,
I'm writing an application that, so far, only has three forms:
frmSplashScreen
frmLicenseScreen
frmConfigurationScreen
Now, frmSplashScreen has a timer that sits it on...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |