Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When invisible window appears w/cursor on top, has blank block...

 
Dan Bizman
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an "invisible" window that slowly appears (one of the things it does is take a picture of the background). However, if when it's first appearing, the cursor is right on top of it, it nevers paints the square around the cursor -- instead that stays as the background and cursor.

Any idea what causes this and how to fix it?

i can't call repaint because doing so:

1. makes it flash for a second (so then it's not a smooth transition)
2. it makes it 100% visible, instead of slowly appearing
 
aymane chetibi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry, I can't answear your question, but instead I would be very grateful if you can show me how did you make the windows appearing smoothly.


I would really appreciate that!!!
thanks!
 
Dan Bizman
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by aymane chetibi:
I am sorry, I can't answear your question, but instead I would be very grateful if you can show me how did you make the windows appearing smoothly.


I would really appreciate that!!!
thanks!



I'm using JNI and doing a windows-only version. i'd like to do Linux too but haven't had a chance/need yet. You still want it?
 
aymane chetibi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the moving of the box implemented in c++ of something? is yes, then I don't need it( thanks a lot though).

If it is in java, then yes I would love to have it.
what are you using JNI for ?


regards,
 
Dan Bizman
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by aymane chetibi:
Is the moving of the box implemented in c++ of something? is yes, then I don't need it( thanks a lot though).

If it is in java, then yes I would love to have it.
what are you using JNI for ?


regards,


Moving? I don't follow.

What mine does is it's invisible and slowly appears in one spot. I use the JNI because making a window go from transparent to translucent to fully visible is no where near smooth. It looks unprofessional, so we had to use JNI.
 
aymane chetibi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well yea I would love to have a look at it.
My email is : A.Chetibi@aui.ma

one question: do you think I would be able to easily integrate it whithin my project in JBuilder?

regards,
 
Dan Bizman
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one else has ever experienced this same problem? (i.e. the window has a "see-through" space where the cursor is when "appearing")
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not done what you've described, but possible workarounds might be:
1)
get screen size
use Robot's mouseMove to move the cursor to bottom right corner (won't be seen)
snapshot
mouseMove cursor back to middle of screen

2)
set cursor to an invisible cursor
snapshot
reset cursor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic