Workaround For Lack Of True Transparency In Labels And Other Controls

May 4, 2011

I'm trying to make a label transparent. When I set the BackColor to transparent, all it does it take the color of the form it's sitting on, i.e. It's not truly transparent. I've googled it and found this in another thread (from a MSFT MVP)".NET controls do not support true transparency. You can set their BackColor to Transparent (in some but not all cases) and the parent control will show through, but only the parent control. If there is some other control behind that is not the parent it will not show through. That's because the control is not truly transparent. It basically copies its parent in the area behind it and uses that as its background, but that doesn't include sibling controls that may be behind it as well." To me, this is completely unacceptable. Why even include the transparency option when all it does is set the control's backcolor to the form color? I'm trying to add a label over a progress bar to give my user some feedback (because the Visual Studio progress bar doesn't support text, which is also a horrible design shortfall by the way), and have yet to find a way around this.

View 6 Replies


ADVERTISEMENT

Transparency - Create True Custom-shaped Forms?

Oct 23, 2010

I use a lot of picture box, label, and custom controls, all of which are oddly-shaped, and must overlap. In almost all cases, the backgrounds are not solid colored.I am using transparent .png images for the background images of many of these controls (except labels), and using transparent as the backcolor, creating a custom shaped control. However, when these controls overlap, the one towards the front will not show any controls behind it through the "transparent" background. This is getting annoying, because I cannot use any alternate object arrangements.How do I create true custom-shaped forms?

P.S. Some of my controls have extremely irregular shapes, so using simple line and curve drawing functions is probably not an option.

View 4 Replies

How To Get Transparency Working In Labels

Jan 6, 2009

I search for a grand total of about four hours online for a method of how to get transparency working in labels in VB.NET 2008. After finding nothing but some example that I have no idea how to implement into my project, I have almost given up. Yes, I've heard about setting the parent properties, but in my case it is imperative that I have labels on top of a PictureBox. (Apparently it's not possible through normal means to have transparent labels over PictureBoxes.)I'm losing my patience with VB.NET, even considering switching back to VB6. How could Microsoft make such a stupid decision? Today I decided to use a stupendous workaround and instead of labels, use transparent PNGs of bitmap text. And guess what? It has the exact same problem as the labels when placed in front of controls! The transparent background has been set to the colour of the form's background!

View 5 Replies

8 Bit GIF - Transparency / Forms And Controls

Apr 3, 2012

I have a 8 bit Gif, that is transparent, with controls sitting on top of it, all in a custom control. This part works fine. However, This control is a menu ring (appears around another control with a few options). The transparent part is over a Picbox, that is in a panel. The transparent part of the image seems to skip the picbox and go right through to the panel. I set the panel to a back color of RED. The custom control when its placed instead of showing the image in the pic box that it is on top of, it shows the RED panel I have made sure all my Z orders are right.

View 5 Replies

Rotate And Add Transparency To Controls?

Jun 16, 2012

i know there is an option for the whole form to be transparent but each control?

View 3 Replies

Using Transparency With Panels AND Showing Controls?

Oct 11, 2010

I need transparent panels. I simply set that background color of controls to Transparent - this does not solve the problem, as the transparency simply shows the background color of the form, but does NOT show any controls placed on the form, which is the crux of my problem.Why? Because I'm trying to use this skinning example, which does the skin by creating a user control, and make the panels show the skin's background:[URL] It seems I'm going to have to override the panel and paint it's background manually, but I don't understand how it all works; I've created a new class and overridden the panel, but the painting stuff is way above my head.

In the form's class:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Panel1.BackColor = Color.FromArgb(0, 0, 0, 0)
'supposedly a trick to make a gradient background on the form

[code]....

View 23 Replies

'True' Control Transparency - Control With Motion Graphics (simplicity, A 'video Player' Control)

Dec 29, 2010

Here's my situation: I have a control with motion graphics (for the sake of simplicity, a 'video player' control) in my project. Think of a PictureBox with constantly-changing images. In front of this will sit a second control (such as a second PictureBox of the same dimensions). The topmost PictureBox will be drawn to in its Paint event.

I need to draw very few elements, and the bottom control is updated much more frequently than I need for this drawing. So these elements are drawn to the topmost control. Think of a news broadcast, where they have live video in the background, with a news channel logo, news ticker, and sometimes gradient visible in front.

I'm trying to create that 'foreground' control, and the closest I believe I have gotten so far is the following:

Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Drawing.Drawing2D

[CODE]...

The 'Opacity' property in the code above is a sort of "scaling factor." The image drawn to the top control may, in different parts of the image, have any alpha value from full transparent to a full 255. This 'Opacity' property is applied to the entire image being drawn, scaling the alpha values of each pixel.

See the following pictures for description:

[URL]
[URL]
[URL]

View 9 Replies

Tab Stop = True On All Of The Applicable Controls?

Nov 2, 2009

I have explicitly provided tab stop information, and my form ignores that order at runtime. where i have 1, 2, 3, 4, 5, ... , 13 it goes 6, 1, 2, 8, 3, 4, ...tab stop = true on all of the applicable controls, no labels have tab stop = true...?

