transparent Form

  • Thread starter Thread starter jean_pol
  • Start date Start date
J

jean_pol

Hi,

My problem is:

I have two Forms and one is transparent in my application
I would like to see, through that which is transparent, the second (not
transparent).
I have overload Onpaint() and OnpaintBackground() to have tranparence .
But I see the desktop, not my second Form.
I work with CF 1.0 on PPC 2003 with VS2003.

Does anybody have a idea?

Thank you in advance,

Jean Paul,
 
Thank you for your answer Peter,

But my problem is little bit different.
I have 2 Forms:
- Form1 with controls: Buttons, TextBox..., and Panels which contains
controls
- Form2 with nothing and transparent.

My Form2, have the Focus, and I would like see, through the Form2, the
Form1 (and his controls not only his background).
I want to intercept Events by Form2.

I have an transparent Form (I use example from Sergey Bogdanov ).
http://groups.google.com/group/micr...ompactframework&rnum=1&hl=en#f6b89e44294957da
I also tested with transparent pictureBox with Bitmap.

My form2 is transparent, very transparent, because I see the desktop
and not the contents of my form1.

Best regards,

Jean Paul,
 
If Form1 is part of your application why not just provide a method to
publicly expose the events required. If it's a third-party application you
could always try subclassing the main window (requires some native code
under .NETCF v1.0).

Peter
 
The form1 is part of my own application.
It is a solution of which I thought to solve my problem.
Explanation:
I develop a software on Pocket for disabled people. They cannot use
the stylet of Pocket.
All the selections are done by a scanning, at a given speed, of
Buttons. Those change color the ones after the others. When the person
presses on a key of the keyboard or the button of a Bluetooth mouse,
the Button is selected. On each button a function corresponds.
I use the mousedown, mouseup, keydown and keyup events to detect the
"push". The problem is that according to the position of the cursor of
the mouse, the event is not always available. For example on a TextBox
or a Button there is not mousedown and mousup events.
What interests to me is the "push" on the mouse, not the place or
occurs the push. I had thus thought of a transparent form in order to
intercept the mousedown and mouseup event on this one. And what is
the position of the control.
Have you another idea to intercept a mousedown and mousup, what the
position of the cursor on the screen.
I am not an expert under development on Pocket PC and I discover the
limitations of the compact framework.
Thank you for your assistance and your ideas.
 
I have found a solution by using th "IMessageFilter.PreFilterMessage"
with ApplicationEX from OpenNetCF...

Jean Paul
 
Back
Top