this is something simple , i have two ways . one is using cmd and the other one is using shell commands but the both are one line code
Home » All posts
How To Connect And Disconnect The Internet Using VB.NET
in
connect and disconnect internet,
tutorial,
vb.net
- By
Mohamed Shimran
- on 12/19/2012
- 2 comments
How To Make A Simple Captcha Control In ASP.NET
this is my first tutorial on asp.net by the way i am a beginner , i dont think this is something advanced but hope this is useful . i am gonna teach you how to make a simple captcha control without using any HTTP HANDLERS and you can easily add it to your website . all you need is a aspx page so create one ,, the aspx page will have image/jpg . i am using system.drawing namespace to create dynamic images , system will be generating two random numbers and it will store the results of the two numbers into a session variable .
for instance :
a = 2 + 6 (2 and 6 are two random numbers)
session("Answer") = 8
code for captcha.aspx
for instance :
a = 2 + 6 (2 and 6 are two random numbers)
session("Answer") = 8
code for captcha.aspx
How To Make Your Programs Run Automatically When Windows Starts In VB.NET
This is something very useful this is will work on all windows versions because we are using registry and registry is the only way add programs to startup so lets get started making it. You need a button to add your application to startup and you need another button to remove your application from startup, you can also use checkbox instead buttons but i recommend buttons because that is the control that mostly suit for the work so when you add to buttons edit there property TEXT as given below
button1 - Add
button2 - Remove
Double click your button1 and add this code . dont forget to replace application name with your application name and one more thing dont forget to add the same application name to button 2 click event
button1 - Add
button2 - Remove
Double click your button1 and add this code . dont forget to replace application name with your application name and one more thing dont forget to add the same application name to button 2 click event
How To Make A Web Scraper In VB.NET
You have a Web Browser on your application and a listbox and a button(i didn't mention about webbrowser controls) so when you're on a website or a lets say a web page you can click on the button and the all links of the website will be listed on the listbox
create a new project and add a listbox and a button and a webbrowser (add webbrowser controls)
now double click your button and add this code
now just debug
create a new project and add a listbox and a button and a webbrowser (add webbrowser controls)
now double click your button and add this code
'Author : Mohamed Shimran 'Blog : http://www.ultimateprogrammingtutorials.blogspot.com Dim links As HtmlElementCollection = WebBrowser1.Document.Links For Each link As HtmlElement In links ListBox1.Items.Add(link.GetAttribute("href")) Next
now just debug
How To Add Watermark Text To Image In VB.NET
adding watermark text to image using vb.net , for sure i will say AWESOME , by the way i am not going to write a big tutorial with a lot functions i will just teach the basics then you can develop it as much as i know . you can add custom watermark text placer,font color,font,font size,save,etc so lets make it , open your visual basic 2008/2010 and make a new project and name it whatever you want and add two buttons and a textbox and a picturebox , click picturebox1 and properties > backgroundimagelayout > stretch . make your form look like what i have made up
How To Get Installed Fonts In VB.NET
this is not something as i wrote before by the way its kinds of that , i am just using a listbox and a label in this tutorials , the listbox will show all the fonts installed on your computer and the label will show how many fonts you have installed , lets make it , create a new project and name it whatever you want and add a listbox from the toolbox and a label and make everything fits the form like mine
How To Get Installed Applications In VB.NET
you can even make this application like something which is used to uninstall applications by the way i just made this simple because you all should understand the basics of this so hope you understand what this actually is , lets make this . just open visual basic 2008/2010 and create a new project and select windows applications(windows forms application) after form loaded go to form properties and edit things what you do usually , now go to toolbox and drag and drop a listview tool into the form and go to listview properties and select columns and a small windows will popup , on the windows click add two times to add two columns
VB.NET Drop Shadow At The Form Border
this is something make your application attractive by the way this is a simple code that you have to place under public class form1
so here is the code
and the shadow
so here is the code
Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
Get
Const DROPSHADOW = &H20000
Dim cParam As CreateParams = MyBase.CreateParams
cParam.ClassStyle = cParam.ClassStyle Or DROPSHADOW
Return cParam
End Get
End Property
and the shadow
Changing Progress Bar Colors In VB.NET
this is a cool effect not a effect actually but like a effect so i made 3 colors for progressbar and actually they all looks awesome , they are red,green,yellow so lets get started
now if your on a project just add a progressbar or if your not on a project just create a new project and name it whatever you want and add a progressbar and double click your form and add these code below
Public Class Form1 'ultimate programming tutorials Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer Enum ProgressBarColor Green = &H1 Red = &H2 Yellow = &H3 End Enum Private Shared Sub ChangeProgBarColor(ByVal ProgressBar_Name As Windows.Forms.ProgressBar, ByVal ProgressBar_Color As ProgressBarColor) SendMessage(ProgressBar_Name.Handle, &H410, ProgressBar_Color, 0) End Sub End Class
now if you want to make your progressbar color green , add this code to a click event a button is better