PC Review Forums Newsgroups Microsoft DotNet Microsoft VB .NET Show without activation.

Reply

Show without activation.

 
Thread Tools Rate Thread
Old 30-03-2008, 08:06 PM   #1
h4xPace
Guest
 
Posts: n/a
Default Show without activation.


Hi All,

What I am trying to do is display a form in the desktop foreground
without... at this is the critical part... stealing focus from the
active Window. I have tried:

Shadows ReadOnly Property ShowWithoutActivation() As Boolean
Get
Return False
End Get
End Property

No dice. Just some other points about the form... Its a borderless
form with a transparency key enabled, so basically the only thing that
the user should see is 'floating' text or an image. Perhaps there is a
better way to accomplish this? I am open to any and all suggestions.

Just to clear one thing up, if your solution is to set the forms
'TopMost' property to true then for petes sake save your keystrokes. I
have recieved that answer a number of times, and it is just a
irrelevant to the situation now as it was then.

I read on another forum that a guy accomplished this by using a
separate thread for the pop-up form, which I have not tried, though I
cant see how a new thread would help. Any direction on this would be
appreciated as well, since I would really rather not have to rewrite
to remove crossthread calls if I dont have to.

Thanks in advance,
-Chris
  Reply With Quote
Old 30-03-2008, 08:08 PM   #2
h4xPace
Guest
 
Posts: n/a
Default Re: Show without activation.

On Mar 30, 2:06*pm, h4xPace <cscall...@gmail.com> wrote:
> Hi All,
>
> What I am trying to do is display a form in the desktop foreground
> without... at this is the critical part... stealing focus from the
> active Window. I have tried:
>
> * * Shadows ReadOnly Property ShowWithoutActivation() As Boolean
> * * * * Get
> * * * * * * Return False
> * * * * End Get
> * * End Property
>
> No dice. Just some other points about the form... Its a borderless
> form with a transparency key enabled, so basically the only thing that
> the user should see is 'floating' text or an image. Perhaps there is a
> better way to accomplish this? I am open to any and all suggestions.
>
> Just to clear one thing up, if your solution is to set the forms
> 'TopMost' property to true then for petes sake save your keystrokes. I
> have recieved that answer a number of times, and it is just a
> irrelevant to the situation now as it was then.
>
> I read on another forum that a guy accomplished this by using a
> separate thread for the pop-up form, which I have not tried, though I
> cant see how a new thread would help. Any direction on this would be
> appreciated as well, since I would really rather not have to rewrite
> to remove crossthread calls if I dont have to.
>
> Thanks in advance,
> -Chris



++++++++++ That shadowed property is actually set to return true, I
just had it false for the debug session that I was working with. It
does not work either way, sorry for the confusion ++++++++++++++
  Reply With Quote
Old 31-03-2008, 05:30 AM   #3
Cor Ligthert[MVP]
Guest
 
Posts: n/a
Default Re: Show without activation.

Hi

I am really breaking my head, what you mean with this one

>What I am trying to do is display a form in the desktop foreground
>without... at this is the critical part... stealing focus from the
>active Window. I have tried:


Cor


"h4xPace" <cscallion@gmail.com> schreef in bericht
news:6439ca54-6153-4283-b918-33a9187637fd@s50g2000hsb.googlegroups.com...
> Hi All,
>
> What I am trying to do is display a form in the desktop foreground
> without... at this is the critical part... stealing focus from the
> active Window. I have tried:
>
> Shadows ReadOnly Property ShowWithoutActivation() As Boolean
> Get
> Return False
> End Get
> End Property
>
> No dice. Just some other points about the form... Its a borderless
> form with a transparency key enabled, so basically the only thing that
> the user should see is 'floating' text or an image. Perhaps there is a
> better way to accomplish this? I am open to any and all suggestions.
>
> Just to clear one thing up, if your solution is to set the forms
> 'TopMost' property to true then for petes sake save your keystrokes. I
> have recieved that answer a number of times, and it is just a
> irrelevant to the situation now as it was then.
>
> I read on another forum that a guy accomplished this by using a
> separate thread for the pop-up form, which I have not tried, though I
> cant see how a new thread would help. Any direction on this would be
> appreciated as well, since I would really rather not have to rewrite
> to remove crossthread calls if I dont have to.
>
> Thanks in advance,
> -Chris


  Reply With Quote
