473,396 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

WindowState.Minimized vs. Me.Hide

Using the below code, If I use Me.WindowState=Minimized the program runs
fine, but you have the taskbar showing the program running.

If I use Me.Hide instead, the program immediately exits.

If UCase(Microsoft.VisualBasic.Command) = "/SILENT" Then
Me.WindowState = FormWindowState.Minimized
silent = True
For i As Integer = 0 To clbPCs.Items.Count - 1
clbPCs.SetItemChecked(i, True)
Next
Button1.PerformClick()
Application.Exit()
End If

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
2 7611
Try Me.Visible = False (just an idea), rather than Me.Hide ().

"Terry Olsen" <to******@hotmail.com> wrote in message
news:O7**************@tk2msftngp13.phx.gbl...
Using the below code, If I use Me.WindowState=Minimized the program runs
fine, but you have the taskbar showing the program running.

If I use Me.Hide instead, the program immediately exits.

If UCase(Microsoft.VisualBasic.Command) = "/SILENT" Then
Me.WindowState = FormWindowState.Minimized
silent = True
For i As Integer = 0 To clbPCs.Items.Count - 1
clbPCs.SetItemChecked(i, True)
Next
Button1.PerformClick()
Application.Exit()
End If

*** Sent via Developersdex http://www.developersdex.com ***

Nov 21 '05 #2
"Terry Olsen" <to******@hotmail.com> schrieb:
Using the below code, If I use Me.WindowState=Minimized the program runs
fine, but you have the taskbar showing the program running.

If I use Me.Hide instead, the program immediately exits.

If UCase(Microsoft.VisualBasic.Command) = "/SILENT" Then
Me.WindowState = FormWindowState.Minimized
silent = True
For i As Integer = 0 To clbPCs.Items.Count - 1
clbPCs.SetItemChecked(i, True)
Next
Button1.PerformClick()
Application.Exit()
End If


You are calling 'Application.Exit', and thus your application exits. In
addition to that, the form is invisible, so 'Button1.PerformClick' won't
raise the button's 'Click' event.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

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

Similar topics

1
by: Jan H | last post by:
Background: I am a newbe trying to store the state of an Internet Explorer Application with the use of win32.com and python. I use python 2.3. Problem 1: The state is accessible, but not the...
0
by: Steve McLellan | last post by:
Hi, Is there any problem programatically changing an MDI child form's WindowState fom Minimized to Maximized in one step? Setting to Maximized doesn't seem to do anything (setting it to Normal...
2
by: Adam Godley | last post by:
Hi I have a MainContainer form, and a Picker form (which is NOT an MDIChild). What I need to do is when the MainContainer is minimized, the same happens to the Picker form: basically, the...
1
by: Sukh | last post by:
I want to minimize page programmatically this.WindowState = System.Windows.Forms.FormWindowState.Minimized; Can any one has any idea Thanks Sukh
4
by: mac | last post by:
Brand Newbie Alert! I am working through the "Build a Program Now!" book by Microsoft Press. The last chapter has a little app that should stay in the system tray when the user clicks on the 'X'...
3
by: garyusenet | last post by:
I have a programme written in C++, the programme is unmanaged and is an executable, i don't have any source code. I'm writing a C# program. I want to (a) start the programme minimized. (b) send...
2
jamesd0142
by: jamesd0142 | last post by:
Hi all, Wondering if it is possible to hide my app when minimized? The say way task manager works when you click > options > hide when minimized. Or the same way outlook is running next to...
6
by: pamela fluente | last post by:
Hello friends, I have a simple question. If I have an application with several forms, you see on the windows bar, usually on the bottom of your screen, the various tags for the various forms. ...
2
by: z1freeride | last post by:
I'm wondering if there's a way to get the windowstate (maximized, minimized normal) of a process. For example: Process p = Process.GetProcessesByName("sample"); I would like to know if p is...
0
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...
0
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.