473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Checkbox DrawToBitmap

Though I'd start of this post with a some background information. In
an application we are developing we needed a treeview that could
check, uncheck and disable individual nodes. This was not possible
in .NET 2.0 (could only disable all nodes or no nodes). Our solution
to this problem was to extend the .NET treeview and kept an internal
node-state variabel (checked, unchecked and disabled). Then we created
a checkbox instance that was disabled, and created a bitmap of this
object using the DrawToBitmap() API. In all instances where a node was
disabled we then painted the generated bitmap ontop of the standard
checkbox. The user would then see a disabled checkboc. We also
canceled the event to check the checkbox.

This solution works fine BUT when we started to test the application
on computers with different video settings and we discovered a small
problem. By toggling between Windows Classic \ Windows XP (Display
Properties -Apperance) and changing the DPI the size of the disabled
checkbox changed. Using Windows Classic mode and DPI 150% worked fine
but when switching to Windows XP mode the checkboxes became to small,
so it looks strange compared to the rest of the treeview.

We are unsure how to solve this challenge. I was hoping someone one
here had ran into the same problem and might have good solutiuon. Any
suggestions are welcome.

Thanks.

Oct 10 '07 #1
0 1587

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Danny Tuppeny | last post by:
The MSDN page for this method reads: --------- Quote --------- WebBrowserBase.DrawToBitmap Method Note: This method is new in the .NET Framework version 2.0. This method supports the .NET...
0
by: mike | last post by:
Hi there: I've read an excellent "how to"-article by Microsoft (no. 306227) - partly cited cited at the end of this email). I have implemented the code related to the part "How to Add a...
6
by: powella | last post by:
Hello All, I've recently discovered the DrawToBitmap method hidden away in the Control class (in .NET 2.0). What a fantastic addition to the class. I'm having some degree of difficulty using...
1
by: GM | last post by:
Hello, I have visual studio 2005 on XP SP2. I have a simple sample application using a webbrowser and 2 buttons. Button1 loads the page Button2 saves the screenshot But for some reason the...
0
by: Prosperz | last post by:
Hi, I would like if there is a way to use DrawToBitmap with a WebBrowser control in Framework 2.0. In MSDN I found this method is not implemented for this control. Thanks.
2
by: NickP | last post by:
Hi there, I have a form with a few controls on, some of them are controls I have made. Anyway, when I call DrawToBitmap on the form all looks fine except for the controls I have made, they have...
10
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked....
0
by: Joey | last post by:
I want to use DrawToBitmap to generate a "thumbnail" graphic reflecting a particular web page. The following code successfully generates a graphic of the web page being viewed in the WebBrowser...
1
by: omlac omlac | last post by:
Hi, im having a problem with drawtobitmap in C# when i call the method its not printing the contents of a control. in my case richtext format, my code is below; Bitmap bi = new...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.