Sell Your Source Code Online


if you're asking yourself how you can sell your app / apps source code online, you are in the right place.
in this post i will show you how to sell your source code using sellfy ?
and how much did i make selling my codes using sellfy ?

 What Is Sellfy ? 

Sellfy.com is website that give you the ability to sell your source code or any of your digital products easly .


 What Sellfy Does ? 


Sellfy.com host your products files, handle the payments and automatically send the products to customers after a purchase is made.


 How To Start Using Sellfy ? 



just go to Sellfy.com and click sign up and start selling your products.


 How To Add A Product To Sellfy ? 



you can watch a video tutorial from HERE
go to your Sellfy store and click products



and click "Add new product"  

this form will show up
just select your project file and add the product information and that's it


 How To Create Product Discounts / Coupon Codes ? 



you can watch a video tutorial from HERE
go to your Sellfy store and click discounts


this form will show up



click on "Add new discount"



and you can choose between "Coupon" And "Sale"


if you select "Sale" option you will see the form below, and you will have to enter "Sale" discounts information ( name, product, amount, expiration date )

if you select "Coupon" it's the same as "Sale"


to add a coupon to a sellfy product url:
product link : https://sellfy.com/p/aH3W/
product link + coupon: https://sellfy.com/p/aH3W/-POST40OFF/
formula: product link + "/-" + coupon code


 How To Embed The Product Button / Card To Your Blog / Website ? 


you can watch a video tutorial from HERE
go to your Sellfy store and click "Embed"



this form will show up



and you can select to get the "Button" or "Product Card" or "Store view"
if you select "button":

and copy and past the code in your blog
for the others "Product Card" and "Store view" it's tha same
copy and past.
you can see a "Store view" example from HERE 


 What Is My Sellfy Store ? 



go to https://sellfy.com/1bestcsharp you can only see the products visible on the store page ( you can hide a product from the store page if you want ) .


 Sellfy Video Tutorial 



 My Earnings Using Sellfy ? 


my best month on Sellfy is December 2017
you can watch my revenue for every month HERE
my total revenue for 2017 : $351.77

 How Much Does Sellfy Take ? 


if you are using Sellfy 'Free' or 'Basic' plans Sellfy charge 5% for every transaction
- i use 'free' (Legacy) plan myself
- there's more plans if you want
charge 5% + PayPal fees


 Payment Methods Available 


PayPal + Stripe

My Payment Email Message For A Sale






if you have any question leave it in the comments section below and i will give an answer or add it to this post as soon as i can .

good luck with your code :)

VB.Net DataGridView Header

How To Customize Datagridview Header In Vbnet

Style DataGridView Columns Header In VB.Net


In This VB.Net Tutorial  We Will See How To Change Datagridview Header Text Size, Text Color, Font Name, Background Color, Text Alignment ( center, left, right ), In Visual Basic.Net Programming Language And Visual Studio Editor .


Project Source Code:


Public Class Vbnet_DataGridView_Header

    Dim table As New DataTable()
    Private Sub Vbnet_DataGridView_Header_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        ' Add columns to your datatable 
        ' with the name of the columns and their type 

        table.Columns.Add("Id", Type.GetType("System.Int32"))
        table.Columns.Add("First Name", Type.GetType("System.String"))
        table.Columns.Add("Last Name", Type.GetType("System.String"))
        table.Columns.Add("Age", Type.GetType("System.Int32"))

        ' Add rows to the datatable with some data 

        table.Rows.Add(1, "XXXX", "YYYYY", 21)
        table.Rows.Add(2, "SSDD", "hGSQ", 33)
        table.Rows.Add(3, "fgfgd", "jgfdd", 53)
        table.Rows.Add(4, "cvfghyghj", "sdrgtyh", 19)
        table.Rows.Add(5, "hghfd", "ghjgdf", 36)
        table.Rows.Add(6, "cvvdfgh", "juyrfdvc", 63)

        ' now set the datagridview datasource equals to your datatable name 

        DataGridView1.DataSource = table


        ' set a different font familly and size and style for each column header 
        'DataGridView1.Columns(0).HeaderCell.Style.Font = New Font("SansSerif", 15, FontStyle.Bold)
        'DataGridView1.Columns(1).HeaderCell.Style.Font = New Font("Tahoma", 20, FontStyle.Italic)
        'DataGridView1.Columns(2).HeaderCell.Style.Font = New Font("SansSerif", 25, FontStyle.Strikeout)
        'DataGridView1.Columns(3).HeaderCell.Style.Font = New Font("Tahoma", 30, FontStyle.Underline)

          ' set font familly and size and style for all columns header 
        DataGridView1.ColumnHeadersDefaultCellStyle.Font = New Font("SansSerif", 20, FontStyle.Bold)

          ' set a different foreColor for each column header 
        'DataGridView1.Columns(0).HeaderCell.Style.ForeColor = Color.Red
        'DataGridView1.Columns(3).HeaderCell.Style.ForeColor = Color.Green

         ' set a foreColor for all columns header 
        DataGridView1.ColumnHeadersDefaultCellStyle.ForeColor = Color.Blue
        DataGridView1.EnableHeadersVisualStyles = False

        ' set a different background color for each column header 
        'DataGridView1.Columns(0).HeaderCell.Style.BackColor = Color.LightGreen
        'DataGridView1.Columns(3).HeaderCell.Style.BackColor = Color.Yellow

         ' set a background color for all columns header 
        DataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.LightGreen

 ' set the text position (center,left,right.......) for each column header 
        'DataGridView1.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.BottomCenter
        'DataGridView1.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleLeft

 ' set the text position (center,left,right.......) for all columns header 
        DataGridView1.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter


    End Sub
End Class

// OUTPUT :

Customize Datagridview Columns Header In Visual Basic.Net

C# Transfer TreeView Nodes To DataGridView

How To Set TreeView Nodes Values Into DataGridView Rows Using C#

Transfer TreeView Nodes To DataGridView Using C#



In this C# Tutorial we will see How To Get TreeView Nodes Data And Set It Into DataGridView Rows Using For Loop On Button Click Event In CSharp Programming Language And Visual  Studio Editor.




Project Source Code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class TreeView_To_DataGridView : Form
    {
        public TreeView_To_DataGridView()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            for(int i = 0; i < treeView1.Nodes.Count; i++)
            {
                TreeNode node = treeView1.Nodes[i];

                Object[] row = new Object[node.Nodes.Count];

                for(int j = 0; j < node.Nodes.Count; j++)
                {
                    row[j] = node.Nodes[j].Text;
                }

                dataGridView1.Rows.Add(row);
            }
        }
    }
}

OutPut:

TreeView To DataGridView In C#


C# Transfer DataGridView Data To TreeView

How To Set DataGridView Values Into TreeView Nodes Using C#

Transfer DataGridView Data To TreeView Using C#



In this C# Tutorial we will see How To Get DataGridView Rows Data And Set It Into TreeView Node Using For Loop And Datatable On Button Click Event In CSharp  Programming Language And Visual  Studio Editor.


Project Source Code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class DatGridView_To_TreeView : Form
    {
        public DatGridView_To_TreeView()
        {
            InitializeComponent();
        }

        private void DatGridView_To_TreeView_Load(object sender, EventArgs e)
        {
            DataTable table = new DataTable();

            // add columns to datatable
            table.Columns.Add("Id", typeof(int));
            table.Columns.Add("First Name", typeof(string));
            table.Columns.Add("Last Name", typeof(string));
            table.Columns.Add("Age", typeof(int));

            // add rows to datatable
            table.Rows.Add(1, "First A", "Last A", 10);
            table.Rows.Add(2, "First B", "Last B", 20);
            table.Rows.Add(3, "First C", "Last C", 30);
            table.Rows.Add(4, "First D", "Last D", 40);
            table.Rows.Add(5, "First E", "Last E", 50);
            table.Rows.Add(6, "First F", "Last F", 60);
            table.Rows.Add(7, "First G", "Last G", 70);
            table.Rows.Add(8, "First H", "Last H", 80);

            dataGridView1.DataSource = table;
        }

        private void button1_Click(object sender, EventArgs e)
        {

            for(int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                int rowIndex = i + 1;
                TreeNode node = new TreeNode("Row_"+rowIndex);
                for(int j = 0; j < dataGridView1.Columns.Count; j++)
                {
                    node.Nodes.Add(dataGridView1.Rows[i].Cells[j].Value.ToString());
                }
                treeView1.Nodes.Add(node);
            }

        }
    }
}



OutPut:

DataGridView Data To TreeView Using C#

C# Add, Edit, Remove TreeView Node

How To Insert Update Delete Selected Node From TreeView Using C#

Add Edit Remove TreeView Node Using C#



In this C# Tutorial we will see How To Add Edit Remove The Selected TreeView Node Using TextBox Value On treeView AfterSelect To Get The Selected Node And 3 Button To Do The Insert, Update, Delete In CSharp Programming Language And Visual  Studio Editor.




Project Source Code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class TreeView_Add_Edit_Delete_Node : Form
    {
        public TreeView_Add_Edit_Delete_Node()
        {
            InitializeComponent();
        }

        // add
        private void button1_Click(object sender, EventArgs e)
        {
            TreeNode node = new TreeNode(textBox1.Text);
            try
            {
                treeView1.SelectedNode.Nodes.Add(node);
            }
            catch (Exception ex)
            {
                treeView1.Nodes.Add(node);
            }

        }

      // edit
        private void button2_Click(object sender, EventArgs e)
        {
            treeView1.SelectedNode.Text = textBox1.Text;
        }

       // get selected node
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            textBox1.Text = treeView1.SelectedNode.Text;
        }

        // delete selected node
        private void button3_Click(object sender, EventArgs e)
        {
            treeView1.SelectedNode.Remove();
        }
    }
}


OutPut:

insert update delete treeview node using c#

VB.NET Using RadioButton With MySQL

How To Use A Radio Button With MySQL Database In VbNet

VB.NET Using RadioButton With MySQL Database

In This VB.Net Tutorial  We Will See How To Use A RadioButton Control With MySQL Database
- get value from the selected redio button and insert it into database .
- get value from mysql and select the specific radiobutton 
In Visual Basic.Net  Programming Language And Visual Studio Editor.


 PART 1 

 PART 2 

Project Source Code:

Imports MySql.Data.MySqlClient

Public Class RadioButton_And_MySQL

    Dim connection As New MySqlConnection("datasource=localhost;port=3306;username=root;password=;database=test")

    Private Sub ButtonInsert_Click(sender As Object, e As EventArgs) Handles ButtonInsert.Click

        Dim command As New MySqlCommand("INSERT INTO `users`(`username`, `Lang`) VALUES (@usn,@lng)", connection)

        command.Parameters.Add("@usn", MySqlDbType.VarChar).Value = TextBoxUsername.Text

        Dim rdb As String = ""

   ' get selected radio button 
        If RdbCsharp.Checked = True Then

            rdb = "C#"


        ElseIf RdbVbnet.Checked = True Then

            rdb = "VB.NET"

        ElseIf RdbJava.Checked = True Then

            rdb = "Java"

        Else
             ' NONE is the default  
            rdb = "NONE"

        End If

        command.Parameters.Add("@lng", MySqlDbType.VarChar).Value = rdb

        connection.Open()

        If command.ExecuteNonQuery() = 1 Then

            MessageBox.Show("Inserted")

        Else

            MessageBox.Show("Not Inserted")

        End If

        connection.Close()

        RdbCsharp.Checked = False
        RdbJava.Checked = False
        RdbVbnet.Checked = False
        RdbNone.Checked = False

    End Sub

    ' search data and check the radiobutton with the same value as the returned one 
    Private Sub ButtonGET_Click(sender As Object, e As EventArgs) Handles ButtonGET.Click

        Dim adapter As New MySqlDataAdapter("SELECT * FROM `users` WHERE `id` = " & Convert.ToInt16(TextBoxID.Text), connection)
        Dim table As New DataTable()

        adapter.Fill(table)

        TextBoxUsername.Text = table(0)(1)

        If table(0)(2).Equals("C#") Then
            RdbCsharp.Checked = True

        ElseIf table(0)(2).Equals("VB.NET") Then

            RdbVbnet.Checked = True

        ElseIf table(0)(2).Equals("Java") Then

            RdbJava.Checked = True

        Else
            RdbNone.Checked = True

        End If

    End Sub
End Class
      

///////////////OUTPUT:

Use Radio Button With MySQL Database In VBnet

C# Calculator Source Code

How To Create A Calculator In C#

calculator in c#


In This C# Tutorial we will See How To Make A Simple Windows Form Calculator Application With Swith  To Do The Basic Operations (+, -, /, *) And Reset To Make Another Calc Using C# In Visual Studio Editor .

Part 1

                                                                          Part 2

Part 3


Part 4


Project Source Code:

    
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class csharp_calculator : Form
    {
        public csharp_calculator()
        {
            InitializeComponent();
        }

        float num1 = 0, num2 = 0;
        int oprClickCount = 0;
        bool isOprClick = false, isEqualClick = false;
        string opr;

        private void csharp_calculator_Load(object sender, EventArgs e)
        {
            // add button click event to all buttons
            foreach(Control c in Controls)
            {
                if(c is Button)
                {
                    if(c.Text != "Reset")
                    c.Click += new System.EventHandler(btn_click);
                }
            }
        }

       // create button click event

        public void btn_click(object sender, EventArgs e)
        {
            Button button = (Button)sender;

            if (!isOperator(button))// if the button is a number
            {
                if(isOprClick)
                {
                    num1 = float.Parse(textBox1.Text);
                    textBox1.Text = "";
                }
                // if the textbox text not contain "."
                if (!textBox1.Text.Contains("."))
                {
                    if (textBox1.Text.Equals("0") && !button.Text.Equals("."))
                    {
                        // delete the first "0"
                        // set button text to the textbox
                        // if the button text is not "."
                        textBox1.Text = button.Text;
                        isOprClick = false;
                    }
                    else
                    {
                        textBox1.Text += button.Text;
                        isOprClick = false;
                    }
                }

                else if (!button.Text.Equals("."))
                {
                    textBox1.Text += button.Text;
                    isOprClick = false;
                }
            }
            else // if the button is an operator [+ - / * =]
            {
                if(oprClickCount == 0)// if it's the first time we click on an operator
                {
                    oprClickCount++;
                    // convert textbox text to float and set it into num1
                    num1 = float.Parse(textBox1.Text);
                    // get the operator from button text
                    opr = button.Text;
                    // set oprclick to true
                    isOprClick = true;
                }
                else
                {
                    if(!button.Text.Equals("="))// if the operation is not "="
                    {
                        if(!isEqualClick)
                        {
                            num2 = float.Parse(textBox1.Text);
                            textBox1.Text = Convert.ToString(calc(opr, num1, num2));
                            num2 = float.Parse(textBox1.Text);
                            opr = button.Text;
                            isOprClick = true;
                            isEqualClick = false;
                        }else
                        {
                            isEqualClick = false;
                            opr = button.Text;
                        }
                    }
                    else
                    {
                        num2 = float.Parse(textBox1.Text);
                        textBox1.Text = Convert.ToString(calc(opr, num1, num2));
                        num1 = float.Parse(textBox1.Text);
                        isOprClick = true;
                        isEqualClick = true;
                    }
                }
            }

        }

        // create a function to check if the clicked button is a number(+ '.') or an operators
        public bool isOperator(Button button)
        {
            string buttonText = button.Text;

            if(buttonText.Equals("+") || buttonText.Equals("-") || 
                buttonText.Equals("X") || buttonText.Equals("/") ||
                buttonText.Equals("="))
            {
                return true;
            }
            else
            {
                return false;
            }

        }

        // function to calculate
        public float calc(string opr, float n1, float n2)
        {
            float result = 0;

            switch (opr)
            {
                case"+":
                    result = n1 + n2;
                    break;
                case "-":
                    result = n1 - n2;
                    break;
                case "X":
                    result = n1 * n2;
                    break;
                case "/":
                    if(n2 != 0)
                         result = n1 / n2;
                    break;
            }
            return result;
        }

        // button reset to make another calculation
        private void buttonReset_Click(object sender, EventArgs e)
        {
            num1 = 0;
            num2 = 0;
            opr = "";
            isOprClick = false;
            isEqualClick = false;
            oprClickCount = 0;
            textBox1.Text = "0";
        }
    }
}






Download Source Code



OUTPUT:


make a calculator using c#