Tranzparent Form (Trackbar)



  • inwiefern?

    denke das AlphaBlendValue für dich sinnvoller ist, wobei ich nicht weiß was du vorhast.



  • Hi,

    Rostfrei[] schrieb:

    Wenn Du es schöner haben willst, dann solltest Du Dich in Regions einarbeiten.

    Vielleicht 'ne Hilfe

    mfg, Micha



  • Ohne jetzt alles gelesen zu haben, ich habs damals so gelöst:

    void __fastcall TC_Options::TrackBar1Change(TObject *Sender)
    {
        switch(TrackBar1->Position)
        {
          case 0: Form1->AlphaBlendValue = 255; break;
          case 1: Form1->AlphaBlendValue = 229.5; break;
          case 2: Form1->AlphaBlendValue = 204; break;
          case 3: Form1->AlphaBlendValue = 178,5; break;
          case 4: Form1->AlphaBlendValue = 153; break;
          case 5: Form1->AlphaBlendValue = 127,5; break;
          case 6: Form1->AlphaBlendValue = 102; break;
          case 7: Form1->AlphaBlendValue = 76,5; break;
          case 8: Form1->AlphaBlendValue = 51; break;
          case 9: Form1->AlphaBlendValue = 25,5; break;
        }
    }
    

    Grüße



  • Hallo,

    dann wärs aber einfacher die TrackBar anzupassen:

    Min = 0
    Max = 255
    Step = 25

    AlphaBlendValue = TrackBar1->Position;
    

    Aber das löst nicht das Problem dass nur das FOrm Transparent werden soll.

    mfg, Micha



  • RandomAccess85 schrieb:

    Hallo,
    Min = 0
    Max = 255
    Step = 25

    AlphaBlendValue = TrackBar1->Position;
    

    AlphaBlendValue ist unsigned char und Position ist int 😉



  • Hi,

    und?

    Set AlphaBlendValue to a value between 0 and 255 to indicate the degree of translucency when the AlphaBlend property is true. A value of 0 indicates a completely transparent window. A value of 255 indicates complete opacity.

    Tatsache ist doch dass es funktioniert :p

    mfg, Micha



  • RandomAccess85 schrieb:

    Hi,
    und?

    Set AlphaBlendValue to a value between 0 and 255 to indicate the degree of translucency when the AlphaBlend property is true. A value of 0 indicates a completely transparent window. A value of 255 indicates complete opacity.

    Tatsache ist doch dass es funktioniert :p
    mfg, Micha

    🙄
    Da steht nur, dass ein 'Wert' (kein Integer) von 0 bis 255 angegeben werden kann, sodass sich das Fenster ausblendet wenn AlphaBlend auf true ist.
    Es mag zwar gehen, also es kommt kein Fehler,
    aber passieren tut da nichts. 😉



  • Du kannst ja für jeden Button (jeden Komponenten) eine Form erstellen, die Form der Größe der Komponente anpassen und die Titelleiste ausblenden - dann hast du einen Button ohne alles drum rum 😃



  • Hi,

    Multi schrieb:

    RandomAccess85 schrieb:

    Hi,
    und?

    Set AlphaBlendValue to a value between 0 and 255 to indicate the degree of translucency when the AlphaBlend property is true. A value of 0 indicates a completely transparent window. A value of 255 indicates complete opacity.

    Tatsache ist doch dass es funktioniert :p
    mfg, Micha

    🙄
    Da steht nur, dass ein 'Wert' (kein Integer) von 0 bis 255 angegeben werden kann, sodass sich das Fenster ausblendet wenn AlphaBlend auf true ist.
    Es mag zwar gehen, also es kommt kein Fehler,
    aber passieren tut da nichts. 😉

    hast es denn mal ausprobiert? Vielleicht hab ich Augen die mich bescheißen, aber ich bin mir ziemlich sicher dass sich die Transparenz des Fensters verändert hat :p

    mfg, Micha



  • RandomAccess85 schrieb:

    Hi,

    Multi schrieb:

    aber passieren tut da nichts. 😉

    hast es denn mal ausprobiert? Vielleicht hab ich Augen die mich bescheißen, aber ich bin mir ziemlich sicher dass sich die Transparenz des Fensters verändert hat

    mhh bei mir verändert sich dort nichts 🙂


Anmelden zum Antworten