Results 1 to 4 of 4

Thread: Skinning .NET Applications made easy

  1. #1
    Phone Control Moderator zorro's Avatar
    Join Date
    Mar 2004
    Location
    Munich, Germany
    Posts
    1,902

    Skinning .NET Applications made easy

    Hi Folks,

    I've just assembled a sample to show you how easy you can add skinning to a .NET application using zControls and VisualDesigner and a few lines of code.
    Here's a screenshot:


    And here's the sample (C#) code: SkinningApp

    Note: In order to run this sample (or zControls in general), you need to have installed Managed DirectX SDK.
    Skinning to go... VisualDesigner2!

  2. #2
    Maximum Bitrate
    Join Date
    Jul 1999
    Location
    Birmingham, Alabama (War Eagle!)
    Posts
    700
    Zorro,

    Would this skin allow the use of say, reading in master volume level and displaying it in a transparent form label when the volume has changed, like a popup onscreen display? this would negate the need to show a volume percentage on most all skins for all frontends. some soundblaster cards have this ability built in, but i'm using onboard sound and was going to find a class for it for vb or c# and code this application myself, however if your class and visual skinning app allows for this already, that would be great.

  3. #3
    Phone Control Moderator zorro's Avatar
    Join Date
    Mar 2004
    Location
    Munich, Germany
    Posts
    1,902
    What you need has nothing to do with skinning.
    For your example one needs a transparent form and a color code for the bars the rest is reading and setting the volume information.

    If you're looking for such app, install MouseWheelInput and double click the mouse wheel.

    If you're looking for the audio stuff code, have a look here: http://www.codeproject.com/useritems/AudioLib.asp

    If you're looking for the code to paint such a bar, here it is:
    Code:
    private void Form1_Paint(object sender, PaintEventArgs e)
    {
    	SolidBrush brush = new SolidBrush( this.ForeColor );
    	Pen pen = new Pen(brush, 2f);
    	int width = this.Width / 20;
    
    	for(int i=0; i< 20; i++)
    	{
    		if( volume >= i)
    		{
    			e.Graphics.FillRectangle(brush, 1+i * width, 1, width - 3, this.Height - 2);
    		}
    		else
    		{
    			e.Graphics.DrawRectangle(pen, 1 + i * width, 1, width - 3, this.Height - 2);
    		}
    	}
    	brush.Dispose();
    	pen.Dispose();
    }
    Skinning to go... VisualDesigner2!

  4. #4
    Maximum Bitrate
    Join Date
    Jul 1999
    Location
    Birmingham, Alabama (War Eagle!)
    Posts
    700
    haha, thanks man, i just posted a thread in the root of this particular forum section before seeing you posted this.

Similar Threads

  1. .Net FrontEnd
    By zzachattack2 in forum Other Cool Front Ends
    Replies: 89
    Last Post: 08-18-2008, 11:59 PM
  2. Is skinning FP as easy as Winamp ??
    By Don 944 LA in forum FrodoPlayer
    Replies: 3
    Last Post: 09-27-2004, 09:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •