Iranian Programming Support

Welcome To Csharp TeaM Forum.
For Use All Forum Posts And See Links
Please Register
Thanks
www.Programming.MrForum.net
Csharp TeaM Administrator

Join the forum, it's quick and easy

Iranian Programming Support

Welcome To Csharp TeaM Forum.
For Use All Forum Posts And See Links
Please Register
Thanks
www.Programming.MrForum.net
Csharp TeaM Administrator

Iranian Programming Support

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Iranian Programming Support

Csharp TeaM

Top posting users this month

No user

Latest topics

» html to c# source code convert help
by launchar Tue Dec 06, 2016 7:22 am

» User input
by nesraz Sun Dec 20, 2015 8:39 am

» darkhaste source mediaplayer baraye b4a
by parham01 Tue Dec 15, 2015 10:31 am

» Tolide esme file gheire tekrari
by sajjad3011 Fri Jul 31, 2015 5:00 pm

» 368 library basic 4 android
by alimusavi71 Fri Jul 17, 2015 6:45 pm

» نرم افزار دریافت لایسنس آنتی ویروس نود 32
by programmer-x Wed Jul 15, 2015 3:19 pm

» help for java applications
by launchar Wed Jul 01, 2015 12:25 am

» Nimbuzz id Maker auto Captcha & Auto add FlooD & id BloCker
by briant Sat Jun 20, 2015 12:46 pm

» best mobile server v.1.0.0 persian edition
by programmer-x Fri Jun 19, 2015 12:41 am

» plz help me i neez xml code for spy bot
by alone Sun Mar 22, 2015 9:30 pm

» Dialogs Lib {Basic 4 Android}
by abdo0o Mon Mar 09, 2015 4:02 pm

» Room + PV Flooder Nimbuzz 2015
by sholeh Sat Feb 21, 2015 8:06 am

» PV Flooder Nimbuzz 2015
by sholeh Sat Feb 21, 2015 8:03 am

» سی شارپ سورس
by tr0 Wed Dec 24, 2014 12:15 pm

» help plz auto maker ids
by launchar Wed Dec 17, 2014 5:57 pm

» Join Multi Id To Room + Captcha [ Badbuzz Team ] In Seri Ba AgsXMPP !!
by abdo0o Fri Dec 12, 2014 4:47 am

» Amoozesh Ersale Sms Dar B4a
by abdo0o Fri Dec 12, 2014 4:43 am

» help me pls mehran brother
by launchar Wed Dec 03, 2014 6:36 pm

» plz help code Refresh captcha join Room
by ayad53 Wed Dec 03, 2014 12:24 pm

» please Help Me For AutoCaptchaa kardan IdMaker
by abdo0o Tue Dec 02, 2014 12:12 pm

» source C# bot addlist sender by ==> Alone_051@n.c
by walahazrat Mon Dec 01, 2014 2:34 am

» s2a sender tro help me pls
by walahazrat Mon Dec 01, 2014 2:28 am

» Help For {Data id } C# asixmpp.dll
by abdo0o Sun Nov 30, 2014 11:17 pm

» Help C# {Join & Left With Remoter}
by $iahi Tue Nov 25, 2014 10:31 am

» Source Nimbuzz User Searcher By Mehr,an [ Badbuzz TeaM ]
by waseemmalik Wed Nov 19, 2014 11:35 am


