PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Transparent button
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Transparent button
![]() |
Transparent button |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I am trying to create a transparent button, subclassing from control. I
cannot seem to get it to work and its led me to ask a few questions. 1) How do we set styles in the compact framework? What is the replacement for CreateParams that you can use on the desktop? I can do a pInvoke to set the style, but you get into the problem where the style needs to be set once you get a window handle and before it is activated and as a control I am not sure you know when that is. 2) Is there somewhere you can go to know how to do something that is not supported in the compact framework, but is supported in the full framework? All you know from the help is which methods are supported by the compact framework, but it would be really nice to know what replacement (pInvoke or other class) is expected to be used as the replacement. 3) Does Windows Mobile 5 support the WS_EX_TRANSPARENT exStyle? -- Thanks, Juan |
|
|
|
#2 |
|
Guest
Posts: n/a
|
> 1) How do we set styles in the compact framework? What is the replacement
> for CreateParams that you can use on the desktop? I can do a pInvoke to > set > the style, but you get into the problem where the style needs to be set > once > you get a window handle and before it is activated and as a control I am > not > sure you know when that is. P/Invoke is the only way. You can override OnHandleCreated: protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); // p/invoke with this.Handle } > 2) Is there somewhere you can go to know how to do something that is not > supported in the compact framework, but is supported in the full > framework? > All you know from the help is which methods are supported by the compact > framework, but it would be really nice to know what replacement (pInvoke > or > other class) is expected to be used as the replacement. Since the CF is a pretty small subset that would be a giant task. Putting together the "workarounds" would essentially be writing another .NET Framework. OpenNETCF's SDF has a lot of work in it and with it you're still nowhere near the full framework. > 3) Does Windows Mobile 5 support the WS_EX_TRANSPARENT exStyle? No. It's not in winuser.h so that leads me to believe the OS doesn't support it. It is defined in the MFC source, but that's probably just a copy leftover from the desktop. -- Chris Tacke - Embedded MVP OpenNETCF Consulting Managed Code in the Embedded World www.opennetcf.com -- |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks for the reply. Yes, I see your point on the workarounds. Just
explaining how to do the workarounds would be a major task, but sometimes just a little direction could help tremendously. -- Thanks again for the help, Juan "<ctacke/>" wrote: > > 1) How do we set styles in the compact framework? What is the replacement > > for CreateParams that you can use on the desktop? I can do a pInvoke to > > set > > the style, but you get into the problem where the style needs to be set > > once > > you get a window handle and before it is activated and as a control I am > > not > > sure you know when that is. > > P/Invoke is the only way. You can override OnHandleCreated: > > protected override void OnHandleCreated(EventArgs e) > { > base.OnHandleCreated(e); > // p/invoke with this.Handle > } > > > > 2) Is there somewhere you can go to know how to do something that is not > > supported in the compact framework, but is supported in the full > > framework? > > All you know from the help is which methods are supported by the compact > > framework, but it would be really nice to know what replacement (pInvoke > > or > > other class) is expected to be used as the replacement. > > Since the CF is a pretty small subset that would be a giant task. Putting > together the "workarounds" would essentially be writing another .NET > Framework. OpenNETCF's SDF has a lot of work in it and with it you're still > nowhere near the full framework. > > > 3) Does Windows Mobile 5 support the WS_EX_TRANSPARENT exStyle? > > No. It's not in winuser.h so that leads me to believe the OS doesn't > support it. It is defined in the MFC source, but that's probably just a > copy leftover from the desktop. > > > -- > Chris Tacke - Embedded MVP > OpenNETCF Consulting > Managed Code in the Embedded World > www.opennetcf.com > -- > > > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

