|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Member
Iscritto dal: Jun 2001
Città: Berghém
Messaggi: 89
|
[VB.Net] Gestione Trasparenze Label
Salve!
Sto migrando da Vb 6 a Vb.Net, e per certe cose sono ancora 1 poco imbranato ![]() ![]() Problema: in Vb 6 era prassi comume creare belle spalsh iniziali all'avvio del programma, quindi immagina super-mega ganza e label per il nome applicazione, versione programma, note legali etc etc. Per fare questo, ovviamente, le label andavano impostate con la propriete "BackStile = 0 - Transparent" Il problemino è la gestione della trasparenza in .NET! La proprietà BackStile non esiste più, e se si ricorre al help in linea per saperne di più, suggerisce di impostare il colore transparent con: System.Drawing.Color.Transparent ma l'help stesso fa osservare quanto segue: "In questo modo l'immagine di sfondo risulterà trasparente ma non rispetto ad altri controlli." Difatti Image di sfondo con label impostata come sopra non rendono lo stesso effetto della proprietà BackStile di Vb6, ma un pseudo color grigio. A questo punto non capisco: davvero in Vb.Net non è possibile impostare una trasparenza rispetto al controllo sottostante? ![]() Grazie, e scusate la lungaggine... Ciao.Net ![]()
__________________
viva il PUPO! (^_^) |
![]() |
![]() |
![]() |
#2 |
Member
Iscritto dal: Jun 2001
Città: Berghém
Messaggi: 89
|
Mi vien 1 dubbio...
Domanda troppo ardua oppure domanda troppo stupida? ![]() ![]() Il dubbio, come la speranza, resta.... Hi!
__________________
viva il PUPO! (^_^) |
![]() |
![]() |
![]() |
#3 |
Member
Iscritto dal: Jul 2002
Città: TV
Messaggi: 125
|
E' un problema conosciuto,bisogna girarci attorno per ora.
La soluzione e' tratta da internet,quindi non garantisco il funzionamento I'm trying to make the background of my linklabel transparent so a picturebox will show through it. However, if I set the link label's BackColor property to Transparent the label still has a white background. Why? Controls with a "Transparent" color actually render their parent's background, so you're seeing the White background of the Form, not the PictureBox. Three easy ways to deal with this: * Use a Panel with it's "BackgroundImage" property set instead of a PictureBox, and parent the LinkLabels to the panel (PictureBoxes generally don't have children) * Set the BackgroundImage of the Form to the image (basically the same as 1 above, but avoids the extra control) * In code, set the Parent of the LinkLabel to be the PictureBox. You'll need to update the LinkLabel's position to match the new origin of the parent if the PictureBox isn't at (0,0) |
![]() |
![]() |
![]() |
#4 |
Member
Iscritto dal: Jun 2001
Città: Berghém
Messaggi: 89
|
T'ks a lot!
Vedrò di provare le tips, poi vi farò sapere! Saluti.Ciao ![]()
__________________
viva il PUPO! (^_^) |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 02:23.