4 posters

    progressBar chang color

    Armin Ramzani
    Armin Ramzani
    Programmer
    Programmer


    Posts : 312
    Points : 559
    Thanks : 61
    Join date : 2014-02-25
    Age : 29
    Location : Iran , Gilan , Lahijan

    Solved progressBar chang color

    Post by Armin Ramzani Thu Jul 31, 2014 4:03 pm

    salam rahi vase avaz kardane range in progressBar hast ???

    begin lotfan

    thanx
    Emad Arta
    Emad Arta
    Csharp Admin
    Csharp Admin


    Posts : 118
    Points : 214
    Thanks : 48
    Join date : 2013-08-03
    Age : 31
    Location : Iran,Baloochestan,Iranshahr

    Solved Re: progressBar chang color

    Post by Emad Arta Thu Jul 31, 2014 4:51 pm

    Progress Bar Defaulte Khude Vs Rangi Nemishe.
    Bayad Componentesho Download Kuni To Sita Mojode.
    virus9010
    virus9010
    Administrator
    Administrator


    Posts : 275
    Points : 455
    Thanks : 142
    Join date : 2013-06-06
    Age : 29
    Location : Iran , Gilan , Astara

    Solved Re: progressBar chang color

    Post by virus9010 Fri Aug 01, 2014 3:26 am

    MComponent Coming soon ...
    Tasmim Gereftim Component Benevisim ...

    progressBar chang color 13ASQb8OW

    inam avalin Controle in Component
    2Mehdi Component
    iman saeedi
    iman saeedi
    VB & VB.Net Admin
    VB & VB.Net Admin


    Posts : 95
    Points : 201
    Thanks : 54
    Join date : 2013-06-25

    Solved Re: progressBar chang color

    Post by iman saeedi Fri Aug 01, 2014 7:09 am

    salam topolo ye module add kon bad in codaro tosh gharar bede
    Code:
    Public Class imanProgressbar
        Inherits Control

        Dim _BorderColor As Color = Color.Black
        Property BorderColor As Color
            Get
                Return _BorderColor
            End Get
            Set(ByVal value As Color)
                _BorderColor = value
                Invalidate()
            End Set
        End Property
        Private _ShowPercentage As Boolean = False
        Public Property ShowPercentage() As Boolean
            Get
                Return _ShowPercentage
            End Get
            Set(ByVal v As Boolean)
                _ShowPercentage = v
                Invalidate()
            End Set
        End Property
        Dim _ProgressColor As Color = Color.FromArgb(10, 150, 40)
        Property ProgressColor As Color
            Get
                Return _ProgressColor
            End Get
            Set(ByVal value As Color)
                _ProgressColor = value
                Invalidate()
            End Set
        End Property

        Sub New()
            SetStyle(ControlStyles.OptimizedDoubleBuffer Or ControlStyles.AllPaintingInWmPaint, True)
            DoubleBuffered = True
        End Sub

        Dim _Val As Integer = 0
        Property Value As Integer
            Get
                Return _Val
            End Get
            Set(ByVal v As Integer)
                If v <= _Max Then _Val = v Else Throw New Exception("The entered value is not valid.")
                Invalidate()
            End Set
        End Property

        Dim _Max As Integer = 100
        Property Maximum As Integer
            Get
                Return _Max
            End Get
            Set(ByVal value As Integer)
                If value >= _Val Then _Max = value Else Throw New Exception("The entered value is not valid.")
            End Set
        End Property

        Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
            Dim G As Graphics = e.Graphics
            Dim Progress As Double = (_Val / _Max) * (Width - 2)
            G.Clear(BackColor)
            G.FillRectangle(New SolidBrush(Color.FromArgb(20, Color.Black)), New Rectangle(0, 0, Width - 1, Height - 1))
            If _ShowPercentage Then
                G.DrawString(Convert.ToString(String.Concat(Value, "%")), Font, Brushes.Red, New Rectangle(0, 0, Width - 1, Height - 1), New StringFormat() With {.Alignment = StringAlignment.Center, .LineAlignment = StringAlignment.Center})
            End If
            If Progress > 0 Then G.FillRectangle(New SolidBrush(_ProgressColor), New Rectangle(1, 1, Progress, Height - 2))

            G.DrawRectangle(New Pen(_BorderColor), New Rectangle(0, 0, Width - 1, Height - 1))
            MyBase.OnPaint(e)
        End Sub
    End Class
    to ghesmate toolbox ye esm jadid miad imanProgressbar
    Emad Arta
    Emad Arta
    Csharp Admin
    Csharp Admin


    Posts : 118
    Points : 214
    Thanks : 48
    Join date : 2013-08-03
    Age : 31
    Location : Iran,Baloochestan,Iranshahr

    Solved Re: progressBar chang color

    Post by Emad Arta Fri Aug 01, 2014 7:43 am

    Converting To C#:

    Code:
    public class imanProgressbar : Control {
       
        private Color _BorderColor = Color.Black;
       
        Color BorderColor {
            get {
                return _BorderColor;
            }
            set {
                _BorderColor = value;
                Invalidate();
            }
        }
       
        private bool _ShowPercentage = false;
       
        public bool ShowPercentage {
            get {
                return _ShowPercentage;
            }
            set {
                _ShowPercentage = v;
                Invalidate();
            }
        }
       
        private Color _ProgressColor = Color.FromArgb(10, 150, 40);
       
        Color ProgressColor {
            get {
                return _ProgressColor;
            }
            set {
                _ProgressColor = value;
                Invalidate();
            }
        }
       
        imanProgressbar() {
            SetStyle((ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint), true);
            DoubleBuffered = true;
        }
       
        private int _Val = 0;
       
        int Value {
            get {
                return _Val;
            }
            set {
                if ((v <= _Max)) {
                    _Val = v;
                }
                else {
                    throw new Exception("The entered value is not valid.");
                }
                Invalidate();
            }
        }
       
        private int _Max = 100;
       
        int Maximum {
            get {
                return _Max;
            }
            set {
                if ((value >= _Val)) {
                    _Max = value;
                }
                else {
                    throw new Exception("The entered value is not valid.");
                }
            }
        }
       
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) {
            Graphics G = e.Graphics;
            double Progress = ((_Val / _Max)
                        * (Width - 2));
            G.Clear(BackColor);
            G.FillRectangle(new SolidBrush(Color.FromArgb(20, Color.Black)), new Rectangle(0, 0, (Width - 1), (Height - 1)));
            if (_ShowPercentage) {
                G.DrawString(Convert.ToString(string.Concat(Value, "%")), Font, Brushes.Red, new Rectangle(0, 0, (Width - 1), (Height - 1)), new StringFormat(), With, {, ., Alignment=StringAlignment.Center, ., LineAlignment=StringAlignment.Center);
            }
            if ((Progress > 0)) {
                G.FillRectangle(new SolidBrush(_ProgressColor), new Rectangle(1, 1, Progress, (Height - 2)));
            }
            G.DrawRectangle(new Pen(_BorderColor), new Rectangle(0, 0, (Width - 1), (Height - 1)));
            base.OnPaint(e);
        }
    }
    Armin Ramzani
    Armin Ramzani
    Programmer
    Programmer


    Posts : 312
    Points : 559
    Thanks : 61
    Join date : 2014-02-25
    Age : 29
    Location : Iran , Gilan , Lahijan

    Solved Re: progressBar chang color

    Post by Armin Ramzani Fri Aug 01, 2014 4:28 pm

    Component progressBar ro az koja mitonam peyda konam? search mikonam nist lal Help Me

    thanx Az hame
    Emad Arta
    Emad Arta
    Csharp Admin
    Csharp Admin


    Posts : 118
    Points : 214
    Thanks : 48
    Join date : 2013-08-03
    Age : 31
    Location : Iran,Baloochestan,Iranshahr

    Solved Re: progressBar chang color

    Post by Emad Arta Sat Aug 02, 2014 3:05 am

    aliqolami wrote:Component progressBar ro az koja mitonam peyda konam? search mikonam nist lal Help Me

    thanx Az hame

    Befarma Ba In Proje Mitunin Be Rahati Ye Progress Bar Rangi Va Khoshgel Tarahi Kunid.
    KHeyliyam Asun Va Ba 5 6 KHat Code.

    Download

    Sponsored content


    Solved Re: progressBar chang color

    Post by Sponsored content


      Current date/time is Thu Mar 28, 2024 4:41 pm