473,495 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How Windows Form Invisible

Hello EveryBody....

I want to hide Window Form in C#.net.e.g
I have an application in which there is one form only,when the
application runs,no form will display,but application runs.
Just like Vb6, when we write the statement
"Me.hide"

Mar 16 '07 #1
4 4023
Jawad,

ShowWindow is your friend... use this code:
[System.Runtime.InteropServices.DllImport("user32.d ll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
private void button1_Click(object sender, EventArgs e)
{
ShowInTaskbar = false;

//Hide
ShowWindow(this.Handle, 0);

//Show
//ShowWindow(this.Handle, 1);
}
Best Regards
Marcel
Mar 16 '07 #2

"Jawad Rehman" <ja********@gmail.comwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
Hello EveryBody....

I want to hide Window Form in C#.net.e.g
I have an application in which there is one form only,when the
application runs,no form will display,but application runs.
Just like Vb6, when we write the statement
"Me.hide"
Have you tried this.visible = false; ?
Mar 16 '07 #3
sure, this is the better solution!! :-)
Marcel
Mar 16 '07 #4
VJ
All of the above mentioned work.. Just as FYI for you!!

The "Me" equivalent in C-Sharp is "this", so this.Hide() will work also.

VJ

"Jawad Rehman" <ja********@gmail.comwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
Hello EveryBody....

I want to hide Window Form in C#.net.e.g
I have an application in which there is one form only,when the
application runs,no form will display,but application runs.
Just like Vb6, when we write the statement
"Me.hide"

Mar 17 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
10065
by: Cy | last post by:
I've had good luck with posting in the past, so we'll see how things go this time...:) I have an Access 2000 form. On the form is about 40 objects. I want to set everything to invisible,...
5
14576
by: christopher green | last post by:
I am writing a C# windows application but I don't want to display any forms, effectively I want it to be invisible on the desktop apart from an icon in the system tray. How can I do this? I know I...
10
8283
by: Sylvain Audet | last post by:
Hello! We have a Windows application that is using Crystal Reports reports containing Barcode fonts. Those reports are called through reflection into a Crystal Report Viewer and we need to have...
6
1373
by: John | last post by:
Hi Is there a way to open a form hidden/invisible while it is populating its controls, and then make it visible once it is done? I am using the following code but the form remains visible. ...
11
6938
by: BobAchgill | last post by:
The needed capability: I guess there are two possibilities for making "hot spots" on a Windows Form: The Scenario: I have a world map as the form background. I need clickable hotspots over...
2
1562
by: graeme34 via AccessMonster.com | last post by:
Hi I was wondering if there was any way of making the windows for the currently opened objects in access invisible on the bottom toolbar. Iam using Access 2003 also is it possible to turn of the...
6
2591
by: kaosyeti | last post by:
hey.... i have a duplicate record issue i could use some help with. on a form that has 2 unbound controls, txtboxyear and cboxmonth, together will automatically fill in an invisible txtboxdate...
9
12818
by: mohit.akl | last post by:
Hey guys & gals I am havng trouble modifying the control box. I want to make the maximise button invisible and have minimisise button instead of it. Like this _ X (not like _ o X ) How...
2
1372
by: Robert Dufour | last post by:
I have Form1 and Form2. Form2 has to be loaded in memory so that controls on it can be controlled from Form1, so I declared it in the Form1 declaration section. That works OK. Now I just need to...
4
13041
by: =?Utf-8?B?Y2FzaGRlc2ttYWM=?= | last post by:
I know how to capture a keypress for a windows application, but how would I go about doing it for a windows service? Rather than having a form in focus all the time, I would prefer to have...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6991
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...
0
7160
Oralloy
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,...
1
6878
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...
0
7373
tracyyun
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...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.