Solved

Tranparent Panell over Other Controls

Posted on 2009-05-09
1
246 Views
Last Modified: 2013-12-26
Hi experts,

I read through 100s of solutions here and elsewhere and it seems that nobody has this exact need and I'm unable to derive a solution myself. So here is my probelm:
I have a form with a few textboxes and comboboxes. Since when I disable the editing for the controls their text turns to a hard-to-read grey, I thought of pacing a transparent panel over them instead. Unfortunately, transparency seems to be a great issue for VB.NET... I tried all the solutions I found involving labels, textboxes, panels,... but still no luck. I know that it's possible to change the disabled control text color through windows, but that's out of my possibilities.

What is the best (easiest, quickest) way to avoid that a user edits (or even copies) the text of a control, while preserving the control's text color?

For what is worth, I'm using VB 2008 Express Edition.

Thanks a lot in advance!
J
0
Comment
Question by:jiiins2
1 Comment
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 500 total points
ID: 24343334
For a Textbox, set it's ReadOnly property to True and set the BackColor to White.

For a Combobox, set its DropDownStyle property to DropDownList.

To disable copying, for a Textbox, set the ShortcutsEnabled property to False.

Wayne
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now