![]() ![]() Button Creating a Test Bedīefore we really begin to roll our sleeves up and create our nifty new control, we ought to have somewhere to test it out. Still in the Code Window, change the line that reads: Inherits System. So that it reads: Public Class XtraButtonĪs we are basing our new control totally on the standard button control, we can also change the code so that it specifically inherits all the properties, methods and events of a button. So open the XtraButton.vb's code window and change the line which reads: Public Class UserControl1 Highlight the name 'UserControl1.vb' in the Solution Explorer and change it to XtraButton.vb. Let's change the name of this user control to something more meaningful - "XtraButton" again. This will create a Solution which contains a Project named XtraButton, which in turn contains an object named UserControl1.vb. Give the Project a meaningful name - "XtraButton" will do nicely.Īccept or overwrite the location for the files to be saved to. Select the ' Windows Control Library' icon from the New Project - Templates Window. Setting Upįirst of all, open a new Project. We'll maybe get more adventurous in a later article. There are much more sophisticated things that can be done, but as this is a 'Simple Steps' article, we'll stick to basics for now. In this demo we are simply going to simply build on the functionality of an existing control, a Button control. The control we are going to create is an enhanced version of a standard Button control which we will call the XtraButton control. This article is for beginners and demonstrates step by step how you can create a very basic custom control. He has written and continues to tutor a number of free online courses for VB.NET developers.Īrticle source code: ssteps_customcontrol.zip Introduction Senior Editor for DevCity.NET, vbCity Developer Community Leader and Admin, and DevCity.NET Newsletter Editor. He is a moderator on VBCity and the MSDN Tech Forums and spends a lot of time answering technical questions there and in several other VB forum sites. Ged is a regular contributor to forums on vbCity and authors articles for DevCity. Now working in a consultancy environment, his passion however still remains helping students and professional developers to take advantage of the ever increasing range of sophisticated tools available to them. These include training as a Systems Analyst, working in a mainframe software development environment, creating financial management systems and a short time spent on military laptop systems in the days when it took two strong men to carry a 'mobile' system.īased in an idyllic lochside location in the West of Scotland, he is currently involved in an ever-widening range of VB.NET, WPF and Silverlight development projects. His journey has taken him through many different facets of IT. Ged Mead ( XTab) is a Microsoft Visual Basic MVP who has been working on computer software and design for more than 25 years. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |