Board index » cppbuilder » Form on Top without Focus

Form on Top without Focus

Is there a way I can make a form show on top of all the Windows, and yet not
actually get the keyboard focus?

It is mostly to show some warning, but I do not want to disturb what ever a
user is typing, if he/she is doing so at the time the warning shows up.

Thanks

-Art

 

Re:Form on Top without Focus


Take a look at THintWindow

Sam

Quote
"Art Alvarado" <g...@gug.net> wrote in message

news:3ed77522@newsgroups.borland.com...
Quote

> Is there a way I can make a form show on top of all the Windows, and yet
not
> actually get the keyboard focus?

> It is mostly to show some warning, but I do not want to disturb what ever
a
> user is typing, if he/she is doing so at the time the warning shows up.

> Thanks

> -Art

Re:Form on Top without Focus


Quote
> Take a look at THintWindow

That does the trick.  Thanks!

I wish I could do a few more things with it, such as change the background
color and possibly animate it.  But if it can't be done with a form, this is
still WAY better than what I had.

Thanks Again!

-Art

"Sam S. Firouz" <sfir...@Hotmail.com> wrote in message
news:3ed7cc4e$1@newsgroups.borland.com...

Quote
> Take a look at THintWindow

> Sam

> "Art Alvarado" <g...@gug.net> wrote in message
> news:3ed77522@newsgroups.borland.com...

> > Is there a way I can make a form show on top of all the Windows, and yet
> not
> > actually get the keyboard focus?

> > It is mostly to show some warning, but I do not want to disturb what
ever
> a
> > user is typing, if he/she is doing so at the time the warning shows up.

> > Thanks

> > -Art

Re:Form on Top without Focus


Quote
"Art Alvarado" <g...@gug.net> wrote in message

news:3ed7d855$1@newsgroups.borland.com...

Quote
> I wish I could do a few more things with it, such
> as change the background color and possibly
> animate it.

Derive your own class from it, then you can do whatever you want with it.
For the background, override the inherited Paint() method and custom-draw
onto the inherited Canvas.  For animation, since THintWindow is a
TWinControl descendant, you can host other controls inside the window, such
as a TAnimate.

Gambit

Re:Form on Top without Focus


I didn't think about that.  That's Great!  Thanks a bunch.

-Art

"Remy Lebeau (TeamB)" <gambi...@yahoo.com> wrote in message
news:3ed7dd5c$1@newsgroups.borland.com...

Quote

> "Art Alvarado" <g...@gug.net> wrote in message
> news:3ed7d855$1@newsgroups.borland.com...

> > I wish I could do a few more things with it, such
> > as change the background color and possibly
> > animate it.

> Derive your own class from it, then you can do whatever you want with it.
> For the background, override the inherited Paint() method and custom-draw
> onto the inherited Canvas.  For animation, since THintWindow is a
> TWinControl descendant, you can host other controls inside the window,
such
> as a TAnimate.

> Gambit

Re:Form on Top without Focus


Quote
> Derive your own class from it, then you can do whatever you want with it.
> For the background, override the inherited Paint() method and custom-draw
> onto the inherited Canvas.

Does the Paint() method act just like any other OnPaint() event?
Can I simply just draw on the Canvas?  Or does it require anything special?

Thanks,

-Art

"Remy Lebeau (TeamB)" <gambi...@yahoo.com> wrote in message
news:3ed7dd5c$1@newsgroups.borland.com...

Quote

> "Art Alvarado" <g...@gug.net> wrote in message
> news:3ed7d855$1@newsgroups.borland.com...

> > I wish I could do a few more things with it, such
> > as change the background color and possibly
> > animate it.

> Derive your own class from it, then you can do whatever you want with it.
> For the background, override the inherited Paint() method and custom-draw
> onto the inherited Canvas.  For animation, since THintWindow is a
> TWinControl descendant, you can host other controls inside the window,
such
> as a TAnimate.

> Gambit

Re:Form on Top without Focus


Quote
"Art Alvarado" <g...@gug.net> wrote in message

news:3ede4ede$1@newsgroups.borland.com...

Quote
> Does the Paint() method act just like any other OnPaint() event?

Yes.

Quote
> Can I simply just draw on the Canvas?

Yes.

Gambit

Other Threads