Solved

Tranparent Panell over Other Controls

Posted on 2009-05-09
1
256 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

687 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