Free articles
Google
Web www.media13.com


Media13.com is a source of free to republish or reprint articles, writers may submit your articles in our database as long so you agree that your article will be freely republish or reprint by other.


Submit Article

Search our database

Received article from us.

Name

Email Address

Friends

Bollywood News
Link building
Article submission service
Freelance Writers
Laser hair removal

We have been looking for freelance writers. Contact us

 


How to get Xp like buttons, check boxes, radio buttons and progress bars in VB.net   by Sumedh K



This tutorial will teach you how to add an application manifest (a file used during the build process to specify a certain resource)

which specifies that Comctl32.dll (version 6) should be used if its available. Comctl32.dll is responsible for changing the

appearance of controls in your application.



Windows Xp ships with version 5 and version 6 of the same file. To get xp controls you need to bind the version 6 file with your

application, this binding is done with the help of the manifest file. A manifest file is just a simple xml file which is included in

your application.





Enough of this technical jargon, just tell me how to do it.







Create a new project.



1) Create a new project, we will call it `WindowsApplication1`. Remember where you save it.



2) Now drag the following controls

Button

CheckBox

ProgressBar

RadioButton

StatusBar



3) Change the Button, Checkbox and RadioButton control`s Flatstyle property to System.



4) Double click on the button and add the following code to its click event.



ProgressBar1.Value = 50



5) Your button`s click event should look this.



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


ProgressBar1.Value = 50


End Sub



6) From the Build Menu, click on Build WindowsApplication1



7) Click on Save All from the file menu.



8) Dont close the Solution.







Making the Manifest



1) Go to your bin directory of your project where you will see your excutable.



2) Create a new text file in notepad with any name ( we will change the name later) in the same directory.



3) Copy, Paste the following code in the file. Incase you are lazy, download the file from the bottom of the page.




<?xml version=`1.0` encoding=`UTF-8` standalone=`yes`?>

<assembly xmlns=`urn:schemas-microsoft-com:asm.v1`


manifestVersion=`1.0`>


version=`1.0.0.0`

processorArchitecture=`x86`

name=`MyApp`

type=`win32`

/>

<description>Cool Trick</description>

<dependency>

<dependentAssembly>


type=`win32`

name=`Microsoft.Windows.Common-Controls`

version=`6.0.0.0`

processorArchitecture=`X86`

publicKeyToken=`6595b64144ccf1df`

language=`*`

/>

</dependentAssembly>

</dependency>

</assembly>



4) Click on save from the file menu.



5) Rename the file to `WindowsApplication1.exe.manifest` without the double quotes.



6) If you get a warning which says `Are you sure you want to change it?`. Click on Yes.



7) Click on Start from the Debug Menu. Your application will be in Xp style Controls. Click the button control to see the

new look of the ProgressBar.





If your application does not look like the one in Figure 2 then you must have missed some step. Make sure you change the

FlatStyle property of the controls to System.







Building the Manifest into your Executable



