Solved

Tranparent Panell over Other Controls

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

770 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