View 7 Replies

Tabcontrol - Autoscroll = True - Making Controls Visible And Get Set Scroll Position

May 9, 2012

I am using the Tabcontrol with autoscroll = True feature, when i make hidden controls visible on the tab there position is out of place, one work around for this is to set the scroll position to 0,0 by doing this...

[Code]....

View 2 Replies

Make A Group Box That Appears Behind Labels And Other Controls

Nov 17, 2008

I wanna make a group box that appears behind my labels and other controls (which I create from inside the code). I dont need the controls to be in the group control collection, I only need the box because it looks nice. Right now it appears on top of all my controls.

View 5 Replies

Labels And Picturebox Controls Are Black When The Form Moves?

Jun 30, 2011

When my main form loads it also shows two other forms and has them scroll down from the upper right corner of the screen.

Here's the code for one of them:

Me.Visible = True
Dim x As Integer
Dim y As Integer

[Code].....

View 2 Replies

IDE :: Change The Font Of All Controls (forms, Labels, Textboxes, Etc) In The Project?

Aug 23, 2010

I have a project with lots of forms in there with the default font property of Microsoft Sans Serif, 8.25pt

How do I change the font for all forms to let's say Tahoma, 8.25pt without changing it manually per form?

View 2 Replies

Audio Hardware - Read All The Labels Integer As The Sound Of Midi - Controls Selection On Vb 2005

Jul 30, 2009

I want to build a system that will take the input from an electric guitar and capture the frequency of the sound. and when the frequency is captured, the system identify the chord, and create new controls to represent the audio frequency. i want to use the label as the controls. so when the controls is created, how can i know that the user is click on what label. is there something like label1.click in vb 2005 express? then when the label is all created, i want the system to read all the labels integer as the sound of midi. so i have to assign what integer for what sound.

View 2 Replies

Get Around Lack Of Multiple Inheritance?

Nov 5, 2009

get around lack of multiple inheritance

View 2 Replies

Getting Around Lack Of Multiple Inheritance?

Aug 24, 2010

I am currently working on a framework for applications developed by my company, my boss wants to have a switchboard and a MenuStrip, where the entries and their actions are controlled by a database.

Now I've dealt with all the code to get them working. But the problem that I am facing is that I have duplicated code because each of the classes have the code that deals with ensuring the user has the right privileges and the code to deal with when a user clicks on an item.

Normally I would move this code out into a class and then have each of the classes inherit from the class, but because the switchboard already inherits from the Form class and the customised MenuStrip inherits from the MenuStrip class.After doing some Googling the only answer I have been able to find it using an interface for the functionality, which is obviously not exactly what I want.

Anyway I was just wondering whether any one had any suggestions on what I could do to deal with this problem, as I would like to avoid having duplicate code as much as possible.

View 2 Replies

'main Code' For Lack Of A Better Description?

Aug 16, 2009

Where do you put the "main code" for lack of a better description? I can find all sorts of places to put code based on events like button clicks or forms loading. However, I can't seem to find a place to run code without an event (just idling).Basically I'm looking to monitor a file and call a sub when it changes. I can monitor the file fine based on the size but I can't figure out where to put code to call a sub when that changes. Everything seems based on user actions but that doesn't work in this case.

View 4 Replies

Get IntelliSense For Lack Of Better Term To Work Like It Does For C#?

May 18, 2010

Is there a way to get the IntelliSense for a lack of better term to work like it does for C#? For example, lets say I want to add a MessageBox to my form. With C# as soon as I get around Mess it's already coming up with the rest of the word, and the same with variables and control names. Just wondering if I'm missing a setting or something some place or if this is just another example of how things are different between the enviroments. Using Visual Studio 2005.

View 10 Replies

Lack Of 'procedure View' Option

Jun 21, 2010

vb6 used to support both procedure view and full module view. VB.net seems only to support the latter.Why would they do this? Is it perhaps because people generally have bigger screens now (and less need to scroll).I find that I have to scroll down a sub/function very slowly with full module view or else i'll inadvertently end up in a different sub.Is there a plug-in or another way to recreate procedure view?

View 2 Replies

VS 2010 How To Get Around Lack Of Multiple Inheritance

Aug 31, 2010

I have a class, GControl. It's pretty much a Control class clone with some improvements. It doesn't inherit from Control, because that would be a huge mess, and it needs to stay that way. However, to add a GControl to a Form in the first place, it needs to inherit from Control. So, I created a new class, called GForm, that inherits from Control and draws GControls in the OnPaint method. However, it should also inherit GControl, because it needs (1) to be able to be a GControl's Parent and (2) to be able to have a GControlCollection property. The way I've made the GControlCollection is so that it must be created with a GControl as its parent. I could change how GControlCollection works, but not the Parent property. Does anyone know a way to get around that?

Here's what the property looks like:

CODE:

And a few methods (like Invalidate()) need to be called on the control's parent.

View 8 Replies

