473,387 Members | 1,812 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,387 software developers and data experts.

Application.Run forcing visibility

Hi there,

I'm having slight troubles using Application.Run and keeping a form
invisible. The method appears to force the visibility of the form even if I
override the createparams function with the following,

---------------

Protected Overrides ReadOnly Property CreateParams() As
System.Windows.Forms.CreateParams
Get
Const WS_VISIBLE As Integer = &H10000000
Dim pCPsParams As CreateParams = MyBase.CreateParams()
If ((Not showthisformflag) And CBool(pCPsParams.Style And
WS_VISIBLE)) Then pCPsParams.Style = pCPsParams.Style Xor WS_VISIBLE
Return (pCPsParams)
End Get
End Property

---------------

Ive tried changing the visibility in so many different places now and it
just does *not* work, even on activate with a static flag so it only happens
once. Any ideas on how to achieve this? Thanks loads in advance!

--
Nick Pateman

---------------------------------------------------------------
Please do not reply directly to me, but the entire newsgroup.
Any views expressed above are my own
Without predjudice
Nov 21 '05 #1
5 1261
What about setting the Opacity property to 0%

?

"Nick" <no****@altavente.com> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
Hi there,

I'm having slight troubles using Application.Run and keeping a form
invisible. The method appears to force the visibility of the form even if
I override the createparams function with the following,

---------------

Protected Overrides ReadOnly Property CreateParams() As
System.Windows.Forms.CreateParams
Get
Const WS_VISIBLE As Integer = &H10000000
Dim pCPsParams As CreateParams = MyBase.CreateParams()
If ((Not showthisformflag) And CBool(pCPsParams.Style And
WS_VISIBLE)) Then pCPsParams.Style = pCPsParams.Style Xor WS_VISIBLE
Return (pCPsParams)
End Get
End Property

---------------

Ive tried changing the visibility in so many different places now and
it just does *not* work, even on activate with a static flag so it only
happens once. Any ideas on how to achieve this? Thanks loads in advance!

--
Nick Pateman

---------------------------------------------------------------
Please do not reply directly to me, but the entire newsgroup.
Any views expressed above are my own
Without predjudice

Nov 21 '05 #2
"Nick" <no****@altavente.com> schrieb:
I'm having slight troubles using Application.Run and keeping a form
invisible. The method appears to force the visibility of the form even if
I override the createparams function with the following,


You can use 'Application.Run()' (parameterless version) to start a message
loop without showing a form.

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

Nov 21 '05 #3
Hi there,

That's quite a mad one I hadn't thought of, what I've ended up doing is
creating a new visible flag for the form and exposing it as a property. The
when the visiblechanged event on the form fires I set the forms visibility
property to me custom flag. Even though the event seems to get fired about
3 times to start with this seems to work pretty well. Thanks for your idea
though, thinking outside the box huh?

Cheers again :-)

Nick.

"Mr Newbie" <he**@now.com> wrote in message
news:uw**************@tk2msftngp13.phx.gbl...
What about setting the Opacity property to 0%

?

"Nick" <no****@altavente.com> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
Hi there,

I'm having slight troubles using Application.Run and keeping a form
invisible. The method appears to force the visibility of the form even
if I override the createparams function with the following,

---------------

Protected Overrides ReadOnly Property CreateParams() As
System.Windows.Forms.CreateParams
Get
Const WS_VISIBLE As Integer = &H10000000
Dim pCPsParams As CreateParams = MyBase.CreateParams()
If ((Not showthisformflag) And CBool(pCPsParams.Style And
WS_VISIBLE)) Then pCPsParams.Style = pCPsParams.Style Xor WS_VISIBLE
Return (pCPsParams)
End Get
End Property

---------------

Ive tried changing the visibility in so many different places now and
it just does *not* work, even on activate with a static flag so it only
happens once. Any ideas on how to achieve this? Thanks loads in
advance!

--
Nick Pateman

---------------------------------------------------------------
Please do not reply directly to me, but the entire newsgroup.
Any views expressed above are my own
Without predjudice


Nov 21 '05 #4
Hi Herfried,
I'm having slight troubles using Application.Run and keeping a form
invisible. The method appears to force the visibility of the form even
if I override the createparams function with the following,


You can use 'Application.Run()' (parameterless version) to start a message
loop without showing a form.


I've come up with a different method, mentioned in the post to "Mr
Newbie". Im slightly curious where the message loops is processed for the
parameterless Application.Run()? If there is no form attached to it how can
you start an application? does execution continue but not quit until the
loop is stopped? I should have a try at it really, thanks for the advice
Herfried :-)

Nick.
Nov 21 '05 #5
Mad Idea Eh!,
;-}


"Nick" <no****@altavente.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Hi there,

That's quite a mad one I hadn't thought of, what I've ended up doing is
creating a new visible flag for the form and exposing it as a property.
The when the visiblechanged event on the form fires I set the forms
visibility property to me custom flag. Even though the event seems to get
fired about 3 times to start with this seems to work pretty well. Thanks
for your idea though, thinking outside the box huh?

Cheers again :-)

Nick.

"Mr Newbie" <he**@now.com> wrote in message
news:uw**************@tk2msftngp13.phx.gbl...
What about setting the Opacity property to 0%

?

"Nick" <no****@altavente.com> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
Hi there,

I'm having slight troubles using Application.Run and keeping a form
invisible. The method appears to force the visibility of the form even
if I override the createparams function with the following,

---------------

Protected Overrides ReadOnly Property CreateParams() As
System.Windows.Forms.CreateParams
Get
Const WS_VISIBLE As Integer = &H10000000
Dim pCPsParams As CreateParams = MyBase.CreateParams()
If ((Not showthisformflag) And CBool(pCPsParams.Style And
WS_VISIBLE)) Then pCPsParams.Style = pCPsParams.Style Xor WS_VISIBLE
Return (pCPsParams)
End Get
End Property

---------------

Ive tried changing the visibility in so many different places now and
it just does *not* work, even on activate with a static flag so it only
happens once. Any ideas on how to achieve this? Thanks loads in
advance!

--
Nick Pateman

---------------------------------------------------------------
Please do not reply directly to me, but the entire newsgroup.
Any views expressed above are my own
Without predjudice



Nov 21 '05 #6

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

Similar topics

4
by: Jonathan | last post by:
Hi, I've read through quite a number of postings on here so far and have seen what look like very simply, reasonable answers to this question, however I am still completely unable to do what I...
12
by: lawrence | last post by:
The following function correctly makes everything invisible but then fails to turn the one chosen DIV back to visible. I imagine I'm getting the syntax of the variable wrong? I've tried this with...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
1
by: Mark Richards | last post by:
Hi. I am basically a novice with access. Sorry for the long question, but I can't find a short way to make this clear.... I have a database I created to track service calls for a client with a...
8
by: TTroy | last post by:
I have a few questions about "scope" and "visibility," which seem like two different things. To me "visibility" of the name of a function or object is the actual code that can use it in an...
6
by: SkeanDu | last post by:
Ok, here is my problem. I have an aspx page that displays a databound datagrid and in one of the datagrid column headers I have an image that when clicked opens up a modal web dialog (another...
4
by: Sean Dockery | last post by:
I am a Java veteran who has just started learning C# with Tom Archer's Inside C# 2nd Ed. In the first chapter, there is a typical Hello, World! application that looks like this... namespace...
11
by: -D- | last post by:
How can I turn the visibility of the xml control on or off? <%@ Control Language="c#" AutoEventWireup="false" Codebehind="TopNavBar.ascx.cs" Inherits="compass.user_controls.TopNavBar"...
8
by: Ted Zlatanov | last post by:
Hello, my problem is very simple. I have: <div id="enclosing"> <div id="d1"> <span id="s1">S1</span> <span id="s2">S2</span> <span id="s3">S3</span> </div>
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
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
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,...
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...

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.