If you build your executable and give it to your friends, they won`t be able to see the Xp style controls, unless you pass

the manifest as well. To solve this problem we need to build the manifest in the executable.



1) In VB.Net select File -> Open -> File.

Note - Save and close your previous solution first.



2) Find your executable you want to add the manifest to and open it.







3) Right Click on WindowsApplication1.exe and click on Add Resource.



4) Click on Import button in the Add Resource Dialog box.



5) Find the Manifest file we created earlier and open it.

Note - If you cant find the file check `Files of Type` and select All Files (*.*)



6) The Custom Resource Type dialog box will appear. Type `RT_MANIFEST` (without quotes) in Resource Type:

Click on OK.







7) Right click on 101 and select Properties. Set the following.

ID = 1

Language = Neutral











8) Click on Save All from the File Menu.







Conclusion





With this simple tutorial we can now manipulate the appearance of buttons, checkboxes and

radiobuttons to look like those of Windows Xp.



Now you can give the executable to all your friends without the manifest file and it will still

appear with Xp visual style.



Note - This will work only on Windows Xp only because earlier operating systems like Win 2000

and 98 cannot run Comctl32.dll. Your executable in those operating system will look like default.



If the theme in the Xp system is classic you wont be able to see Xp style controls.

Author Info:

Sumedhk.com

Click here to see the pics with the article.
Articlewithpics


Latest 20 articles

IRS Offer in Compromise – Can It Solve Your IRS Tax Debt Problems? Taking on IRS tax debt is a daunting task that presents many confusing issues. The majority of taxpayers are aware of the option to pay their IRS tax debt in full or pay the tax debt in monthly payments or installments. But there is another option, the IRS “Offer in Compromise.” Knowing the steps to success with an IRS Offer in Compromise, also commonly called IRS tax settlement is important, bec

IRS Tax Debt Settlement Help – When You Need Expert Tax Debt Help With the recent downturn in the economy, Americans find themselves not only facing unsecured credit card debt problems, and difficulties handling their home and vehicle loans, but oftentimes unable to pay their IRS taxes in a timely manner. There is IRS tax debt help available to anyone who finds they owe money for back income taxes to the Internal Revenue Service. The federal government offers

Hidden Dog Fence for your dog Almost everyone who has a pet at home knows value of added exercise and the troublesome task of confining him within the boundaries of their own property. This task is especially difficult with dogs as they take it as a personal challenge to try and defy the fence boundaries. However, you can train your dog to respect his boundaries with the help of an invisible, underground wired dog fence /

Top Dog Containment Solution to make you Worry Free Is your dog driving you crazy? Are you sick of listening to your neighbors’ complaints about your dog running around in their yard? Then you are not alone; almost every pet owner suffers with this problem. Often they confine their dogs to the house due to fears that their dog may wander away. This is a valid fear, as dogs, especially the ones who are new to the house or have not been trained prope

Outdoor Services in Virginia A front lawn is the face of a house and no matter how beautifully you have decorated your house, if your lawn is not beautiful then all your efforts will be useless. It is very important to take care of your lawn because, as it is said, “the first impression is the last impression”. For most people, lawn care is a very tedious task. Most people don’t have the time or energy to spend hours in th

Hidden Dog Fence – Perfect Dog Containment Solution Does your dog refuse to listen to you? Are you tired of telling your dog to not go outside the confines of your house? Does chaining or locking up your dog makes you feel guilty? Is your dog ruining the interior of your house because you cannot let him go in the yard because you are afraid to let him out? Then stop worrying! The perfect solution for all these problems is here. There is a pet co

Debt Settlement: Your Bankruptcy Alternative? There are several different paths you can travel to achieve effective credit card debt reduction and pursue living a debt free life. The method which will be covered here is called debt settlement, and there are numerous debt settlement services to choose from if you determine this is the “debt recovery path” you are going to take. Credit card debt settlement is a credit card debt reduction solu

Los Angeles Brain Injury Lawyers Assist California Motorcycle Accidents Victims Last year over 6,686,147 motorcycles were registered within the United States and the number of registrants has been steadily increasing by at least 7% each year since 2003 according to the NHTSA. Consequently the NHTSA also reported that nation wide last year there were 103,000 motorcycle injuries that did not result in a fatality and California has the second highest motorcycle fatality rate in

Christian Debt Relief: What Are Your Options? Unfortunately, with the downturn in the U.S. economy, credit card debt problems have become one of the biggest challenges facing Christians and their families as they strive to have a healthy financial future. Credit card debt is crippling not just Christians, but all Americans, regardless of faith or race or gender. The good news is that there are Christian debt relief solutions available that c

Christian Alternatives to Bankruptcy – Consider Christian Debt Settlement The recent recession in the U.S. economy has created both employment and financial challenges for Americans and Christian families alike. Credit card debt problems will no doubt reach an all time high as unemployment rates continue to rise. Christians face the reality that filing bankruptcy may be their “only way out”, but that is not necessarily the only workable solution that may be available.

California Brain Injury Lawyers Experienced in Auto Accidents California is one of the most populated states and is known for its traffic congestion. The number of California auto accidents can be daunting. The NHTSA reported that there were 5,987,000 non fatal accidents in 2007; 2,491,000 of those car accidents resulted in injury. The Brain Injury Association estimates that 62 % of all transportation related Brain Injuries occur in an enclosed motor veh

Why Should I Hire a Seattle Real Estate Attorney? In every real estate transaction there are a wide variety of legal issues that must be taken care of. Contracts should always be reviewed by an attorney who understands the nuances of real estate law. But there are also state specific State laws to contend with. A Seattle real estate lawyer deals with a large number of State legal issues related to acquiring, financing, developing, managing, co

California IT Professionals – In Need of California Class Action Attorneys! It is hard to miss the wave of California wage and hour litigation related to California IT professionals and Computer employee overtime that has been sweeping California recently. Even the largest software and computer companies have paid out millions of dollars to employees wrongfully classified as “exempt”, or in other words, not entitled to overtime. A layperson would believe that with pr

Protect Your Mental Health With A Payday Loan Just when you thought that things couldn’t get any worse, more banks went under. More countries are declaring economic crisis. It seems that the world’s financial problems are bound to get worse. Even if you do not have considerable investments in various banks, I am sure that you are feeling the stress that results from these economic upheavals. I sure am. I am just an average person, with a

Free Bulk SMS services People are getting very busy these days without having enough time to talk unless it is very important. Mobile SMS have supported this need to contemporary times as now people do not want to call and enter in the unproductive conversation before coming up to the actual issue. SMS provides you the benefit to come straight to the point and also saves money. What if you get this totally free?

HELP – I Have IRS Levy Problems! If IRS collection notices are ignored, the IRS is forced to collect from taxpayers by force. They do this with their dreaded IRS levy. By law, the IRS has the right to levy bank accounts (IRS bank levy), garnish your paychecks (IRS wage levy), or even seize your assets. But you do not have to let the IRS bully you or your family. There are ways to stop an IRS levy. The first step is to know the

Why Use Professional Tax Debt Help? Good IRS tax relief is hard to find and for people with complicated tax issues, it is an absolute necessity. But how do you know which tax reduction firm is the best one to try? How can you be sure you're going to get the tax debt help that you need? And why is it so vital to receive help from professionals? Settling Your IRS Tax Debt For Less When your IRS tax debt is spiraling out

IRS Settlement – Can You Really Settle Your IRS Tax Debt for Less? It's possible to settle your IRS tax debt, but it presents a challenge. Proving you can settle your tax debt for less is a daunting experience. You have to contend with pages of IRS paperwork rife with technical terms. Settling tax debt is indeed a reality and it can be done. However, there's a lot you need to know before you attempt to settle your IRS tax debt. Rebuking the Lies - The

IRS Tax Relief – The Most Popular IRS Tax Relief Solutions Tax law provides many solutions for resolving tax debt. But if you were to contact the IRS directly, they would only alert you to one solution, and that's paying the tax debt in full. Here are five popular IRS tax relief solutions you should know about to be more informed. IRS Tax Settlement It is possible to settle your IRS tax debt. But there are some pitfalls you need to know. Fi

Hire the California Labor Board or California Labor Law Attorneys - You Decide With a downturn in the economy, many employers are cutting back on payroll. Unfortunately, some employers are reducing payroll costs by violating the California overtime laws. When this occurs, employees have essentially two options to recover their California overtime pay: the California labor board, or hiring California labor law attorneys. Although the California Labor Board is a commonly

Categories
Acne
Advertising
Advice
Aerobics-Cardio
Affiliate Programs
Alternative
Arts
Attraction
Auctions
Audio-Streaming
Autos
Awards
Babies-Toddler
Beauty
Blogging-RSS
Book-Marketing
Branding
Breast-Cervical-Ovarian-Cancer
Broadband-Internet
Build-Muscle
Business
Cancer
Careers-Employment
Casino-Gambling
CGI
Coaching
Coffee
College-University
Colon-Rectal-Cancer
Communications
Computers
Cooking-Tips
Copywriting
Crafts-Hobbies
Creativity
Credit
Cruising-Sailing
CSS
Currency-Trading
Customer-Service
Dating
Debt-Consolidation
Debt-Relief
DHTML
Diabetes
Direct Mail
Divorce
Domain Names
EBooks
ECommerce
Education
Elder-Care
Email-Marketing
Email Entertainment
Entrepreneurialism
Environment
Exercise
Ezine-Marketing
Ezine-Publishing
Family
Finance
Fishing
Fitness
Food
Free
Games
Gardening
Goal-Setting
Golf
Government
Grief-Loss
Hair-Loss
Happiness
Hardware
Health
Hobbies
Holidays
Home-Security
Homes
Home Business
Home Repair
HTML
Humanities
Humor
Innovation
Inspirational
Interior-Decorating
Internet-Marketing
Javascript
Kids And Teens
Landscaping-Gardening
Law
Leadership
Leases-Leasing
Legal
Leukemia
Link Popularity
Loans
Lung-Cancer
Lymphoma-Cancer
Management
Marketing
Marriage-Wedding
Martial-Arts
Medicine
Meditation
Men's-Issues
Metaphysical
MLM
Mobile-Cell-Phone
Mortgage-Refinance
Motivational
Multimedia
Music
Negotiation
Network-Marketing
Networking
News-and-Society
Newsletters
Nutrition
Off-Line Promotion
Online Business
Online Promotion
Organizing
Other
Outdoors
Page Rank
Parenting
Personal-Tech
Pets
Photography
Podcasting
Poetry
Politics
Positive-Attitude
PPC-Advertising
Presentation
Prostate-Cancer
Psychology
Public-Speaking
Publishing
Real-Estate
Recipes
Recreation
Reference
Relationships
Religion
Sales
Sales-Management
Sales-Teleselling
Sales-Training
Satellite-Radio
Satellite-TV
Scams
Science
Security
Self Help
Self Improvement
Sexuality
SE Optimization SE Positioning
SE Tactics
Shopping
Site-Promotion
Site Security
Skin-Cancer
Small-Business
Social Issues
Society
Software
Spam
Spirituality
Sports
Stocks-Mutual-Funds
Strategic-Planning
Stress-Management
Structured-Settlements
Success
Supplements
Taxes
Team-Building
Technology
Teleseminars
Time-Management
Traffic-Building
Traffic Analysis
Travel
Uterine-Cancer
Vacation-Rentals
Video-Conferencing
Video-Streaming
Viral Marketing
VOIP
Web-Development
Webmasters
Web Design
Web Hosting
Weight Loss
Wine-Spirits
Women
Writing
Yoga

Copyright © media13.Com  2005. All Rights Reserved.

Sources : SEO India - Internet web directory