Old 31-03-2008, 05:32 AM   #4
Cor Ligthert[MVP]
Guest
 
Posts: n/a
Default Re: Show without activation.

Sorry,

I think I got it, you want to make a notification on screen, but let the
current focused screen keep the activated screen.

But now the solution.

Cor

"h4xPace" <cscallion@gmail.com> schreef in bericht
news:6439ca54-6153-4283-b918-33a9187637fd@s50g2000hsb.googlegroups.com...
> Hi All,
>
> What I am trying to do is display a form in the desktop foreground
> without... at this is the critical part... stealing focus from the
> active Window. I have tried:
>
> Shadows ReadOnly Property ShowWithoutActivation() As Boolean
> Get
> Return False
> End Get
> End Property
>
> No dice. Just some other points about the form... Its a borderless
> form with a transparency key enabled, so basically the only thing that
> the user should see is 'floating' text or an image. Perhaps there is a
> better way to accomplish this? I am open to any and all suggestions.
>
> Just to clear one thing up, if your solution is to set the forms
> 'TopMost' property to true then for petes sake save your keystrokes. I
> have recieved that answer a number of times, and it is just a
> irrelevant to the situation now as it was then.
>
> I read on another forum that a guy accomplished this by using a
> separate thread for the pop-up form, which I have not tried, though I
> cant see how a new thread would help. Any direction on this would be
> appreciated as well, since I would really rather not have to rewrite
> to remove crossthread calls if I dont have to.
>
> Thanks in advance,
> -Chris


  Reply With Quote
Old 31-03-2008, 05:48 AM   #5
Bill McCarthy
Guest
 
Posts: n/a
Default Re: Show without activation.

Hi Chris,

I did this in the VB Snipept editor, but it did actually get activated but
then reactivates the parent.

See the "Create Shapely Forms" part of this article I wrote :
http://visualstudiomagazine.com/col...itorialsid=2086



Protected Overrides Sub DefWndProc( _
ByRef m As System.Windows.Forms.Message)

MyBase.DefWndProc(m)
Const WM_NCACTIVATE As Int32 = &H86

If Me.m_Owner IsNot Nothing AndAlso _
m.Msg = WM_NCACTIVATE Then

SendMessage(m_Owner.Handle, _
m.Msg, New IntPtr(1), IntPtr.Zero)
End If
End Sub





"h4xPace" <cscallion@gmail.com> wrote in message
news:6439ca54-6153-4283-b918-33a9187637fd@s50g2000hsb.googlegroups.com...
> Hi All,
>
> What I am trying to do is display a form in the desktop foreground
> without... at this is the critical part... stealing focus from the
> active Window. I have tried:
>
> Shadows ReadOnly Property ShowWithoutActivation() As Boolean
> Get
> Return False
> End Get
> End Property
>
> No dice. Just some other points about the form... Its a borderless
> form with a transparency key enabled, so basically the only thing that
> the user should see is 'floating' text or an image. Perhaps there is a
> better way to accomplish this? I am open to any and all suggestions.
>
> Just to clear one thing up, if your solution is to set the forms
> 'TopMost' property to true then for petes sake save your keystrokes. I
> have recieved that answer a number of times, and it is just a
> irrelevant to the situation now as it was then.
>
> I read on another forum that a guy accomplished this by using a
> separate thread for the pop-up form, which I have not tried, though I
> cant see how a new thread would help. Any direction on this would be
> appreciated as well, since I would really rather not have to rewrite
> to remove crossthread calls if I dont have to.
>
> Thanks in advance,
> -Chris


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off