473,549 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ 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 4034
Jawad,

ShowWindow is your friend... use this code:
[System.Runtime. InteropServices .DllImport("use r32.dll")]
static extern bool ShowWindow(IntP tr hWnd, int nCmdShow);
private void button1_Click(o bject 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********@gma il.comwrote in message
news:11******** **************@ y80g2000hsf.goo glegroups.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********@gma il.comwrote in message
news:11******** **************@ y80g2000hsf.goo glegroups.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
10082
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, except a drop down box. Once the user selects from the pull down menu, I have code that picks the applicable fields to be visible. Thus, if a user...
5
14586
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 can start an application minimised but I don't want to display any forms. Thanks for your assistance. *** Sent via Developersdex...
10
8293
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 the Barcode fonts to be self-installed at runtime whenever a report is viewed. I tried the following steps: Public Shared Sub InstallFonts()
6
1379
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. cform = New frmClients cform.Visible = False ' this does not seem to make form hidden (not visible) cform.TopLevel = False
11
6959
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 portions of the world map that also have tool tip messages. The Possibilities?:
2
1572
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 right click facility on the mouse to prevent the user from getting into the 'background' of Access?? Thank you. -- Message posted via...
6
2596
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 that is bound to a table and has no duplicates allowed. the problem is that there are 30 or so other controls here to be filled in and if the user...
9
12826
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 to do this... and eventually i want to modify the control box in the form of ? _ X ... I.e. adding a new button to control box. I need to detect the...
2
1376
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 make form2 visible once and make it invisible again, although it should be staying active in memory. If I have a global boolean g_form2Shown then to...
4
13051
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 something running in the background. There are option such as having the form invisible (opacity set to zero) and settings it's location as -200, -200...
0
7541
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7464
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7734
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
5385
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3512
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3493
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1960
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1074
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
781
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.