Solved

Tranparent Panell over Other Controls

Posted on 2009-05-09
1
255 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…

737 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