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

Showing form without activation...

Hi,
I have modal form which I am showing with some fading effect...
(it is like balloon that comes when you receive a mail in the outlook.)
But when I show this form, Owner form looses focus.
I searched across net & I came across ShowWindow API, It seems working
for me ... but the fading effect is not working.Can you please suggest
me some way so that I will be able to show my modal form using
ShowDialog and Still it is deactivated when it is loaded... please
help...

Nov 17 '05 #1
6 9089
The only way I can think of to do this would be to make this a top-most
form (the TopMost property on the Form class). This way, you can show your
form, but have it be on top of your original form (and not have it be pushed
further down in the z-order when it looses focus).

The only problem is you might get a flicker, in the sense that you have
to activate the top form, then switch the focus back to the form below the
top form.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"sandy_pt_in" <sa*********@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi,
I have modal form which I am showing with some fading effect...
(it is like balloon that comes when you receive a mail in the outlook.)
But when I show this form, Owner form looses focus.
I searched across net & I came across ShowWindow API, It seems working
for me ... but the fading effect is not working.Can you please suggest
me some way so that I will be able to show my modal form using
ShowDialog and Still it is deactivated when it is loaded... please
help...

Nov 17 '05 #2
thanks Nicholas for quick reply,
I have already set TopMost property as true but it is of no use...

Nov 17 '05 #3
In case you happen to be targeting the 2.0 framework, this may help...
http://blogs.msdn.com/jfoscoding/arc...29/475564.aspx

--
Tim Wilson
..NET Compact Framework MVP

"sandy_pt_in" <sa*********@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi,
I have modal form which I am showing with some fading effect...
(it is like balloon that comes when you receive a mail in the outlook.)
But when I show this form, Owner form looses focus.
I searched across net & I came across ShowWindow API, It seems working
for me ... but the fading effect is not working.Can you please suggest
me some way so that I will be able to show my modal form using
ShowDialog and Still it is deactivated when it is loaded... please
help...

Nov 17 '05 #4
We are using 1.1... We may not go for very 2.0 soon...

Nov 17 '05 #5
Your application needs to be deriving the notification window from
NativeWindow. This will be a top level window using a popup style and will
animate itself using the LayeredWindow API. You can use the ShowWindow API
with the SHW_SHOWNOACTIVATE style so that it doesn't grab the focus. This is
how tooltips operate.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"sandy_pt_in" <sa*********@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi,
I have modal form which I am showing with some fading effect...
(it is like balloon that comes when you receive a mail in the outlook.)
But when I show this form, Owner form looses focus.
I searched across net & I came across ShowWindow API, It seems working
for me ... but the fading effect is not working.Can you please suggest
me some way so that I will be able to show my modal form using
ShowDialog and Still it is deactivated when it is loaded... please
help...

Nov 17 '05 #6

Bob Powell [MVP] wrote:
Your application needs to be deriving the notification window from
NativeWindow. This will be a top level window using a popup style and will
animate itself using the LayeredWindow API. You can use the ShowWindow API
with the SHW_SHOWNOACTIVATE style so that it doesn't grab the focus. This is
how tooltips operate.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"sandy_pt_in" <sa*********@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi,
I have modal form which I am showing with some fading effect...
(it is like balloon that comes when you receive a mail in the outlook.)
But when I show this form, Owner form looses focus.
I searched across net & I came across ShowWindow API, It seems working
for me ... but the fading effect is not working.Can you please suggest
me some way so that I will be able to show my modal form using
ShowDialog and Still it is deactivated when it is loaded... please
help...


Thanks Bob, Its working ...

Nov 17 '05 #7

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

Similar topics

2
by: R. Rajesh Jeba Anbiah | last post by:
I'm supposed to do the account activation via email. I mean *not* sending the activation link like http://foo.com/foo.php?actcode=foo. But, I would like it to be like...
1
by: Dave Smithz | last post by:
Hello There, I obtained a visual studio .net which I installed a few months ago but then never had time to use. I obtained a new copy of the trial which is slightly newer. However, because I...
4
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form...
2
by: conset23 | last post by:
Hello. I'm working with WinForm. It has 30 same user control, each with 4 buttons, 3 labels, 3 textboxes, 2 picture boxes and uses override onPaint to draw gradient rectangle. Main form also has 2...
1
by: DomGo | last post by:
Hi, I try to open a form, that automatically loses focus to the window, that had the focus immediatly before the new form has been opened. The new form is topmost and displays a message only for...
0
by: Wayne Smith | last post by:
I've taken the following code from a developers web site which should allow a user to register and receive an email message with a link to activate their account, but when I click the link on my...
0
by: Brian Tkatch | last post by:
Been trying to figure out how to show borderless forms indside an MDI Form, without showing the border at all. Given that (in our case) only one such form needs to show at a time, we were able...
10
by: John Brown | last post by:
Hi there, Does anyone know how to (generically) determine the currently active form for an application using a "static" function (so I can call it from anywhere). There is no offiical way I've...
7
by: =?Utf-8?B?TWF0dA==?= | last post by:
Hi I have an app that runs without a main form, just a notification icon, when the user clicks the icon the form is shown, and when the form is minimized it's hidden. This all works great,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.