How To Draw A Circle Form In C#

 How To Draw A Circle Form In C#
I have seen some controls/components that can change the form into circle.. today I came up with something very simple umm well, it’s done with drawing. You’ll need to add the namespace : using System.Drawing;. We’ll do the drawing in form_load if you want you can do it under a button_click event or something else..

This is the code :

System.Drawing.Drawing2D.GraphicsPath XY = new System.Drawing.Drawing2D.GraphicsPath();
            XY.AddEllipse(0, 0, 300, 300);
            this.Region = new Region(XY);

GraphicsPath() : Initialize a new Graphics Path.
AddEllipse() : Adds a Ellipse to the Graphics Path.
new Region() : Describes a Graphics Shape.

Investing In Office Hardware - Why Not To Overlook Telephony Headset

Investing In Office Hardware - Why Not To Overlook Telephony Headset
It’s not uncommon for business owners to occasionally take stock of the equipment currently in use around the office and plan a bit of an overhaul when and where needed. However, something that rarely fails to escape the attention of those concerned is the contingency of telephony hardware sitting around every desk and workspace. In essence the reason for this is pretty simple – something along the lines of the old ‘If it isn’t broken then don’t fix it’ way of thinking. After all, the standard analogue phone lines and devices themselves have been serving businesses faithfully for decades, so is there really any need to start replacing them all now? Well, you could argue whether the need exists as such, but when it comes to the business that really wants to keep itself ahead of the game, telephony is a very good place to start.

New Standards

Across pretty much every business area the world over today, standards have never been higher and neither have the expectations of clients, customers and peer businesses alike. This of course includes communication which despite having shifted in many circles primarily to the internet still for most means the good old-fashioned telephone. So the phone still counts for a great deal, but what won’t be put up with by anyone these days is the unreliable, low quality or out-of-service telephone number. Likewise, high-rate calls are a thing of the past and so too are enormously irritating call-waiting systems. This is precisely why remaining with an outdated office phone system has the very real potential to leave any modern business trailing dangerously behind its rivals. It’s not a case of going OTT with the most cutting edge gear available, but rather one of responding to precisely what it is that people are expecting these days and not building a reputation for all the wrong reasons.

Ease of Use

In addition to the above, it might seem like staying with legacy telephone systems makes sense for the sake of simplicity, but in practice it can be anything but. Today’s cutting-edge internet phones make it child’s play to operate anything and everything you can possibly think of on the subject of office communications. From the simple corded phones to wireless headset accessories to large-scale conference calling and the most comprehensive caller-ID and recording systems ever devised, all of these features and more are as easy to use as a quick point and click via a computer program. The days of bashing buttons and wiggling wires to try and get telephones working properly are mercifully over.

Cost Reductions

And here comes the real kicker of all – the most advanced digital and internet phones you can buy today are in fact 100% guaranteed to pay for themselves. Sure they cost most to buy than the cheapest legacy phones, but when you consider the gigantic savings made every day in every call made and service used, there’s really no comparing the two. So when the time comes once again to revamp the office, take a look at your phones consider the fact that you’ve already got the necessary internet connections installed and mull over how much better off you could be by making the switch.

Author Bio
John Baron has been writing full-time for over 5 years. He regularly blogs about the Internet, tech gadgets and web development. John is also an animal rights activist and an active member of PETA. Follow him on Twitter @SEOquickrank to get the latest technology updates.

Automated Material Handling Systems The Power And Benefits

Automated Material Handling Systems The Power And BenefitsFrom the moment man figured out how to move objects from one place to another, the world changed forever. Manual laborers armed with the tools to handle and transfer materials quickly and efficiently, soon transformed manufacturing and distribution---giving rise to whole new industries. Today, thanks to the power of automated material handling systems, a new transformation has occurred, allowing small and large businesses to thrive like never before. Here’s a look at some of the many benefits of automated material handling systems.

Reduced labor costs – From handling raw materials during manufacturing to the handling and transportation of finished products to facilities for storage and distribution, the costs of manually handling materials can be considerable. Automated Material Handling Systems can dramatically reduce costs by minimizing manual handling or eliminating it altogether.

Improved efficiency – Despite best efforts, the manual handling of materials has traditionally been plagued by inefficiencies, due to the human factor. In contrast, an Automated Handling System (AHS) maximizes efficiency by handling and delivering the correct materials and products---in the correct quantities to the desired location at the correct time---in the most economical manner.

Reduced damage – One of the downsides of the manual handling of materials and products during all phases of production and distribution is that damage can often occur during storage and movement. Automated handling systems are designed to minimize damage through proper material handling systems. In addition, reduced damage can mean substantial savings.

Reduced waste of space – Unlike the manual warehousing of materials--- which often results in less than optimal space utilization---automated handling systems are designed to make the most of every available inch of storage space, thus reducing both handling and storage costs. In addition, automated systems can also free up valuable floor space in production facilities.

Reduced accidents – The human handling of materials carries inherent risks of accidents, such as slips, trips and falls. Not to mention the Cumulative Trauma Disorders that are the result of repetitive movements such as lifting and twisting. Along with exacting a human toll, accidents additionally result in lost productivity. By eliminating manual handling, automated systems minimize accidents while ensuring a safe and efficient flow of materials and products. In addition, automation typically allows for a cleaner more orderly environment than found in operations that are dependent on manual product movement.

Increased scalability – As businesses grow and expand, one of the challenges they face is being able to expand operations in order to meet increased demand. Automated handling systems have the ability to scale up quickly and easily to meet new production needs---along with larger and heavier product units if required---without prolonged downtime for adding and retooling equipment.

Real-time control – In order to better meet the often stringent demands of today’s customers---who typically want things “yesterday”---more and more facilities are turning to automation and computerization to give them complete system control in real-time. This type of flexibility allows for the accurate and fast fulfillment of all orders, the net result being better customer service, higher profits and a greater competitive advantage.

David Glenn is a home improvement expert. He occasionally freelance writes about home security and DIY home repair. 

Top Technology Gifts For Her


Are you looking to surprise your girlfriend by giving her an unexpected gift? Would you like to buy something special for your wife? Whether you are planning on buying a video game console or a brand-new mobile phone, this post will help you select the best technology present for your loved ones.

Enjoy the New Nexus 5
If you are interested in purchasing one of the most powerful and innovative mobile phones on the market, the Nexus 5 is a great gift for every occasion. This smartphone has been designed by Google, making it one of the lightest and more refined devices ever manufactured, and while the Nexus 5 offers a wide variety of features, it is a much more affordable mobile phone than the Samsung Galaxy Note 3 or the Apple iPhone 5S. The Nexus 5 features a 5-inch display capable of offering a great image quality, but also an 8-megapixel rear camera that will allow your significant other to capture some of her most special moments. Last, but not least, thanks to Android 4.4, Nexus 5’s new operating system, she will also be able to download some of the most popular applications on her smartphone, such as Twitter or Instagram.

Discover the New Xbox One
There is always an occasion for buying a new gift, and what better present than one of the latest and most exciting devices on the market? While just some years ago consoles were only able to play video games, the brand-new Xbox One is capable of much more, including the ability to stream music or movies from the Internet. Thanks to its innovative user interface and its new operating system, you and your girlfriend will be able to use the Xbox One as a multimedia device, giving you the opportunity of using popular applications such as Skype or Internet Explorer from the comfort of your couch. Whether she would like to follow her favourite TV series or download the latest films, this video game console is compatible with some the most widely used streaming services, including Hulu or Netflix, something that will allow both of you to benefit from your hyperfast fibre optic internet connection. 

Give Her the New Amazon Kindle
If you are looking for a convenient and light reading device, the Amazon Kindle is one of the best options available on the market. This gadget is able to provide hours and hours of reading with just a single charge thanks to its improved battery life. On top of that, she won’t have to worry about reading in bright sunlight thanks to the Kindle’s high-quality electronic ink screen, a unique technology that avoids glare while using your device. Additionally, Amazon offers a wide selection of books in its online store for her to download on the Amazon Kindle, allowing her to easily purchase books from her favourite authors. Moreover, it is also possible to download books in the public domain from the Amazon store, a very interesting option if she wants to enjoy classic books without having to spend any money.

Take a look at this :  Best Apps To Make Christmas Easier

Sarah is a writer and blogger with a special interest in technology. She has little patience for things which are slow and so is constantly on the search for the latest technological developments. 

How To Login To Instagram Using The API In VB.NET

instagram picture
Instagram is a photo and video sharing app for smartphones, we can call it a social network. As I said It's a smartphone app but you can view photos, like photos, comment on photos and follow/unfollow users via their website from computer also there are more than 10 popular websites where you can view photos, like photos, comment on photos and follow/unfollow users, browse hashtags and view stats they use the API to do the works.

Without much talk let's get into it..

Remember you're just going to make a Instagram Login, you won't be able to view photos or do anything. You need two textbox and a button you can also add two labels to make it look good. The textbox1 is for username and textbox2 is for password.

Instagram Login form preview

Time for some codes...

Required Namespaces :
Imports System.IO
Imports System.Net
Imports System.Text

Functions(We need two functions) :
  
 Dim CC As New CookieContainer
    Dim RQ As HttpWebRequest
    Dim RP As HttpWebResponse
    Public Function GetResponse(ByVal url As String, ByVal referer As String) As String
        RQ = CType(HttpWebRequest.Create(url), HttpWebRequest)
        RQ.CookieContainer = CC

        If referer <> "" Then
            RQ.Referer = referer
        End If

        RP = CType(RQ.GetResponse(), HttpWebResponse)

        Return New StreamReader(RP.GetResponseStream()).ReadToEnd()
    End Function

    Public Function GetResponse(ByVal url As String, ByVal post As String, ByVal referer As String) As String
        RQ = CType(HttpWebRequest.Create(url), HttpWebRequest)
        RQ.Method = "POST"
        RQ.CookieContainer = CC
        RQ.UserAgent = "AppleWebKit/537.36 (KHTML, like Gecko) Mozilla/5.0 (Windows NT 6.1) Chrome/28.0.1468.0 Safari/537.36"

        If referer <> "" Then
            RQ.Referer = referer
        End If

        Dim byteArr() As Byte = Encoding.Default.GetBytes(post)
        RQ.ContentLength = byteArr.Length

        Dim dataStream As Stream = RQ.GetRequestStream()
        dataStream.Write(byteArr, 0, byteArr.Length)

        RP = CType(RQ.GetResponse(), HttpWebResponse)

        Return New StreamReader(RP.GetResponseStream()).ReadToEnd()
    End Function

This code is for your login button :
Dim html As String = GetResponse("https://instagram.com/accounts/login/", "")
        Dim token As String = html.Substring(html.IndexOf("csrfmiddlewaretoken")).Split(""""c)(2)
        Dim username As String = TextBox1.Text
        Dim password As String = TextBox2.Text

        Dim S_B As New StringBuilder
        S_B.Append("csrfmiddlewaretoken=" & token)
        S_B.Append("&username=" & username)
        S_B.Append("&password=" & password)

        html = GetResponse("https://instagram.com/accounts/login/", S_B.ToString, "https://instagram.com/accounts/login/")

        If html.Contains("""username"":""" & username) Then
            MsgBox("Successfully Logged In", MessageBoxIcon.Information)
        ElseIf html.Contains("Please enter a correct username and password.") Then
            MsgBox("Invalid Username or Password", MessageBoxIcon.Error)
        Else
            MsgBox("Unable Login Error", MessageBoxIcon.Error)
        End If


Now run the program and test it..

If you enter correct login credentials you will get this message :

How To Login To Instagram Using The API In VB.NET

I am looking to develop a Instagram picture view if everything goes well I will let you all know. Follow me on Instagram @54j33dh4.

How To Detect Real Time Browser Size In JQuery

This JQuery script detects the dimensions of browser's size onload and resize...

Add these in your head :


Add the styles(not so important) :


Add these to your body :


Now just save the document and run in your browser :)

How To Detect Browser Size Using JQuery

All the credits goes to Michael(mikethedj4)

How To Get Environment Variables In VB.NET and C#


Environment
Environment Variables are set of values that are used for running special processes or special system files.. for example when you install java or python you must make a new environment variable in order to compile and run java or python programs that's all I know about it. Without wasting anytime let's get into it...

This is a simple code that will show you the environment variables..

For VB.NET

        Dim EV As String = Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process Or EnvironmentVariableTarget.Machine)

        MsgBox(EV)

For C#

'you must add these namespaces 

using System;
using System.IO;
using System.Windows.Forms;
using Microsoft.Win32;

'add this code in an event 
string EV = Environment.GetEnvironmentVariable("PATH", 
                EnvironmentVariableTarget.Process | 
                EnvironmentVariableTarget.Machine);
            MessageBox.Show(EV);

The "PATH" defines the environment variable name so if you want to get another ones just change PATH with the variable name.

How To Check If Directory Exists In VB.NET And C#

directory in programming
I have had some hard times in solving this problem not these days but sometime ago when I started programming so I think this would be helpful for anyone who has started programming..

Here's the code to check if the directory exists in VB.NET :

Try
            If System.IO.Directory.GetDirectories("PATH").Length > 0 Then
                MsgBox("directory exists")

            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

All you need to do is replace PATH with the directory you want to check... length > 0 identifies if the directory exists.

Here's the code for C# :

try
            {
                if (System.IO.Directory.GetDirectories("PATH").Length > 0)
                {
                    MessageBox.Show("directory exists");

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

Do the same thing as given for VB.NET code.

How To Get The MD5 Hash Of A File In VB.NET

MD5 UPTUTORIALS
MD5 is a widely used cryptographic algorithm that produces a 128-BIT hash value. I think all the files you have in your computer has a unique md5 hash.. in some virus scanning process the files get identified easily with the hash value. Today we are going to make a simple application that will help you to get the md5 hash of any file.

Start a new project and do the traditions lol.. you must add a button, a label and a textbox.

user interface :)

You must add these namespaces before you could do any coding :

Imports System.Security.Cryptography
Imports System.IO
Imports System.Text

Here's the code for the application it's all under button click event.. I have explained the basic things by small comments.

  'creating the openfiledialog
        Dim Open As OpenFileDialog = New OpenFileDialog
        Open.Filter = "All Files (*.*)|*.*"
        If (Open.ShowDialog() = DialogResult.OK) Then TextBox1.Text = Open.FileName
        If Open.FileName = "" Then Exit Sub

        'accessing file & getting the hash
        Dim RD As FileStream = New FileStream(TextBox1.Text, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)
        RD = New FileStream(TextBox1.Text, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)
        Dim md5 As MD5CryptoServiceProvider = New MD5CryptoServiceProvider
        md5.ComputeHash(RD)
        RD.Close()

        'converting the bytes into string
        Dim hash As Byte() = md5.Hash
        Dim SB As StringBuilder = New StringBuilder
        Dim HB As Byte
        For Each HB In hash
            SB.Append(String.Format("{0:X1}", HB))
        Next
        LabelHash.Text = "MD5 : " & SB.ToString()

The usage is pretty easy all you have to do is select and load the file from the button and you will get the Md5 hash for the selected file in the Label.