VS 2010 Cannot Connect To .mdf File (Lack Of Permissions)?

Dec 14, 2010

Just tried to create a new Data Source in VB 2010, apparently I don't have permission to connect to the 'Login.mdf' file I recently created in SQL 2008. Does anyone here have any knowledge of how to surpass this problem? I'm the Administrator of my PC and have full permissions and UAC is turned off so that shouldn't be the problem either

View 1 Replies

Looking For A Workaround For Using DatagridViewComboBoxCell Dynamically?

Nov 20, 2009

[URL]..But I can't design a solution. Could anyone try to help me out here? I know there are some workarounds to be found, but either the links are dead (check above link) or it's writter in a language I still can't read. Here's my code.

[Code]...

View 3 Replies

What Is The Equivalent Or Workaround For A Typedef

Dec 22, 2011

I am coding a VB.NET application which heavily deals with a collection type. See the code below:

[Code]....

I have to type the above line for so many times. If I changed the collection type, then I have to make the change for all the instances. So if there is a way to use "a typedef equivalent", then I can get rid of all these problems. I tried with imports, but it is only for namespaces and it can't be used for classes.

Note: I am using VB 2008, windows XP. The application type is windows forms(VB). EDIT: I made some tries based on code_gray's below answer. This is the first try.

[Code]....

View 2 Replies

IDE :: Snippets Still Lack So Much Functionality After 3 Versions Of Visual Studio?

Jun 16, 2010

Why is there such tremendous effort made on microsofts part to hide the fact that you cannot write SurroundsWith code snippets for Visual Basic, and the $end$ and $selected$ reserved words dont work in Visual Basic.

Micro$osft... YOUVE HAD 3 VERSIONS OF VISUAL STUDIO TO GET THIS WORKING... WHY THE H3LL IS IT STILL A STEAMING PILE FOR VISUAL BASIC. I HAVE TO BUY A THIRD PARTY PRODUCT TO ENABLE FUNCTIONALITY THAT YOU REFUSE TO WRITE FOR VISUAL BASIC.

Can you tell this is infuriating? I spent a TON of hours finding out about this sorely lacking functionality that you should have plastered ALL OVER your snippets documentation on MSDN. I hear you're a HORRIBLE company to work for, but should I ever need a job and have to dig at the bottom of the barrel, I think you OWE me a g.d. job now.

View 2 Replies

Event Handler For Dynamic Controls - Add An Click Event To Labels

Oct 20, 2009

Below I create an array of labels. I would like to add an click event to my labels. Can someone point me in a direction?

[Code]...

View 12 Replies

.net - Workaround - ByRef Parameter Of A Property

Mar 19, 2009

I have a legacy COM-component with an interface declaring a property like this (IDL notation):

[Code]...

This interface is implemented in a calling application written in VB6 like this:

[Code]...

Everyting works fine until I try to do the same in VB.Net. VB.Net refuses to compile code where a parameter of a property is passed ByRef. MSDN says VB.Net doesn't allow such parameters. Is there any way I could implement such a property in VB.Net?

View 3 Replies

ASP.NET: Httpwebrequest Date Header Workaround?

Jul 16, 2009

I'm trying to integrate with an API that requires the "Date" header in a web request. As you may well know, .NET has removed the ability to append or even display a default Date header in your request, so I was wondering about a workaround.Here's the catch: you can't use TCPClients because I don't have "permissions" on my server for such a thing as sockets. Is there some way to "cheat" the system to fake a date header or to trick it into posting a Date header? Or should I just give up on this API?

View 3 Replies

Sql Server - Workaround With 'Column Name Is Not Valid'?

Jan 11, 2012

there any workaround with this one?

SELECT invoices.no, customers.name, invoices.mdcode,
SUM(iproducts.unitprice * iproducts.quantity) AS total,
SUM(iproducts.unitprice * iproducts.quantity) - SUM(rinvoices.payment + rinvoices.discount)

[code].....

View 1 Replies

Workaround For Partial Method Using CodeDom?

Nov 30, 2009

I know CodeDom doesn't support partial methods, but is there a workaround? I found a workaround for C#, but I need one for VB.NET.

View 2 Replies

Design Mode Preprocessor Directive Workaround?

Jul 12, 2011

I know that there is no DESIGN, DESIGN_MODE, DESIGN_TIME, etc preprocessor directive value. However, I need something that can do the trick. I can't use a normal If statement, because in my case I need to change the inherited class so that the control renders properly at design time. If not, I'll receive an exception due to the fact that the inherited class is an abstract class.Here's what I'm looking to accomplish:

Partial Class MyCustomControl
#If DesignMode Then
Inherits UserControl
#Else
Inherits WidgetControl
#End If

View 1 Replies

Large Array = System.OutOfMemoryException Workaround?

Jan 23, 2009

I'm downloading a bunch of files from a URI but when they get big, I get an utOfMemoryException. I thought at first it was MemoryStream error but I'm pretty sure now that the error is rooted in the declaration of an array of Bytes that's too large. (Half a gig is fine, 1.7 gig is not.)

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved