Post: ⚝Gamer Choice™ How to make " Scrollbar " Tutorial C#
11-23-2016, 06:48 AM #1
Father Luckeyy
Retired - Lead Content Manager
(adsbygoogle = window.adsbygoogle || []).push({});
You must login or register to view this content.

Hi NGU Babies!!

Today i am gonna teach you guys how to create a cool " Scrollbar " on your RTM applications.

Things you will need before proceeding.

Visual Studios
Brain

Instructions designing " Scrollbar " C#

Step 1. Open up " Visual Studios "

Step 2. You will need " Timer, Panel & Label "

You must login or register to view this content.

You must login or register to view this content.

Step 3. Now under " public partial class Form1 : Form " type in " int xCounter = 0;

You must login or register to view this content.

Step 4. Now in your timer enter this coding
**Note** Set your timer interval to your preference. I use " 5 "

You must login or register to view this content.

Step 5. Now that we coded our timer, Let's make a " private void Scrollbar() "

You must login or register to view this content.

Step 6. Under " InitializeComponent(); " your gonna code " Scrollbar(); to declare the private void you just created.

You must login or register to view this content.

Step 7. Start up your application. If everything was done correctly it should turn out like this

You must login or register to view this content.

Scrollbar Tutorial Source

You must login or register to view this content.

Virus Scan

You must login or register to view this content.

Well i hope you all enjoyed my tutorial. I uploaded my tutorial source for educational purposes, If care to use this in your application (RTM) please leave credits.

The following 5 users say thank you to Father Luckeyy for this useful post:

anxify, Gryphus, H4MZ4, iAmChump, Kronos
11-23-2016, 06:50 AM #2
anxify
I am error
Originally posted by Luckeyy View Post
You must login or register to view this content.

Hi NGU Babies!!

Today i am gonna teach you guys how to create a cool " Scrollbar " on your RTM applications.

Things you will need before proceeding.

Visual Studios
Brain

Instructions designing " Scrollbar " C#

Step 1. Open up " Visual Studios "

Step 2. You will need " Timer, Panel & Label "

You must login or register to view this content.

You must login or register to view this content.

Step 3. Now under " public partial class Form1 : Form " type in " int xCounter = 0;

You must login or register to view this content.

Step 4. Now in your timer enter this coding
**Note** Set your timer interval to your preference. I use " 5 "

You must login or register to view this content.

Step 5. Now that we coded our timer, Let's make a " private void Scrollbar() "

You must login or register to view this content.

Step 6. Under " InitializeComponent(); " your gonna code " Scrollbar(); to declare the private void you just created.

You must login or register to view this content.

Step 7. Start up your application. If everything was done correctly it should turn out like this

You must login or register to view this content.

Scrollbar Tutorial Source

You must login or register to view this content.

Virus Scan

You must login or register to view this content.

Well i hope you all enjoyed my tutorial. I uploaded my tutorial source for educational purposes, If care to use this in your application (RTM) please leave credits.



Sweet! man, really digging this Winky Winky
11-23-2016, 07:31 AM #3
K51
Haxor!
Originally posted by Luckeyy View Post
You must login or register to view this content.

Hi NGU Babies!!

Today i am gonna teach you guys how to create a cool " Scrollbar " on your RTM applications.

Things you will need before proceeding.

Visual Studios
Brain

Instructions designing " Scrollbar " C#

Step 1. Open up " Visual Studios "

Step 2. You will need " Timer, Panel & Label "

You must login or register to view this content.

You must login or register to view this content.

Step 3. Now under " public partial class Form1 : Form " type in " int xCounter = 0;

You must login or register to view this content.

Step 4. Now in your timer enter this coding
**Note** Set your timer interval to your preference. I use " 5 "

You must login or register to view this content.

Step 5. Now that we coded our timer, Let's make a " private void Scrollbar() "

You must login or register to view this content.

Step 6. Under " InitializeComponent(); " your gonna code " Scrollbar(); to declare the private void you just created.

You must login or register to view this content.

Step 7. Start up your application. If everything was done correctly it should turn out like this

You must login or register to view this content.

Scrollbar Tutorial Source

You must login or register to view this content.

Virus Scan

You must login or register to view this content.

Well i hope you all enjoyed my tutorial. I uploaded my tutorial source for educational purposes, If care to use this in your application (RTM) please leave credits.



or you could simple do something like this :P

    
public void NewsBar(Label lbl, String Text, int Speed = 50, Boolean State = true)
{
System.Windows.Forms.Timer NewsTimer = new System.Windows.Forms.Timer();
if (State) NewsTimer.Start(); else NewsTimer.Stop();
NewsTimer.Interval = Speed;
NewsTimer.Tick += (a, b) =>
{
lbl.Text = Text;
lbl.Location = new Point(lbl.Location.X - 5, lbl.Location.Y);
if (lbl.Location.X < -100)
{ lbl.Location = new Point(this.Width - lbl.Width + 100, lbl.Location.Y); }
};
}


    
Now with this, you can simply do multiple Labels, as its creating a new instance of a Timer
NewsBar(label1, "This is an Example News Bar..");
Want to disable it? its simple, you can simply use a Checkbox for the last param, to check the state to true / false
NewsBar(lable1, "This is an Example News Bar #2..", 50, checkBox1.Checked);


Anyways, Nice work man. Should help some people out Smile

The following user thanked K51 for this useful post:

Father Luckeyy
11-28-2016, 08:11 AM #4
Default Avatar
Oneup
Guest
Originally posted by Luckeyy View Post
You must login or register to view this content.

Hi NGU Babies!!

Today i am gonna teach you guys how to create a cool " Scrollbar " on your RTM applications.

Things you will need before proceeding.

Visual Studios
Brain

Instructions designing " Scrollbar " C#

Step 1. Open up " Visual Studios "

Step 2. You will need " Timer, Panel & Label "

You must login or register to view this content.

You must login or register to view this content.

Step 3. Now under " public partial class Form1 : Form " type in " int xCounter = 0;

You must login or register to view this content.

Step 4. Now in your timer enter this coding
**Note** Set your timer interval to your preference. I use " 5 "

You must login or register to view this content.

Step 5. Now that we coded our timer, Let's make a " private void Scrollbar() "

You must login or register to view this content.

Step 6. Under " InitializeComponent(); " your gonna code " Scrollbar(); to declare the private void you just created.

You must login or register to view this content.

Step 7. Start up your application. If everything was done correctly it should turn out like this

You must login or register to view this content.

Scrollbar Tutorial Source

You must login or register to view this content.

Virus Scan

You must login or register to view this content.

Well i hope you all enjoyed my tutorial. I uploaded my tutorial source for educational purposes, If care to use this in your application (RTM) please leave credits.



Well when you said scroll bar I thought you meant control, what you made was a marquee
11-28-2016, 08:12 AM #5
Father Luckeyy
Retired - Lead Content Manager
Originally posted by Oneup View Post
Well when you said scroll bar I thought you meant control, what you made was a marquee


Scrollbar on application. Thats the term for it " Scrollbar "
11-28-2016, 08:14 AM #6
Default Avatar
Oneup
Guest
Originally posted by Luckeyy View Post
Scrollbar on application. Thats the term for it " Scrollbar "


No you made scrolling text, which would make it a marquee. A scroll bar would be exactly what the control in the toolbox does, it's a bar that scrolls the form / container.
11-28-2016, 08:17 AM #7
Father Luckeyy
Retired - Lead Content Manager
Originally posted by Oneup View Post
No you made scrolling text, which would make it a marquee. A scroll bar would be exactly what the control in the toolbox does, it's a bar that scrolls the form / container.


Its in a bar though a panel. On stackoverflow that was the term they used " Scrollbar "
11-28-2016, 08:22 AM #8
Default Avatar
Oneup
Guest
Originally posted by Luckeyy View Post
Its in a bar though a panel. On stackoverflow that was the term they used " Scrollbar "


If you want to get technical it's a label inside of a panel. I am not sure if you get what I am saying though. I am not saying it's bad or anything, I am just saying it's a marquee at least in the way you are presenting it, that's what it is.
11-28-2016, 08:24 AM #9
Father Luckeyy
Retired - Lead Content Manager
Originally posted by Oneup View Post
If you want to get technical it's a label inside of a panel. I am not sure if you get what I am saying though. I am not saying it's bad or anything, I am just saying it's a marquee at least in the way you are presenting it, that's what it is.


No no i get what your saying, So the proper term is " Marquee " not " Scrollbar ". Yeah your correct its a label inside of panel. Thank you for teaching me the proper terms Oneup Smile
11-28-2016, 07:55 PM #10
H4MZ4
Little One
How do you speed it up?

EDIT: haha my bad, forgot about the properties window
Last edited by H4MZ4 ; 11-28-2016 at 08:14 PM.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo