Evening,
I have a slight erk with the ComboBoxRendere r running under Vista and was
hoping someone could shed some light on this for me.
I've created a custom control that inherits from Button - no problems there
:)
The problem comes with the actual painting of the custom button... The Visa
one blends in almost perfectly with the textbox component of a combo - BUT a
custom painted one shows up as ugly and grey; both in design and run time...
Can anyone explain why or let me know if I am missing something that is
Vista specific?
As I don't have another Vista machine to test this on and don't know another
developer who has Vista I'm stumped...
<code>
#region Fields
private ButtonState buttonState;
private ComboBoxState comboBoxState;
#endregion
protected override void OnPaint(PaintEv entArgs e)
{
base.OnPaint(e) ;
if (!ComboBoxRende rer.IsSupported )
{
ControlPaint.Dr awComboButton(e .Graphics,
this.ClientRect angle, buttonState );
}
else
{
ComboBoxRendere r.DrawDropDownB utton(e.Graphic s,
this.ClientRect angle, comboBoxState);
}
}
</code>
I do also SetStyle on the control during initialisation
<code>
private void SetControlStyle s()
{
this.SetStyle(C ontrolStyles.Do ubleBuffer, true);
this.SetStyle(C ontrolStyles.Al lPaintingInWmPa int, true);
this.SetStyle(C ontrolStyles.Us erPaint, true);
}
</code>
Thanks
Brendon 1 2770
Never mind - I found the problem; it appears the Shell Programmers shafted
the ComboBox AGAIN with an upgrade to the OS and development environment
*cry*
So I need to handle the DrawThemeBackgr ound API to render the vista themes
including the Aero visual style -.-
Any MVP's able to give more of a heads up as when/if this will ever get
fixed?
Brendon
"Brendon Bezuidenhout" <ab****@bezfami ly.netwrote in message
news:C8******** *************** ***********@mic rosoft.com...
Evening,
I have a slight erk with the ComboBoxRendere r running under Vista and was
hoping someone could shed some light on this for me.
I've created a custom control that inherits from Button - no problems
there :)
The problem comes with the actual painting of the custom button... The
Visa one blends in almost perfectly with the textbox component of a
combo - BUT a custom painted one shows up as ugly and grey; both in design
and run time... Can anyone explain why or let me know if I am missing
something that is Vista specific?
As I don't have another Vista machine to test this on and don't know
another developer who has Vista I'm stumped...
<code>
#region Fields
private ButtonState buttonState;
private ComboBoxState comboBoxState;
#endregion
protected override void OnPaint(PaintEv entArgs e)
{
base.OnPaint(e) ;
if (!ComboBoxRende rer.IsSupported )
{
ControlPaint.Dr awComboButton(e .Graphics,
this.ClientRect angle, buttonState );
}
else
{
ComboBoxRendere r.DrawDropDownB utton(e.Graphic s,
this.ClientRect angle, comboBoxState);
}
}
</code>
I do also SetStyle on the control during initialisation
<code>
private void SetControlStyle s()
{
this.SetStyle(C ontrolStyles.Do ubleBuffer, true);
this.SetStyle(C ontrolStyles.Al lPaintingInWmPa int, true);
this.SetStyle(C ontrolStyles.Us erPaint, true);
}
</code>
Thanks
Brendon
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Harry_Crow |
last post by:
I'm painting in the Non Client area of the control. I'm facing some flicker
problem. Is it possible to achive Double buffer painting in Non Client area.
The SetStyle with ControlStyles.DoubleBuffer and
ControlStyles.AllPaintinginWmPaint set to true only works for Client area
painting,
Please Help me if any one has some Idea.
Thank you,
|
by: marfi95 |
last post by:
I am having to resort to Mick's methods when it comes to hiding/showing
tabpages of my tab control since .NET doesn't work correct. I think I
have it finally workign the way I need, but because I can show/hide up
to 10 tabs, there is a lot of repainting/flickering going on and looks
really bad with everything flashing all over the place. Is there a way
to turn off the painting until all the tab stuff is executed and then
do 1 refresh ? ...
|
by: salad |
last post by:
Due to an earlier posting I read in this newsgroup regarding Office 2007
beta, I downloaded it. After I DL'd it, I got an invitation from MS to
get WinVista.
I am now wondering if, since both are betas, it is best to buy a new
computer? My current computer setup is a Pentium 4, 1 gig memory, 2.66
ghz, 60-80 gig disk drive.
MS's requirements for a WinVista computer is
A modern processor (800mz)
|
by: Noman Ali |
last post by:
Hi,
I am facing some problems in Data Grid bool Column.
Data Grid bool Column is not painting correctly after Scrolling in .net
1.1.
Any one knows how to correct this??
Thankx in advance.
Regards,
|
by: Squishy |
last post by:
I tried installing my VS2005 Pro on Vista Ultimate 32 bit RTM today and got
errors stating that VS2005 was not compatible with Vista.
Microsoft......please pull your finger out of my ass and tell me this is a
joke.
It must be a joke....because I also have read that VS2002 and VS2003 will
not be supported on Vista. This clearly violates Microsoft's own terms of
support for these products.
| |
by: j2ee.singh |
last post by:
Hi,
I'm looking to buy a new laptop primarily to learn & practice .NET and
C#.
My Question is:
Is there any requirement for .NET and C# in terms of the following
Operating Systems:
- Windows Vista Home Basic
- Windows Vista Business
|
by: Marina Levit |
last post by:
I am trying to do some processing on a background thread while keeping the
UI painting. However, this is a generic server side call routine - and it
needs to block until the server side call completes. So the idea is, a
server side call begins, it gets spun off on another thread to keep the UI
painting - but, the code flow cannot return to the caller until the server
side call completes, because the caller expects the data.
The only way...
|
by: Ray |
last post by:
i use ComboBoxRenderer.DrawDropDownButton method in my application to
paint a dropdown button,
it shown the same as standard combobox control in xp,
but in vista, it is different to standard control,
any suggestion ?
i googled it, some guys suggest to use DrawThemeBackground method, but
i don't know how to ..
|
by: SabrinaFather |
last post by:
I recently discovered that the old VB3 could be installed under Vista Home Edition (i.e a 32 bits code) and be run quite well.
Everything appears to be correct (adding new code, running the application under development) except the functionnality to produce an EXE code !
This attempt is always ended with a general protection fault in module KRNL386EXE and NTVDM.EXE stopping to work.
I know that everyone will be strongly in favour of giving...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |