What are the Benefits of Learning .NET / C# and Where to Start Learning it


 What are the Benefits of Learning .NET / C# and Where to Start Learning it

In the today's world of internet, there is nothing impossible. Tens of websites offer online courses, mentoring and video tutorials that will help you to learn to program. The one the most strong and ever complete is probably Microsoft course, also available online.

What if you are the complete beginner, afraid of complicated theory, which may easily make you give up fast? We would like to make a small review of the recently launched online tutorial to learn programming in an easy and fun way.

If you are just starting to study C# programming language which is a basis to master .NET technology, one question doubtless will interest you. Why one should choose C# (.Net) and what is it capable of? What opportunities does it open for you? And actually where to start?

Here we will briefly describe what you can do using .NET. For sure, we are not aware of all the possibilities, so you are welcome to add in comments.

Microsoft has invested tremendous efforts in the development of .NET, considering it is a flagship technology. So, let's review which solutions can you create using it.

Windows Applications and Software 
 .NET has become the number one technology for Windows software development and for many years has no analogs in terms of speed and usability of development. Using .NET, you can write WinForm (GUI) applications, console applications, create reusable libraries, Windows services, graphics applications (WPF), and much more.

Web Apps
The technology that allows you to develop web solutions in .NET is called ASP.NET. ASP.NET is tailored to create web applications with rich functionality.

Games

.NET appeared to be very effective to write applications with heavy graphics. It allows you to develop games using intensive 3D graphics, not only for Windows but also for the Xbox 360 game console. The main technology that you are going to use for creating games will be Unity game engine. This is a very promising field of software development.
Mobile Applications

The version of the .NET Framework for mobile devices running on Windows Mobile is called .NET Compact Framework. Here, you won't see many of the features of the usual framework but there are special sets of libraries for mobile devices.

You can also consider using Xamarin framework and write cross-platform mobile applications using C#.

Corporate Applications

Here belong large software system platforms designed to operate in a corporate environment, such as web services, enterprise services, etc.

Programming of microcontrollers
The number of microcontrollers is tens of times larger than conventional processors. They are everywhere: in cellular and ordinary phones, televisions, monitors, microwave ovens, air conditioners, washing machines, refrigerators, MP3-players, cars, cameras ... And all of them need to be programmed. For a long time, the programming of microcontrollers was the prerogative of C and Assembler. Later it became possible to program it using some high-level languages. C# is one of them.

Programming at the system level
We have already written that using C# you can program microcontrollers. Moreover, it is possible to write an entire operating system on it! There is an operating system on managed code, it is experimental and called Microsoft Singularity.

Another question is where to start learning C# if you are a complete beginner?
In the today's world of internet, there is nothing impossible. Tens of websites offer online courses, mentoring and video tutorials that will help you to learn to program. The one the most strong and ever complete is probably Microsoft course, also available online.

What if you are the complete beginner, afraid of complicated theory, which may easily make you give up fast? We would like to make a small review of the recently launched online tutorial to learn programming in an easy and fun way.

Codeasy.net - is the interactive course for learning to program online. It is designed for absolute beginners and does not require any prior knowledge to start. It is really fun to learn from it just by reading an adventure story about fighting machines in the future. While reading you gonna will meet challenges that require real coding to solve. The final goal is to become a programmer to save the world!

Codeasy is not about immediately getting a job, it is not about going into complex details of every subject, it is all about helping people to get into coding in the easiest possible way.

You are probably wondering about the details. Let's see some features of Codeasy.
  • Basic C# course in form of adventure story mixed with the explanation of programming  principles – complete 12 chapters. 
  • Each chapter covers some topic and includes tasks to solve by coding.
  • Solving tasks (writing C# code and running it) is available after registrationdirectly in the online compiler at Codeasy. The progress is shown in each chapter.Without signup the user can still ready whole story.
  • Codeasy checks the code written by the user immediately and outputs the result. 
  • If the user can't solve the task he can use the hint for each task.
  • In case of difficulty, the user can ask Mentors in the Slack chat.
  • When the task is solved, the user can compare and see how the senior developer solved it.
  • Leaderboard – solving the tasks the user gets points and gets to the chart of leaders.
While solving the tasks user earn "viruses" – internal currency at Codeasy to spend on various features like open the next chapter, etc. The most import thing is the basic course is free!

It's rather a good way to start learning, taste programming and decide if it is for you ;-) if you still hesitate.

Perhaps, that's all. If there is anything else to add or correct, please, leave comments.

Prepared by Codeasy.net team.

What Affects your Internet Speed

Fast speed internet has more or less permeated through the country, with the exception of a few areas. But the days of dial up have gone, and with that, the days of extremely ridiculously slow internet speeds.  We subscribe to internet plans with ISPs that compete against each other, so you know you have a choice when choosing an ISP. But when you suddenly notice that your internet speed is getting worse with each passing day, and you don’t suspect your ISP, what other reasons could be the behind your slow internet speeds?

Fast speed internet has more or less permeated through the country, with the exception of a few areas. But the days of dial up have gone, and with that, the days of extremely ridiculously slow internet speeds.
We subscribe to internet plans with ISPs that compete against each other, so you know you have a choice when choosing an ISP. But when you suddenly notice that your internet speed is getting worse with each passing day, and you don’t suspect your ISP, what other reasons could be the behind your slow internet speeds?
This infographic created by BlueGadgetTooth clearly lists out ten possible reasons for your slow internet speed. Ranging from simply upgrading your internet subscription plan, to upgrading your computer to something newer that can handle the loads you place on it, or even just upgrading your wireless router to a newer model that can do the job more efficiently, many times the factors are simple reasons and the solutions to them even simpler still.
Why depend on customer service to provide the fix after endless phone calls, emails and basically hassles to just get a simple answer. With this infographic, you don’t have to wonder why. Go through the list to see the possible culprits behind your slow internet speeds, and hopefully you’ll be able to narrow down the factors to a few.
This will also help you in coming up with a viable solution.
Why go through paragraphs of endless text? I know words start fading into one another, especially when it’s to do with something I know nothing about, but an infographic? This could make me sound super smart when dealing with slow internet speed issues, just by taking ten minutes to skim through it.
Finding the solution to your slow internet speed could never be easier.

How to Convert Byte Array to String in C#

In .NET, a byte is just a number from 0 to 255 (the numbers that can be represented by eight bits). So, a byte array is just an array of the numbers from 0 to255. At a lower level, an array is a contiguous block of memory, and a byte array is just a representation of that memory in 8-bit blocks.

Let's say you have a Byte[] array loaded from a file and you need to convert it to a String.

1. Encoding's GetString
but you won't be able to get the original bytes back if those bytes have non-ASCII characters

byte[] bytes = { 130, 200, 234, 23 }; // A byte array contains non-ASCII (or non-readable) characters
string Enco = Encoding.UTF8.GetString(bytes); 
byte[] decBytes1 = Encoding.UTF8.GetBytes(Enco);  // decBytes1.Length == 10 !!
// decBytes1 not same as bytes
// Using UTF-8 or other Encoding object will get similar results

2. BitConverter.ToString
The output is a "-" delimited string, but there's no .NET built-in method to convert the string back   to byte array.

string Bitconvo = BitConverter.ToString(bytes);   // 82-C8-EA-17
String[] tempAry = Bitconvo.Split('-');
byte[] decBytes2 = new byte[tempAry.Length];
for (int i = 0; i < tempAry.Length; i++)
    decBytes2[i] = Convert.ToByte(tempAry[i], 16);
// decBytes2 same as bytes

3. Convert.ToBase64String
You can easily convert the output string back to byte array by using Convert.FromBase64String.
Note: The output string could contain '+', '/' and '='. If you want to use the string in a URL, you need to explicitly encode it.

string B64 = Convert.ToBase64String(bytes);  
byte[] decByte3 = Convert.FromBase64String(B64);
// decByte3 same as bytes

4. HttpServerUtility.UrlTokenEncode
You can easily convert the output string back to byte array by using HttpServerUtility.UrlTokenDecode. The output string is already URL friendly! The downside is it needs System.Web assembly if your project is not a web project.

string s3 = Convert.ToBase64String(bytes);  // gsjqFw==
byte[] decByte3 = Convert.FromBase64String(s3);
// decByte3 same as bytes

Credits : combo_ci

How to Make Excel Spreadsheets [.XLS &.XLSX] in C#

How to Make Excel Spreadsheets [.XLS &.XLSX] in C#

There's a library called ExcelLibrary. It's a free, open source library posted on Google Code. It's very simple, small and easy to use. Plus it has a DataSetHelper that lets you use DataSets and DataTables to easily work with Excel data.

ExcelLibrary seems to still only work for the older Excel format (.xls files), but may be adding support in the future for newer 2007/2010 formats. You can also use EPPlus, which works only for Excel 2007/2010 format files (.xlsx files).

Here are a couple links for quick reference:
ExcelLibrary - GNU Lesser GPL
EPPlus - GNU Library General Public License (LGPL)

Here's some example code for ExcelLibrary:

//create new xls file
string file = "C:\\newdoc.xls";
Workbook workbook = new Workbook();
Worksheet worksheet = new Worksheet("First Sheet");
worksheet.Cells[0, 1] = new Cell((short)1);
worksheet.Cells[2, 0] = new Cell(9999999);
worksheet.Cells[3, 3] = new Cell((decimal)3.45);
worksheet.Cells[2, 2] = new Cell("Text string");
worksheet.Cells[2, 4] = new Cell("Second string");
worksheet.Cells[4, 0] = new Cell(32764.5, "#,##0.00");
worksheet.Cells[5, 1] = new Cell(DateTime.Now, @"YYYY\-MM\-DD");
worksheet.Cells.ColumnWidth[0, 1] = 3000;
workbook.Worksheets.Add(worksheet);
workbook.Save(file);

// open xls file
Workbook book = Workbook.Load(file);
Worksheet sheet = book.Worksheets[0];

 // traverse cells
 foreach (Pair<Pair<int, int>, Cell> cell in sheet.Cells)
 {
     dgvCells[cell.Left.Right, cell.Left.Left].Value = cell.Right.Value;
 }

 // traverse rows by Index
 for (int rowIndex = sheet.Cells.FirstRowIndex;
        rowIndex <= sheet.Cells.LastRowIndex; rowIndex++)
 {
     Row row = sheet.Cells.GetRow(rowIndex);
     for (int colIndex = row.FirstColIndex;
        colIndex <= row.LastColIndex; colIndex++)
     {
         Cell cell = row.GetCell(colIndex);
     }
 }

Creating the Excel file is as easy as that. You can also manually create Excel files, but the above functionality is what really impressed me.

Credits : Mike Webb

Infolinks Review with Payment Proof 2017 | Best Adsense Alternative


Infolinks is a global advertising platform offering ad solutions for both publishers and advertisers. Online advertisers utilize the Infolinks Self-Serve Marketplace to customize their own campaign. Advertising with Infolinks means delivering brand messages to engaged users.

Online bloggers and website owners monetize their websites with Infolinks while keeping the Look & feel of their sites undisturbed.

Ad Types they Offer :

InArticle – Targets only your search traffic with ads relevant to their searched terms in non-disruptive footer ads. InFold adds navigational value and another SEO layer to your site while delivering ads pertaining to exactly what your search traffic is looking for.

 

InFold – Targets only your search traffic with ads relevant to their searched terms in non-disruptive footer ads. InFold adds navigational value and another SEO layer to your site while delivering ads pertaining to exactly what your search traffic is looking for.

InText – Double underline your best keywords to monetize your written content. A simple hover of a mouse opens an ad bubble containing an ad matched to the context of your keywords. Fully customize the look and volume of InText ads on your website pages.


InFrame – Attractive skyscraper display banners placed in the extra real estate in the margins of widescreen monitors only. These ads are matched to your website’s category and are intelligently revealed only on traffic originating from wide screen monitors and customized to fit perfectly, without disturbing your site’s layout at all.


InScreen– an interstitial ad, functions as an ‘ad intermission’ between page views. This results in well-timed display ads, driven both by user intent and website content. InScreen can be activated by three different triggers: When a user enters your site, when a user switches from one page to another inside your site and when a user leaves your site via an external link.

InTag – Presents a range of keywords relevant to the context of your site. Choose between one or two rows of links that open a relevant ad bubble upon a mouse hover. InTag manages to capture a spectrum of users’ interests and invite engagement with its range of keywords.
 

Infolinks Referral Program

Like other CPC companies, Infolinks also has a referral program. Refer new publishers to Infolinks and earn 10% of their revenue for 12 months. You can join the referral program from their Referral page. They will provide you with a Referral Link and Banners.

http://www.infolinks.com/join-us?aid=1030343

Infolinks Payment Options

  • Paypal – $50
  • eCheck – $50
  • ACH (Only for U.S. Bank Accounts)- $50
  • Payoneer – $50
  • Bank Wire Transfer – $100
  • Western Union – $100
They will send the payment within 45 days of the end of the month in which you reached the threshold.

Infolinks Payment Proof

Infolinks is a legit site, I have my payment proof. I got paid $232.78 via Wire Transfer within 35 days of the end of the month.
Here's the Picture of Wire Transfer Receipt from my Bank :

Infolinks Wire Transfer Proof Receipt - Ultimate Programming Tutorials

Infolinks Customer Support

Infolinks Customer Service  has been very good so far. Whenever I contacted them via email the  response was within 24 hours.
  

Final Thoughts

There are many ways to make money blogging, Infolinks still can be considered as one of the easiest ways. Making money from Infolinks is really easy and does not require any special skill, even a new blogger can make money by increasing website traffic.

Reference : Infolinks

How to Send SMS in C# Using GSM Modem/Dongle


How to Send SMS in C# Using GSM Modem/Dongle
This is a very simple method to send SMS via GSM Modem so without much explanations let's get into it.

Thing's you'll need :
  • GSM Modem with a SIM
  • Libraries :
    GSMCommServer.dll
    GSMCommShared.dll
    GSMCommunication.dll
    PDUConverter.dll
If you've installed the Modem software you'll be able find all the libraries needed. Just go to add Reference and add the mentioned libraries (without them this program won't work).

How to Send SMS in C# Using GSM Modem/Dongle

Now go to your form and add control as given below
  • 4 Labels :
    Label1 - Message Body :
    Label2 - Phone Number :
    Label3 - Port :
    Label4 - Modem Not Connected
  • 2 Textboxes :
    Textbox1 - To Phone Number
    Textbox2 - To Message Body
  • 1 ComboBox :
    Combobox1 - To Port :
  • 2 Buttons
    Button1 - Send
    Button2 - Connect
 Arrange your form like this :

How to Send SMS in C# Using GSM Modem/Dongle

 Now let's go to the coding

Namespaces :
 using GsmComm.GsmCommunication;  
 using GsmComm.PduConverter;  
 using GsmComm.Server;  

Add this above Public Form1 :

 private GsmCommMain comm;  

Form1_Load :
 Combobox1.Items.Add("COM1");  
 Combobox1.Items.Add("COM2");  
 Combobox1.Items.Add("COM3");  
 Combobox1.Items.Add("COM4");  
 Combobox1.Items.Add("COM5");  

Button2_Click :
 if (Combobox1.Text == "")  
       {  
         MessageBox.Show("Invalid Port Name");  
         return;  
       }  
       comm = new GsmCommMain(Combobox1.Text, 9600, 150);  
       Cursor.Current = Cursors.Default;  
       bool retry;  
       do  
       {  
         retry = false;  
         try  
         {  
           Cursor.Current = Cursors.WaitCursor;  
           comm.Open();  
           MessageBox.Show("Modem Connected Sucessfully");  
           Button2.Enabled = false;  
           label4.Text = "Modem is connected";  
         }  
         catch (Exception)  
         {  
           Cursor.Current = Cursors.Default;  
           if (MessageBox.Show(this, "GSM Modem is not available", "Check",  
             MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning) == DialogResult.Retry)  
             retry = true;  
           else  
           { return; }  
         }  
       }  
       while (retry);  

Button1_Click :
 try  
       {  
         Cursor.Current = Cursors.WaitCursor;  
         SmsSubmitPdu pdu;  
           Cursor.Current = Cursors.Default;  
           byte dcs = (byte)DataCodingScheme.GeneralCoding.Alpha7BitDefault;  
           pdu = new SmsSubmitPdu(Textbox2.Text, Textbox1.Text);  
           int times = 1;  
           for (int i = 0; i < times; i++)  
           {  
             comm.SendMessage(pdu);  
           }  
         MessageBox.Show("Message Sent Succesfully","Success",MessageBoxButtons.OK,MessageBoxIcon.Information);  
       }  
       catch(Exception ex)  
       {  
         MessageBox.Show(ex.Message.ToString());  
       }  

That's all, Do share your comments.


Credits : Rotich

Circle Progress Bar Control for VB.NET

Add a new User Control and add these codes in it :

   Dim _Myrr As Integer  
   Public Property rr As Integer  
     Set(value As Integer)  
       _Myrr = value  
     End Set  
     Get  
       Return _Myrr  
     End Get  
   End Property  
   Private Sub DrawProgress(g As Graphics, rect As Rectangle, percentage As Single)  
     'work out the angles for each arc  
     Dim progressAngle = CSng(360 / 100 * percentage)  
     Dim remainderAngle = 360 - progressAngle  
     'create pens to use for the arcs  
     Using progressPen As New Pen(Color.LightSeaGreen, 2), remainderPen As New Pen(Color.LightGray, 2)  
       'set the smoothing to high quality for better output  
       g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias  
       'draw the blue and white arcs  
       g.DrawArc(progressPen, rect, -90, progressAngle)  
       g.DrawArc(remainderPen, rect, progressAngle - 90, remainderAngle)  
     End Using  
     'draw the text in the centre by working out how big it is and adjusting the co-ordinates accordingly  
     Using fnt As New Font(Me.Font.FontFamily, 14)  
       Dim text As String = percentage.ToString + "%"  
       Dim textSize = g.MeasureString(text, fnt)  
       Dim textPoint As New Point(CInt(rect.Left + (rect.Width / 2) - (textSize.Width / 2)), CInt(rect.Top + (rect.Height / 2) - (textSize.Height / 2)))  
       'now we have all the values draw the text  
       g.DrawString(text, fnt, Brushes.Black, textPoint)  
     End Using  
   End Sub  
   Private Sub UserControl1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint  
     DrawProgress(e.Graphics, New Rectangle(5, 5, 60, 60), _Myrr)  
   End Sub  

Don't forget to add these two namespaces :

 Imports System.Drawing  
 Imports System.Windows.Forms  

 Now Build your project and then check your ToolBox you'll see a new Tool

That's our Circle Progress Bar!
Now add our Progress Bar, a Timer and a Button.

Timer1_Tick Code :

     If UPT >= 100 Then  
       UPT = 0  
     Else  
       UPT = UPT + 1  
     End If  
     UserControl11.rr = UPT  
     UserControl11.Invalidate()  
     UserControl11.Update()  
     UserControl11.Refresh()  

Button1_Click Code :

   Timer1.Enabled = True  

Under Public Class add this Integer

   Public UPT As Integer  

That's it, it should work fine now...


This is just an example of a Circle Progress Bar I found online, do comment your suggestions.

How to Make Windows / Android / iOS Apps Using Xamarin Platform


Before writing applications, you’ll need to install the Xamarin platform on your Mac,PC, or both (if you’re using that setup)

See the articles on the Xamarin website at:

Creating an iOS App
If you’re interested in using Xamarin.Forms to target the iPhone, first become familiar with the appropriate Getting Started documents on the Xamarin website: 

This will give you guidance on using the Xamarin.iOS library to develop an iPhone application in C#. All you really need to do is get to the point where you can build and deploy a simple iPhone application on either a real iPhone or the iPhone simulator.


If you’re using Visual Studio, and if everything is installed correctly, you should be able to select File > New > Project from the menu, and in the New Project dialog, from the left select Visual C# and iOS and then Universal (which refers to targeting both iPhone and iPad), and from the template list in
the center, select Blank App (iOS).


If you’re using Xamarin Studio, you should be able to select File > New > Solution from the menu, and in the New Project dialog, from the left, select iOS and then App, and from the template list in the center, select Single View App. 


In either case, select a location and name for the solution. Build and deploy the skeleton application created in the project. If you’re having a problem with this, it’s not a Xamarin.Forms issue. You might want to check the Xamarin.iOS forums to see if anybody else has a similar problem: 
http://forums.xamarin.com/categories/ios/ 

Creating an Android App

If you’re interested in using Xamarin.Forms to target Android devices, first become familiar with the Getting Started documents on the Xamarin website: 

https://developer.xamarin.com/guides/android/getting_started/ 


If you’re using Visual Studio, and if everything is installed correctly, you should be able to select File > New > Project from the menu, and in the New Project dialog, from the left, select Visual C# and then Android, and from the template list in the center, select Blank App (Android). 


If you’re using Xamarin Studio, you should be able to select File > New > Solution from the menu, and in the New Project dialog, from the left, select Android and App, and in the template list in the center, select Android App. 


Give it a location and a name; build and deploy. If you can’t get this process to work, it’s not a Xamarin.Forms issue, and you might want to check the Xamarin.Android forums for a similar problem: 


http://forums.xamarin.com/categories/android/ 


Creating a Windows App

If you’re interested in using Xamarin.Forms to target Windows, Windows Phone, or Windows 10 Mobile, you’ll need to become familiar with at least the rudiments of using Visual Studio to develop  Windows applications: 

http://dev.windows.com/ 


In Visual Studio 2017, if everything is installed correctly, you should be able select File > New > Project from the menu, and in the New Project dialog, at the left, select Visual C# and Windows. You’ll see a hierarchy under the Windows heading something like this:



.
The first Universal heading under Windows is for creating a Universal Windows Platform application that can target either Windows 10 or Windows 10 Mobile. Select that, and from the center area select Blank App (Universal Windows) to create a UWP app.  

The other two project types supported by Xamarin.Forms are under the Windows 8 header. The Universal item actually creates two projects—a Windows desktop application and a Windows Phone application with some shared code. For creating just a Windows application, choose Windows and then from the center section Blank App (Windows 8.1). For a Windows Phone application, choose Windows Phone and Blank App This creates a project that targets Windows Phone 8.1. 

These are the three project types supported by Xamarin.Forms.

You should be able to build and deploy the skeleton application to the desktop or to a real phone or an emulator. If not, search the Microsoft website or online forums such as Stack Overflow. 

All ready? If you can build Xamarin.iOS, Xamarin.Android, and Windows applications (or some subset of those), then you’re ready to create your first Xamarin.Forms application. It’s time to say “Hello, Xamarin.Forms” to a new era in cross-platform mobile development. 


Credits : Microsoft Press

How to Get FireFox Theme in VB.NET


Just add a New Class and Copy & Past all these codes in it

 ' Firefox Theme.  
 ' Made by AeroRev9.  
 ' 25/07/2015.  
 ' Updated : 29/07/2015 [2].  
 ' Credits : Mavaamarten, Xertz.  
 Imports System.ComponentModel  
 Imports System.Drawing.Drawing2D  
 Imports System.Drawing.Text  
 Module Theme  
   Public ReadOnly Property GlobalFont(B As FontStyle, S As Integer) As Font  
     Get  
       Return New Font("Segoe UI", S, B)  
     End Get  
   End Property  
   Public Function GetCheckMark() As String  
     Return "iVBORw0KGgoAAAANSUhEUgAAABMAAAAQCAYAAAD0xERiAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEySURBVDhPY/hPRUBdw/79+/efVHz77bf/X37+wRAn2bDff/7+91l+83/YmtsYBpJs2ITjz/8rTbrwP2Dlrf9XXn5FkSPJsD13P/y3nHsVbNjyy28w5Ik27NWXX//TNt8DG1S19zFWNRiGvfzy8//ccy9RxEB4wvFnYIMMZl7+//brLwx5EEYx7MP33/9dF18Ha1py8RVcHBR7mlMvgsVXX8X0Hgwz/P379z8yLtz5AKxJdcpFcBj9+v3nf/CqW2Cx5E13UdSiYwzDvv36/d9/BUSzzvRL/0t2PQSzQd57+vEHilp0jGEYCJ9+8hnuGhiee+4Vhjp0jNUwEN566/1/m/mQZJC/48H/zz9+YVWHjHEaBsKgwAZ59eH771jl0TFew0D48osvWMWxYYKGEY///gcAqiuA6kEmfEMAAAAASUVORK5CYII="  
   End Function  
 End Module  
 Module Helpers  
   Public Enum MouseState As Byte  
     None = 0  
     Over = 1  
     Down = 2  
   End Enum  
   Public Function FullRectangle(S As Size, Subtract As Boolean) As Rectangle  
     If Subtract Then  
       Return New Rectangle(0, 0, S.Width - 1, S.Height - 1)  
     Else  
       Return New Rectangle(0, 0, S.Width, S.Height)  
     End If  
   End Function  
   Public Function GreyColor(G As UInteger) As Color  
     Return Color.FromArgb(G, G, G)  
   End Function  
   Public Sub CenterString(G As Graphics, T As String, F As Font, C As Color, R As Rectangle)  
     Dim TS As SizeF = G.MeasureString(T, F)  
     Using B As New SolidBrush(C)  
       G.DrawString(T, F, B, New Point(R.Width / 2 - (TS.Width / 2), R.Height / 2 - (TS.Height / 2)))  
     End Using  
   End Sub  
   Public Sub FillRoundRect(G As Graphics, R As Rectangle, Curve As Integer, C As Color)  
     Using B As New SolidBrush(C)  
       G.FillPie(B, R.X, R.Y, Curve, Curve, 180, 90)  
       G.FillPie(B, R.X + R.Width - Curve, R.Y, Curve, Curve, 270, 90)  
       G.FillPie(B, R.X, R.Y + R.Height - Curve, Curve, Curve, 90, 90)  
       G.FillPie(B, R.X + R.Width - Curve, R.Y + R.Height - Curve, Curve, Curve, 0, 90)  
       G.FillRectangle(B, CInt(R.X + Curve / 2), R.Y, R.Width - Curve, CInt(Curve / 2))  
       G.FillRectangle(B, R.X, CInt(R.Y + Curve / 2), R.Width, R.Height - Curve)  
       G.FillRectangle(B, CInt(R.X + Curve / 2), CInt(R.Y + R.Height - Curve / 2), R.Width - Curve, CInt(Curve / 2))  
     End Using  
   End Sub  
   Public Sub DrawRoundRect(G As Graphics, R As Rectangle, Curve As Integer, C As Color)  
     Using P As New Pen(C)  
       G.DrawArc(P, R.X, R.Y, Curve, Curve, 180, 90)  
       G.DrawLine(P, CInt(R.X + Curve / 2), R.Y, CInt(R.X + R.Width - Curve / 2), R.Y)  
       G.DrawArc(P, R.X + R.Width - Curve, R.Y, Curve, Curve, 270, 90)  
       G.DrawLine(P, R.X, CInt(R.Y + Curve / 2), R.X, CInt(R.Y + R.Height - Curve / 2))  
       G.DrawLine(P, CInt(R.X + R.Width), CInt(R.Y + Curve / 2), CInt(R.X + R.Width), CInt(R.Y + R.Height - Curve / 2))  
       G.DrawLine(P, CInt(R.X + Curve / 2), CInt(R.Y + R.Height), CInt(R.X + R.Width - Curve / 2), CInt(R.Y + R.Height))  
       G.DrawArc(P, R.X, R.Y + R.Height - Curve, Curve, Curve, 90, 90)  
       G.DrawArc(P, R.X + R.Width - Curve, R.Y + R.Height - Curve, Curve, Curve, 0, 90)  
     End Using  
   End Sub  
   Public Sub CenterStringTab(G As Graphics, text As String, font As Font, brush As Brush, rect As Rectangle, Optional shadow As Boolean = False, Optional yOffset As Integer = 0)  
     Dim textSize As SizeF = G.MeasureString(text, font)  
     Dim textX As Integer = rect.X + (rect.Width / 2) - (textSize.Width / 2)  
     Dim textY As Integer = rect.Y + (rect.Height / 2) - (textSize.Height / 2) + yOffset  
     If shadow Then G.DrawString(text, font, Brushes.Black, textX + 1, textY + 1)  
     G.DrawString(text, font, brush, textX, textY + 1)  
   End Sub  
 End Module  
 <DefaultEvent("CheckedChanged")>  
 Class FirefoxRadioButton  
   Inherits Control  
 #Region " Public "  
   Public Event CheckedChanged(sender As Object, e As EventArgs)  
 #End Region  
 #Region " Private "  
   Private State As MouseState  
   Private ETC As Color = Nothing  
   Private G As Graphics  
   Private _EnabledCalc As Boolean  
   Private _Checked As Boolean  
   Private _Bold As Boolean  
 #End Region  
 #Region " Properties "  
   Public Property Checked As Boolean  
     Get  
       Return _Checked  
     End Get  
     Set(value As Boolean)  
       _Checked = value  
       Invalidate()  
     End Set  
   End Property  
   Public Shadows Property Enabled As Boolean  
     Get  
       Return EnabledCalc  
     End Get  
     Set(value As Boolean)  
       _EnabledCalc = value  
       Invalidate()  
     End Set  
   End Property  
   <DisplayName("Enabled")>  
   Public Property EnabledCalc As Boolean  
     Get  
       Return _EnabledCalc  
     End Get  
     Set(value As Boolean)  
       Enabled = value  
       Invalidate()  
     End Set  
   End Property  
   Public Property Bold As Boolean  
     Get  
       Return _Bold  
     End Get  
     Set(value As Boolean)  
       _Bold = value  
       Invalidate()  
     End Set  
   End Property  
 #End Region  
 #Region " Control "  
   Sub New()  
     DoubleBuffered = True  
     ForeColor = Color.FromArgb(66, 78, 90)  
     Font = GlobalFont(FontStyle.Regular, 10)  
     Size = New Size(160, 27)  
     Enabled = True  
   End Sub  
   Protected Overrides Sub OnPaint(e As PaintEventArgs)  
     G = e.Graphics  
     G.SmoothingMode = SmoothingMode.HighQuality  
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit  
     MyBase.OnPaint(e)  
     G.Clear(Parent.BackColor)  
     If Enabled Then  
       ETC = Color.FromArgb(66, 78, 90)  
       Select Case State  
         Case MouseState.Over, MouseState.Down  
           Using P As New Pen(Color.FromArgb(34, 146, 208))  
             G.DrawEllipse(P, New Rectangle(2, 2, 22, 22))  
           End Using  
         Case Else  
           Using P As New Pen(GreyColor(190))  
             G.DrawEllipse(P, New Rectangle(2, 2, 22, 22))  
           End Using  
       End Select  
       If Checked Then  
         Using B As New SolidBrush(Color.FromArgb(34, 146, 208))  
           G.FillEllipse(B, New Rectangle(7, 7, 12, 12))  
         End Using  
       End If  
     Else  
       ETC = GreyColor(170)  
       Using P As New Pen(GreyColor(210))  
         G.DrawEllipse(P, New Rectangle(2, 2, 22, 22))  
       End Using  
       If Checked Then  
         Using B As New SolidBrush(Color.FromArgb(34, 146, 208))  
           G.FillEllipse(B, New Rectangle(7, 7, 12, 12))  
         End Using  
       End If  
     End If  
     Using B As New SolidBrush(ETC)  
       If Bold Then  
         G.DrawString(Text, GlobalFont(FontStyle.Bold, 10), B, New Point(32, 4))  
       Else  
         G.DrawString(Text, GlobalFont(FontStyle.Regular, 10), B, New Point(32, 4))  
       End If  
     End Using  
   End Sub  
   Protected Overrides Sub OnMouseDown(e As MouseEventArgs)  
     MyBase.OnMouseDown(e)  
     State = MouseState.Down : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseUp(e As MouseEventArgs)  
     MyBase.OnMouseUp(e)  
     If Enabled Then  
       If Not Checked Then  
         For Each C As Control In Parent.Controls  
           If TypeOf C Is FirefoxRadioButton Then  
             DirectCast(C, FirefoxRadioButton).Checked = False  
           End If  
         Next  
       End If  
       Checked = True  
       RaiseEvent CheckedChanged(Me, e)  
     End If  
     State = MouseState.Over : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseEnter(e As EventArgs)  
     MyBase.OnMouseEnter(e)  
     State = MouseState.Over : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseLeave(e As EventArgs)  
     MyBase.OnMouseLeave(e)  
     State = MouseState.None : Invalidate()  
   End Sub  
 #End Region  
 End Class  
 <DefaultEvent("CheckedChanged")>  
 Class FirefoxCheckBox  
   Inherits Control  
 #Region " Public "  
   Public Event CheckedChanged(sender As Object, e As EventArgs)  
 #End Region  
 #Region " Private "  
   Private State As MouseState  
   Private ETC As Color = Nothing  
   Private G As Graphics  
   Private _EnabledCalc As Boolean  
   Private _Checked As Boolean  
   Private _Bold As Boolean  
 #End Region  
 #Region " Properties "  
   Public Property Checked As Boolean  
     Get  
       Return _Checked  
     End Get  
     Set(value As Boolean)  
       _Checked = value  
       Invalidate()  
     End Set  
   End Property  
   Public Shadows Property Enabled As Boolean  
     Get  
       Return EnabledCalc  
     End Get  
     Set(value As Boolean)  
       _EnabledCalc = value  
       Invalidate()  
     End Set  
   End Property  
   <DisplayName("Enabled")>  
   Public Property EnabledCalc As Boolean  
     Get  
       Return _EnabledCalc  
     End Get  
     Set(value As Boolean)  
       Enabled = value  
       Invalidate()  
     End Set  
   End Property  
   Public Property Bold As Boolean  
     Get  
       Return _Bold  
     End Get  
     Set(value As Boolean)  
       _Bold = value  
       Invalidate()  
     End Set  
   End Property  
 #End Region  
 #Region " Control "  
   Sub New()  
     DoubleBuffered = True  
     ForeColor = Color.FromArgb(66, 78, 90)  
     Font = GlobalFont(FontStyle.Regular, 10)  
     Size = New Size(160, 27)  
     Enabled = True  
   End Sub  
   Protected Overrides Sub OnPaint(e As PaintEventArgs)  
     G = e.Graphics  
     G.SmoothingMode = SmoothingMode.HighQuality  
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit  
     MyBase.OnPaint(e)  
     G.Clear(Parent.BackColor)  
     If Enabled Then  
       ETC = Color.FromArgb(66, 78, 90)  
       Select Case State  
         Case MouseState.Over, MouseState.Down  
           DrawRoundRect(G, New Rectangle(3, 3, 20, 20), 3, Color.FromArgb(44, 156, 218))  
         Case Else  
           DrawRoundRect(G, New Rectangle(3, 3, 20, 20), 3, GreyColor(200))  
       End Select  
       If Checked Then  
         Using I As Image = Image.FromStream(New IO.MemoryStream(Convert.FromBase64String(GetCheckMark)))  
           G.DrawImage(I, New Point(4, 5))  
         End Using  
       End If  
     Else  
       ETC = GreyColor(170)  
       DrawRoundRect(G, New Rectangle(3, 3, 20, 20), 3, GreyColor(220))  
       If Checked Then  
         Using I As Image = Image.FromStream(New IO.MemoryStream(Convert.FromBase64String(GetCheckMark)))  
           G.DrawImage(I, New Point(4, 5))  
         End Using  
       End If  
     End If  
     Using B As New SolidBrush(ETC)  
       If Bold Then  
         G.DrawString(Text, GlobalFont(FontStyle.Bold, 10), B, New Point(32, 4))  
       Else  
         G.DrawString(Text, GlobalFont(FontStyle.Regular, 10), B, New Point(32, 4))  
       End If  
     End Using  
   End Sub  
   Protected Overrides Sub OnMouseDown(e As MouseEventArgs)  
     MyBase.OnMouseDown(e)  
     State = MouseState.Down : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseUp(e As MouseEventArgs)  
     MyBase.OnMouseUp(e)  
     If Enabled Then  
       Checked = Not Checked  
       RaiseEvent CheckedChanged(Me, e)  
     End If  
     State = MouseState.Over : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseEnter(e As EventArgs)  
     MyBase.OnMouseEnter(e)  
     State = MouseState.Over : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseLeave(e As EventArgs)  
     MyBase.OnMouseLeave(e)  
     State = MouseState.None : Invalidate()  
   End Sub  
 #End Region  
 End Class  
 Class FirefoxH1  
   Inherits Label  
 #Region " Private "  
   Private G As Graphics  
 #End Region  
 #Region " Control "  
   Sub New()  
     DoubleBuffered = True  
     AutoSize = False  
     Font = New Font("Segoe UI Semibold", 20)  
     ForeColor = Color.FromArgb(76, 88, 100)  
   End Sub  
   Protected Overrides Sub OnPaint(e As PaintEventArgs)  
     G = e.Graphics  
     G.SmoothingMode = SmoothingMode.HighQuality  
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit  
     MyBase.OnPaint(e)  
     Using P As New Pen(GreyColor(200))  
       G.DrawLine(P, New Point(0, 50), New Point(Width, 50))  
     End Using  
   End Sub  
 #End Region  
 End Class  
 Class FirefoxH2  
   Inherits Label  
 #Region " Control "  
   Sub New()  
     Font = GlobalFont(FontStyle.Bold, 10)  
     ForeColor = Color.FromArgb(76, 88, 100)  
     BackColor = Color.White  
   End Sub  
 #End Region  
 End Class  
 Class FirefoxButton  
   Inherits Control  
 #Region " Private "  
   Private State As MouseState  
   Private ETC As Color = Nothing  
   Private G As Graphics  
   Private _EnabledCalc As Boolean  
 #End Region  
 #Region " Properties "  
   Public Shadows Property Enabled As Boolean  
     Get  
       Return EnabledCalc  
     End Get  
     Set(value As Boolean)  
       _EnabledCalc = value  
       Invalidate()  
     End Set  
   End Property  
   <DisplayName("Enabled")>  
   Public Property EnabledCalc As Boolean  
     Get  
       Return _EnabledCalc  
     End Get  
     Set(value As Boolean)  
       Enabled = value  
       Invalidate()  
     End Set  
   End Property  
 #End Region  
 #Region " Control "  
   Sub New()  
     DoubleBuffered = True  
     Enabled = True  
     ForeColor = Color.FromArgb(56, 68, 80)  
     Font = GlobalFont(FontStyle.Regular, 10)  
   End Sub  
   Protected Overrides Sub OnPaint(e As PaintEventArgs)  
     G = e.Graphics  
     G.SmoothingMode = SmoothingMode.HighQuality  
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit  
     MyBase.OnPaint(e)  
     G.Clear(Parent.BackColor)  
     If Enabled Then  
       ETC = Color.FromArgb(56, 68, 80)  
       Select Case State  
         Case MouseState.None  
           Using B As New SolidBrush(GreyColor(245))  
             G.FillRectangle(B, New Rectangle(1, 1, Width - 2, Height - 2))  
           End Using  
           DrawRoundRect(G, FullRectangle(Size, True), 2, GreyColor(193))  
         Case MouseState.Over  
           Using B As New SolidBrush(GreyColor(232))  
             G.FillRectangle(B, New Rectangle(1, 1, Width - 2, Height - 2))  
           End Using  
           DrawRoundRect(G, FullRectangle(Size, True), 2, GreyColor(193))  
         Case Else  
           Using B As New SolidBrush(GreyColor(212))  
             G.FillRectangle(B, New Rectangle(1, 1, Width - 2, Height - 2))  
           End Using  
           DrawRoundRect(G, FullRectangle(Size, True), 2, GreyColor(193))  
       End Select  
     Else  
       ETC = GreyColor(170)  
       Using B As New SolidBrush(GreyColor(245))  
         G.FillRectangle(B, New Rectangle(1, 1, Width - 2, Height - 2))  
       End Using  
       DrawRoundRect(G, FullRectangle(Size, True), 2, GreyColor(223))  
     End If  
     CenterString(G, Text, GlobalFont(FontStyle.Regular, 10), ETC, FullRectangle(Size, False))  
   End Sub  
   Protected Overrides Sub OnMouseUp(e As MouseEventArgs)  
     MyBase.OnMouseUp(e)  
     State = MouseState.Over : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseDown(e As MouseEventArgs)  
     MyBase.OnMouseUp(e)  
     State = MouseState.Down : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseEnter(e As EventArgs)  
     MyBase.OnMouseEnter(e)  
     State = MouseState.Over : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseLeave(e As EventArgs)  
     MyBase.OnMouseEnter(e)  
     State = MouseState.None : Invalidate()  
   End Sub  
 #End Region  
 End Class  
 Class FirefoxRedirect  
   Inherits Control  
 #Region " Private "  
   Private State As MouseState  
   Private G As Graphics  
   Private FC As Color = Nothing  
   Private FF As Font = Nothing  
 #End Region  
 #Region " Control "  
   Sub New()  
     DoubleBuffered = True  
     Cursor = Cursors.Hand  
     BackColor = Color.White  
   End Sub  
   Protected Overrides Sub OnPaint(e As PaintEventArgs)  
     G = e.Graphics  
     G.SmoothingMode = SmoothingMode.HighQuality  
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit  
     MyBase.OnPaint(e)  
     Select Case State  
       Case MouseState.Over  
         FC = Color.FromArgb(23, 140, 229)  
         FF = GlobalFont(FontStyle.Underline, 10)  
       Case MouseState.Down  
         FC = Color.FromArgb(255, 149, 0)  
         FF = GlobalFont(FontStyle.Regular, 10)  
       Case Else  
         FC = Color.FromArgb(0, 149, 221)  
         FF = GlobalFont(FontStyle.Regular, 10)  
     End Select  
     Using B As New SolidBrush(FC)  
       G.DrawString(Text, FF, B, New Point(0, 0))  
     End Using  
   End Sub  
   Protected Overrides Sub OnMouseUp(e As MouseEventArgs)  
     MyBase.OnMouseUp(e)  
     State = MouseState.Over : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseDown(e As MouseEventArgs)  
     MyBase.OnMouseUp(e)  
     State = MouseState.Down : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseEnter(e As EventArgs)  
     MyBase.OnMouseEnter(e)  
     State = MouseState.Over : Invalidate()  
   End Sub  
   Protected Overrides Sub OnMouseLeave(e As EventArgs)  
     MyBase.OnMouseEnter(e)  
     State = MouseState.None : Invalidate()  
   End Sub  
 #End Region  
 End Class  
 Class FirefoxSubTabControl  
   Inherits TabControl  
 #Region " Private "  
   Private G As Graphics  
   Private TabRect As Rectangle  
 #End Region  
 #Region " Control "  
   Sub New()  
     DoubleBuffered = True  
     Alignment = TabAlignment.Top  
   End Sub  
   Protected Overrides Sub OnCreateControl()  
     MyBase.OnCreateControl()  
     SetStyle(ControlStyles.UserPaint, True)  
     ItemSize = New Size(100, 40)  
     SizeMode = TabSizeMode.Fixed  
   End Sub  
   Protected Overrides Sub OnControlAdded(e As ControlEventArgs)  
     MyBase.OnControlAdded(e)  
     Try  
       For i As Integer = 0 To TabPages.Count - 1  
         TabPages(i).BackColor = Color.White  
         TabPages(i).ForeColor = Color.FromArgb(66, 79, 90)  
         TabPages(i).Font = GlobalFont(FontStyle.Regular, 10)  
       Next  
     Catch  
     End Try  
   End Sub  
   Protected Overrides Sub OnPaint(e As PaintEventArgs)  
     G = e.Graphics  
     G.SmoothingMode = SmoothingMode.HighQuality  
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit  
     MyBase.OnPaint(e)  
     G.Clear(Parent.BackColor)  
     For i As Integer = 0 To TabPages.Count - 1  
       TabRect = GetTabRect(i)  
       If GetTabRect(i).Contains(Me.PointToClient(Cursor.Position)) And Not SelectedIndex = i Then  
         Using B As New SolidBrush(GreyColor(240))  
           G.FillRectangle(B, New Rectangle(GetTabRect(i).Location.X - 2, GetTabRect(i).Location.Y - 2, GetTabRect(i).Width, GetTabRect(i).Height + 1))  
         End Using  
       ElseIf SelectedIndex = i Then  
         Using B As New SolidBrush(GreyColor(240))  
           G.FillRectangle(B, New Rectangle(GetTabRect(i).Location.X - 2, GetTabRect(i).Location.Y - 2, GetTabRect(i).Width, GetTabRect(i).Height + 1))  
         End Using  
         Using P As New Pen(Color.FromArgb(255, 149, 0), 4)  
           G.DrawLine(P, New Point(TabRect.X - 2, TabRect.Y + ItemSize.Height - 2), New Point(TabRect.X + TabRect.Width - 2, TabRect.Y + ItemSize.Height - 2))  
         End Using  
       ElseIf Not SelectedIndex = i Then  
         G.FillRectangle(Brushes.White, GetTabRect(i))  
       End If  
       Using B As New SolidBrush(Color.FromArgb(56, 69, 80))  
         CenterStringTab(G, TabPages(i).Text, GlobalFont(FontStyle.Regular, 10), B, GetTabRect(i))  
       End Using  
     Next  
     Using P As New Pen(GreyColor(200))  
       G.DrawLine(P, New Point(0, ItemSize.Height + 2), New Point(Width, ItemSize.Height + 2))  
     End Using  
   End Sub  
 #End Region  
 End Class  
 Class FirefoxMainTabControl  
   Inherits TabControl  
 #Region " Private "  
   Private G As Graphics  
   Private TabRect As Rectangle  
   Private FC As Color = Nothing  
 #End Region  
 #Region " Control "  
   Sub New()  
     DoubleBuffered = True  
     ItemSize = New Size(43, 152)  
     Alignment = TabAlignment.Left  
     SizeMode = TabSizeMode.Fixed  
   End Sub  
   Protected Overrides Sub OnCreateControl()  
     MyBase.OnCreateControl()  
     SetStyle(ControlStyles.UserPaint, True)  
   End Sub  
   Protected Overrides Sub OnControlAdded(e As ControlEventArgs)  
     MyBase.OnControlAdded(e)  
     Try  
       For i As Integer = 0 To TabPages.Count - 1  
         TabPages(i).BackColor = Color.White  
         TabPages(i).ForeColor = Color.FromArgb(66, 79, 90)  
         TabPages(i).Font = GlobalFont(FontStyle.Regular, 10)  
       Next  
     Catch  
     End Try  
   End Sub  
   Protected Overrides Sub OnPaint(e As PaintEventArgs)  
     G = e.Graphics  
     G.SmoothingMode = SmoothingMode.HighQuality  
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit  
     MyBase.OnPaint(e)  
     G.Clear(Color.FromArgb(66, 79, 90))  
     For i As Integer = 0 To TabPages.Count - 1  
       TabRect = GetTabRect(i)  
       If SelectedIndex = i Then  
         Using B As New SolidBrush(Color.FromArgb(52, 63, 72))  
           G.FillRectangle(B, TabRect)  
         End Using  
         FC = GreyColor(245)  
         Using B As New SolidBrush(Color.FromArgb(255, 175, 54))  
           G.FillRectangle(B, New Rectangle(TabRect.Location.X - 3, TabRect.Location.Y + 1, 5, TabRect.Height - 2))  
         End Using  
       Else  
         FC = GreyColor(192)  
         Using B As New SolidBrush(Color.FromArgb(66, 79, 90))  
           G.FillRectangle(B, TabRect)  
         End Using  
       End If  
       Using B As New SolidBrush(FC)  
         G.DrawString(TabPages(i).Text, GlobalFont(FontStyle.Regular, 10), B, New Point(TabRect.X + 50, TabRect.Y + 12))  
       End Using  
       If Not IsNothing(ImageList) Then  
         If Not TabPages(i).ImageIndex < 0 Then  
           G.DrawImage(ImageList.Images(TabPages(i).ImageIndex), New Rectangle(TabRect.X + 19, TabRect.Y + ((TabRect.Height / 2) - 10), 18, 18))  
         End If  
       End If  
     Next  
   End Sub  
 #End Region  
 End Class  
 <DefaultEvent("TextChanged")>  
 Class FirefoxTextbox  
   Inherits Control  
 #Region " Private "  
   Private WithEvents TB As New TextBox  
   Private G As Graphics  
   Private State As MouseState  
   Private IsDown As Boolean  
   Private _EnabledCalc As Boolean  
   Private _allowpassword As Boolean = False  
   Private _maxChars As Integer = 32767  
   Private _textAlignment As HorizontalAlignment  
   Private _multiLine As Boolean = False  
   Private _readOnly As Boolean = False  
 #End Region  
 #Region " Properties "  
   Public Shadows Property Enabled As Boolean  
     Get  
       Return EnabledCalc  
     End Get  
     Set(value As Boolean)  
       TB.Enabled = value  
       _EnabledCalc = value  
       Invalidate()  
     End Set  
   End Property  
   <DisplayName("Enabled")>  
   Public Property EnabledCalc As Boolean  
     Get  
       Return _EnabledCalc  
     End Get  
     Set(value As Boolean)  
       Enabled = value  
       Invalidate()  
     End Set  
   End Property  
   Public Shadows Property UseSystemPasswordChar() As Boolean  
     Get  
       Return _allowpassword  
     End Get  
     Set(ByVal value As Boolean)  
       TB.UseSystemPasswordChar = UseSystemPasswordChar  
       _allowpassword = value  
       Invalidate()  
     End Set  
   End Property  
   Public Shadows Property MaxLength() As Integer  
     Get  
       Return _maxChars  
     End Get  
     Set(ByVal value As Integer)  
       _maxChars = value  
       TB.MaxLength = MaxLength  
       Invalidate()  
     End Set  
   End Property  
   Public Shadows Property TextAlign() As HorizontalAlignment  
     Get  
       Return _textAlignment  
     End Get  
     Set(ByVal value As HorizontalAlignment)  
       _textAlignment = value  
       Invalidate()  
     End Set  
   End Property  
   Public Shadows Property MultiLine() As Boolean  
     Get  
       Return _multiLine  
     End Get  
     Set(ByVal value As Boolean)  
       _multiLine = value  
       TB.Multiline = value  
       OnResize(EventArgs.Empty)  
       Invalidate()  
     End Set  
   End Property  
   Public Shadows Property [ReadOnly]() As Boolean  
     Get  
       Return _readOnly  
     End Get  
     Set(ByVal value As Boolean)  
       _readOnly = value  
       If TB IsNot Nothing Then  
         TB.ReadOnly = value  
       End If  
     End Set  
   End Property  
 #End Region  
 #Region " Control "  
   Protected Overrides Sub OnTextChanged(ByVal e As EventArgs)  
     MyBase.OnTextChanged(e)  
     Invalidate()  
   End Sub  
   Protected Overrides Sub OnBackColorChanged(ByVal e As EventArgs)  
     MyBase.OnBackColorChanged(e)  
     Invalidate()  
   End Sub  
   Protected Overrides Sub OnForeColorChanged(ByVal e As EventArgs)  
     MyBase.OnForeColorChanged(e)  
     TB.ForeColor = ForeColor  
     Invalidate()  
   End Sub  
   Protected Overrides Sub OnFontChanged(ByVal e As EventArgs)  
     MyBase.OnFontChanged(e)  
     TB.Font = Font  
   End Sub  
   Protected Overrides Sub OnGotFocus(ByVal e As EventArgs)  
     MyBase.OnGotFocus(e)  
     TB.Focus()  
   End Sub  
   Private Sub TextChangeTb() Handles TB.TextChanged  
     Text = TB.Text  
   End Sub  
   Private Sub TextChng() Handles MyBase.TextChanged  
     TB.Text = Text  
   End Sub  
   Public Sub NewTextBox()  
     With TB  
       .Text = String.Empty  
       .BackColor = Color.White  
       .ForeColor = Color.FromArgb(66, 78, 90)  
       .TextAlign = HorizontalAlignment.Left  
       .BorderStyle = BorderStyle.None  
       .Location = New Point(3, 3)  
       .Font = GlobalFont(FontStyle.Regular, 10)  
       .Size = New Size(Width - 3, Height - 3)  
       .UseSystemPasswordChar = UseSystemPasswordChar  
     End With  
   End Sub  
   Sub New()  
     MyBase.New()  
     NewTextBox()  
     Controls.Add(TB)  
     SetStyle(ControlStyles.UserPaint Or ControlStyles.SupportsTransparentBackColor, True)  
     DoubleBuffered = True  
     TextAlign = HorizontalAlignment.Left  
     ForeColor = Color.FromArgb(66, 78, 90)  
     Font = GlobalFont(FontStyle.Regular, 10)  
     Size = New Size(130, 29)  
     Enabled = True  
   End Sub  
   Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)  
     G = e.Graphics  
     G.SmoothingMode = SmoothingMode.HighQuality  
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit  
     MyBase.OnPaint(e)  
     G.Clear(Parent.BackColor)  
     If Enabled Then  
       TB.ForeColor = Color.FromArgb(66, 78, 90)  
       If State = MouseState.Down Then  
         DrawRoundRect(G, FullRectangle(Size, True), 3, Color.FromArgb(44, 156, 218))  
       Else  
         DrawRoundRect(G, FullRectangle(Size, True), 3, GreyColor(200))  
       End If  
     Else  
       TB.ForeColor = GreyColor(170)  
       DrawRoundRect(G, FullRectangle(Size, True), 3, GreyColor(230))  
     End If  
     TB.TextAlign = TextAlign  
     TB.UseSystemPasswordChar = UseSystemPasswordChar  
   End Sub  
   Protected Overrides Sub OnResize(e As EventArgs)  
     MyBase.OnResize(e)  
     If Not MultiLine Then  
       Dim tbheight As Integer = TB.Height  
       TB.Location = New Point(10, CType(((Height / 2) - (tbheight / 2) - 0), Integer))  
       TB.Size = New Size(Width - 20, tbheight)  
     Else  
       TB.Location = New Point(10, 10)  
       TB.Size = New Size(Width - 20, Height - 20)  
     End If  
   End Sub  
   Protected Overrides Sub OnEnter(e As EventArgs)  
     MyBase.OnEnter(e)  
     State = MouseState.Down : Invalidate()  
   End Sub  
   Protected Overrides Sub OnLeave(e As EventArgs)  
     MyBase.OnLeave(e)  
     State = MouseState.None : Invalidate()  
   End Sub  
 #End Region  
 End Class  
 Class FirefoxNumericUpDown  
   Inherits Control  
 #Region " Private "  
   Private G As Graphics  
   Private _Value As Integer  
   Private _Min As Integer  
   Private _Max As Integer  
   Private Loc As Point  
   Private Down As Boolean  
   Private _EnabledCalc As Boolean  
   Private ETC As Color = Nothing  
 #End Region  
 #Region " Properties "  
   Public Shadows Property Enabled As Boolean  
     Get  
       Return EnabledCalc  
     End Get  
     Set(value As Boolean)  
       _EnabledCalc = value  
       Invalidate()  
     End Set  
   End Property  
   <DisplayName("Enabled")>  
   Public Property EnabledCalc As Boolean  
     Get  
       Return _EnabledCalc  
     End Get  
     Set(value As Boolean)  
       Enabled = value  
       Invalidate()  
     End Set  
   End Property  
   Public Property Value As Integer  
     Get  
       Return _Value  
     End Get  
     Set(v As Integer)  
       If v <= _Max And v >= Minimum Then  
         _Value = v  
       End If  
       Invalidate()  
     End Set  
   End Property  
   Public Property Minimum As Integer  
     Get  
       Return _Min  
     End Get  
     Set(v As Integer)  
       If v < Maximum Then  
         _Min = v  
       End If  
       If Value < Minimum Then  
         Value = Minimum  
       End If  
       Invalidate()  
     End Set  
   End Property  
   Public Property Maximum As Integer  
     Get  
       Return _Max  
     End Get  
     Set(v As Integer)  
       If v > Minimum Then  
         _Max = v  
       End If  
       If Value > Maximum Then  
         Value = Maximum  
       End If  
       Invalidate()  
     End Set  
   End Property  
 #End Region  
 #Region " Control "  
   Sub New()  
     DoubleBuffered = True  
     Value = 0  
     Minimum = 0  
     Maximum = 100  
     Cursor = Cursors.IBeam  
     BackColor = Color.White  
     ForeColor = Color.FromArgb(66, 78, 90)  
     Font = GlobalFont(FontStyle.Regular, 10)  
     Enabled = True  
   End Sub  
   Protected Overrides Sub OnMouseMove(e As MouseEventArgs)  
     MyBase.OnMouseMove(e)  
     Loc.X = e.X  
     Loc.Y = e.Y  
     Invalidate()  
     If Loc.X < Width - 23 Then  
       Cursor = Cursors.IBeam  
     Else  
       Cursor = Cursors.Default  
     End If  
   End Sub  
   Protected Overrides Sub OnResize(ByVal e As EventArgs)  
     MyBase.OnResize(e)  
     Height = 30  
   End Sub  
   Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)  
     MyBase.OnMouseClick(e)  
     If Enabled Then  
       If Loc.X > Width - 21 AndAlso Loc.X < Width - 3 Then  
         If Loc.Y < 15 Then  
           If (Value + 1) <= Maximum Then  
             Value += 1  
           End If  
         Else  
           If (Value - 1) >= Minimum Then  
             Value -= 1  
           End If  
         End If  
       Else  
         Down = Not Down  
         Focus()  
       End If  
     End If  
     Invalidate()  
   End Sub  
   Protected Overrides Sub OnKeyPress(ByVal e As System.Windows.Forms.KeyPressEventArgs)  
     MyBase.OnKeyPress(e)  
     Try  
       If Down Then  
         Value = Value & e.KeyChar.ToString  
       End If  
       If Value > Maximum Then  
         Value = Maximum  
       End If  
     Catch  
     End Try  
   End Sub  
   Protected Overrides Sub OnKeyup(ByVal e As System.Windows.Forms.KeyEventArgs)  
     MyBase.OnKeyUp(e)  
     If e.KeyCode = Keys.Up Then  
       If (Value + 1) <= Maximum Then  
         Value += 1  
       End If  
       Invalidate()  
     ElseIf e.KeyCode = Keys.Down Then  
       If (Value - 1) >= Minimum Then  
         Value -= 1  
       End If  
     ElseIf e.KeyCode = Keys.Back Then  
       Dim BC As String = Value.ToString()  
       BC = BC.Remove(Convert.ToInt32(BC.Length - 1))  
       If (BC.Length = 0) Then  
         BC = "0"  
       End If  
       Value = Convert.ToInt32(BC)  
     End If  
     Invalidate()  
   End Sub  
   Protected Overrides Sub OnPaint(e As PaintEventArgs)  
     G = e.Graphics  
     G.SmoothingMode = SmoothingMode.HighQuality  
     G.TextRenderingHint = TextRenderingHint.ClearTypeGridFit  
     MyBase.OnPaint(e)  
     G.Clear(Parent.BackColor)  
     If Enabled Then  
       ETC = Color.FromArgb(66, 78, 90)  
       Using P As New Pen(GreyColor(190))  
         DrawRoundRect(G, FullRectangle(Size, True), 2, GreyColor(190))  
         G.DrawLine(P, New Point(Width - 24, 13.5F), New Point(Width - 5, 13.5F))  
       End Using  
       DrawRoundRect(G, New Rectangle(Width - 24, 4, 19, 21), 3, GreyColor(200))  
     Else  
       ETC = GreyColor(170)  
       Using P As New Pen(GreyColor(230))  
         DrawRoundRect(G, FullRectangle(Size, True), 2, GreyColor(190))  
         G.DrawLine(P, New Point(Width - 24, 13.5F), New Point(Width - 5, 13.5F))  
       End Using  
       DrawRoundRect(G, New Rectangle(Width - 24, 4, 19, 21), 3, GreyColor(220))  
     End If  
     Using B As New SolidBrush(ETC)  
       G.DrawString("t", New Font("Marlett", 8, FontStyle.Bold), B, New Point(Width - 22, 5))  
       G.DrawString("u", New Font("Marlett", 8, FontStyle.Bold), B, New Point(Width - 22, 13))  
       CenterString(G, Value, New Font("Segoe UI", 10), ETC, New Rectangle(Width / 2 - 10, 0, Width - 5, Height))  
     End Using  
   End Sub  
 #End Region  
 End Class  

Now just go click Build > Build Solution that's it, then you can find a set a of FireFix components in your ToolBox like this :


All the credits to : AeroRev9