Wednesday, February 12, 2014

Visual Basic Online Course

How to make sure that an Application is Running and Installed

Visual Basic Online Course - Tips

When you create a Visual Basic 2010 or generally a VB.Net application that relies on another VB.Net application for example an Updater.exe application, you will have to code both sides in order no to enable the user to run Updater.exe without the existence of the Main application, and in order to do so, you will have to make sure that :

1) Your Main application is Running.

2) Your Main application is Installed.

3) Your Main application does exist in the installation folder.

After making sure of all the above points, then you can compile your updater.exe file with your Main Application knowing that updater.exe won't run alone, especially if you're sending updates to the Main application for the user to receive using Updater.exe.

Here are the code to do so :1) VB 2010 Get list of all installed applications

Sunday, February 02, 2014

Fade Image in VB 2010

VB 2010 Fade Image

How to fade image in Visual Basic 2010

It doesn’t matter if you are a photographer or a graphic designer, chances are that you have come across the need to fade or blend images in Visual Basic 2010. You can always use Photoshop to create faded images and then use them in your VB 2010 applications, but as a developer you also have to know what does it take to do so, not just to fade an Image but also as a general, after all it's your job to come up with answers.

In our demonstration here well will use ordinary common tools in VB 2010 to be able to fade an Image.

Project Design

VB 2010 Example to Fade Image

Form

Name : Form1

Text : Fade Image in VB 2010

PictureBox

Name : PicToFade

BackColor : Transparent

Dock : Full

Timer

Name : Timer1

Interval : 100

How does it work

Run the application, click on the PicToFade [PictureBox], it will show the [OpenFileDialog] choose and Image [JPEG] and then notice that it will begin to fade away.

You can alter the code to change the fading values [Alpha from 0 to 1 and DeltaAlpha], you can use a Progressbar control to change the fading values too.

Sunday, August 11, 2013

Visual Basic 2010 - FlexGrid

The Microsoft FlexGrid (MSFlexGrid) control displays and operates on tabular data. It allows complete flexibility to sort, merge, and format tables containing strings and pictures. When bound to a Data control, MSFlexGrid displays read-only data.

You can put text, a picture, or both, in any cell of an MSFlexGrid. The Row and Col properties specify the current cell in an MSFlexGrid. You can specify the current cell in code, or the user can change it at run time using the mouse or the arrow keys. The Text property references the contents of the current cell.

If the text in a cell is too long to display in the cell, and the WordWrap property is set to True, the text wraps to the next line within the same cell. To display the wrapped text, you may need to increase the cells column width (ColWidth property) or row height (RowHeight property).

Use the Cols and Rows properties to determine the number of columns and rows in an MSFlexGrid.

Note : Before you can use an MSFlexGrid in your application, you must add the MSFlxGrd.ocx file to your project. To automatically include the file in your project, put it in the Autoload file. When distributing your application, you should install the MSFlxGrd.ocx file in the users Microsoft Windows System directory. For more information about adding an ActiveX control to a project, see "Standard ActiveX Controls" in the Visual Basic Programmers Guide.

- MSFLXGRD.OCX is a COM not a Net component but it can be added to a .Net Form in Visual Basic 2010 and work with it. In order to do so :

1) Open Visual Basic 2010 - New Project - Windows Form Application

Visual Basic Windows Form Application

2) Make sure you are displaying the design mode of the Form1.vb, to be able to choose components

Visual Basic 2010 Form Design Mode

3) From Tools at the left side of the form, right-click anywhere and there will be a list, choose [Choose Items....]

Visual Basic 2010 Tools - Add FlexGrid

4) You will notice a new dialog box is opened where you get to pick up .Net components and Com components, click on the Tab with COM Components, then navigate to [Microsoft FlexGrid Control].

Visual Basic 2010 - Adding FlexGrid to Form

5) Click OK. Now from Tools, navigate to the end of the current section and you will file [Microsoft FlexGrid Control], just drag it on the Form or Double-Click it to be placed automatically on the Form

FlexGrid in VB2010 .Net Form

6) Now you successfully placed a COM component on .Net Form. Visual Basic 2010 will automatically convert this COM component into .Net component when Building your application.

Monday, August 13, 2012

I was always thinking if i could send and receive e-mails using .Net technology, i was shocked to know that .Net 4 has no POP3 class so one could receive e-mails just like in Microsoft Outlook, regardless that Outlook uses POP3, IMAP and SMTP to both send and receive e-mails from e-mail servers.

I was able to finish the send E-mail part successfully, though i've not finished the attachment and the Html parts, but the receiving e-mails part still out there somewhere i did not do it, though i managed to connect to pop3 servers and receive the +OK response successfully.

I'm using an old laptop (WinXpSp3 Home Edition) with VS2010 along with all the .Net kits installed. I've search the internet for pop3-vb.net resources and i could not land on something that works 100% with the receive E-mails part although i ran into some C# codes that helped me to take the first step which is the Response from the server (Gmail.com).

Another thing to tell you, is Gmail.com have 2-Step Verification method that if enabled, enables you to protect you Google account and provide you with a password to work with applications like this one (E-mail Client). If you dealt with Outlook before you should already knew that; you use your Application password to login to your Gmail.com account associated with your Google account, here is a link that explains all of the 2-Step Verification method, if you don't have a Gmail.com or not working through 2-Step Verification method then you must ignore this.

Also you have to know all about incoming and outgoing Ports, Server and of course User Name and Password, and remember to always use the full e-mail address (your_username@emailserver.com) not just your username, here is some info about E-mail server settings:

Hotmail Settings

Incoming Server(pop3.live.com) port(995) Secure Connection (SSL) is a must

Outgoing Server(smtp.live.com) port(587) Secure Connection (TLS) is a must

Note that Hotmail.com have both free and paid accounts, but both supports E-mail clients. So you should go inside your E-mail settings to enable POP3 and forwarding option to be able to work with E-mail clients.

Yahoo Settings

Incoming Server(pop.mail.yahoo.com) port(995) Secure Connection (SSL) is not a must if you're using the free mail.

Outgoing Server(smtp.mail.yahoo.com) port(465) Secure Connection (TLS) is a must

Note that Yahoo.com have both free and paid accounts, but both supports E-mail clients. So you should go inside your E-mail settings to enable POP3 and forwarding option to be able to work with E-mail clients.

Gmail Settings

Incoming Server(pop.gmail.com) port(995) Secure Connection (SSL) is a must

Outgoing Server(smtp.gmail.com) port(587) Secure Connection (TLS) is a must

Finally, i would really like to suggest using Outlook as a practise first, try to establish a connection with your mail server and send some e-mail and receive some, just to make sure your mail server is sat up correctly.

The Send E-mail Part

Imports System.Net.Mail'The Mail Class we use to send e-mailsPublic Class SendFrm 'The form name : SendFrm Dim SmtpSvr As New Net.Mail.SmtpClient()Dim E_mail As New Net.Mail.MailMessage()Dim UsrNm, Pwd, Srve As StringDim Int_port As Integer

Update (1) Aug,15,2012- I was able to successfully get response from Gmail (pop.gmail.com) server and pass my Username and password.Update (2) Aug,17,2012 - Retrieving the number of E-mails from POP3 Mail Server .Update (3) Aug,18,2012- Get list of E-mails and download them and read them to your application.♥ Here are some online Visual Basic lessons and courses :

Wednesday, November 24, 2010

♥ In the name of Allah ♥

Intro

Microsoft Visual Basic 2010, What is it?

Microsoft Visual Basic .Net (2010) Sp1

Microsoft published Visual Basic .Net 2010 In April 2010. Microsoft had planned earlier to use the Dynamic Language Run-time (DLR) for that version (2010), but shifted to a another mixed plan that includes both Visual Basic and sister language C# to bring both languages into closer parity with one another.

Visual Basic's innate ability to interact dynamically with Common Language Run-time CLR and COM objects has been improved to work with dynamic languages built on the DLR such as Iron-Python and Iron-Ruby. Visual Basic compiler was enhanced to infer line continuation in a set of common contexts, in many cases removing the need for the under score "_" line continuation symbol.

We offer free online courses for Visual Basic .Net and Visual Basic 6.0 Programming Languages and solutions for both beginners and professionals. If you have any questions please write it in a comment or join the Facebook.com page for more lessons, tips, courses and source codes.

Microsoft .Net Frame-Work, What is it?

Microsoft .Net Framework

The .NET Framework is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large library and provides language that can use code written in other languages across several programming languages. Programs written for the .NET Framework execute in a software environment (as contrasted to hardware environment), known as the Common Language Run-time (CLR), an application virtual machine that provides services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework.

The .NET Framework's Base Class Library provides user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. Programmers produce software by combining their own source code with the .NET Framework and other libraries. The .NET Framework is intended to be used by most new applications created for the Windows platform. Microsoft also produces an integrated development environment largely for .NET software called Visual Studio.

What can we do with Visual Basic .Net ?

Visual Basic .Net products

Using visual basic .net, you can do almost everything, as a programmer you can always come up with your original ideas. I'm not talking about Visual Basic .Net tricks or what you can explore out of vb.net by yourself, I'm talking about creating profitable products.

You can earn money from your products (Desktop applications, Internet applications, Mobile applications), if you are starting learning Visual Basic from .Net version, then it's gonna be easy for you to gain so much knowledge, you will find yourself creating applications in no time, but if you already studied Visual Basic 6.0 then you can start .Net without a reference because the differences between both Visual Basic .Net and 6.0 are not about programming concepts or logic, the logic is the same, only the interface and the life-cycle.

Most of the hiring websites, those who pay money for programmers to create solutions using .Net languages or any other language are many. You can start taking a look at some of the websites that pay money for programmers to do some work for them.

Freelancer.com (formerly GetAFreelancer, Scriptlance and vWorker/Rentacoder) is the world's largest freelancing, outsourcing and crowdsourcing marketplace for small business. Hire freelancers to work in software, writing, data entry and design right through to engineering and the sciences, sales and marketing, and accounting & legal services. Find freelance jobs and make money online! We have freelance coders, writers, programmers, designers, marketers and more. Getting the best web design, custom programming, professional writing or affordable marketing has never been easier!

Elance.com is the largest and most popular freelance platform for businesses looking to hire and work with top freelancers. Over 500,000 businesses and 2 million freelance professionals in more than 150 countries use Elance. Each year more than 1 million freelance jobs are completed through Elance, and to date our professional community has earned nearly $700 million

Odesk.com is committed to helping you get quick access to the latest jobs that are relevant to you. This is why we are really excited to share a couple of new features to help contractors find jobs! Here’s the breakdown of all the enhanced features or watch our short video to learn more ....

Companies, shops, websites and individuals offer work for programmers to create a software solutions for their business. The above websites are free to sign-up with as a programmer "Contractor or service provider", once you've verified your identity online of using any mean the website offer you, you may receive job offer, job interview requests or even direct hiring from an owner (Job owner or service consumer).

There are several paying methods and working methods (I.e. Working part-time, hourly, predefined amounts or fixed amounts). You may be asked to open an account online or at a real bank to receive your payments.

As good and much feed-backs you get from your employer, the more work you will get in the future, programmers with good reference are on demand always.