Wrox Programmer Forums
|
BOOK: Visual Basic 2010 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2010 Programmer's Reference by Rod Stephens; ISBN: 9780470499832
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2010 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2011, 06:51 AM
Registered User
 
Join Date: Nov 2011
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default Missing "&", ampusand

I enter 'M&G' into TextBox1.Text via the keyboard. I then transfer to Label1.Text by use of Label1.Text = TextBox1.Text. But when the data is displayed in label1.text the '&' is missing, all I see is 'MG'. What on earth am I doing wrong. I am very new to VB, I've been a dedicated Delphi user up til now, so be kind to me.

Regards

Last edited by Bill Bonnet; November 6th, 2011 at 08:19 AM..
 
Old November 6th, 2011, 10:21 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

When you enter an & in a label or menu item, the & tells Visual Basic that the following letter should be underlined and used as the control's accelerator. (The letter that activates the control if you press Alt.) If you enter M&G, you should see MG.

To get an ampersand, type && as in M&&G.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
The Following User Says Thank You to Rod Stephens For This Useful Post:
Bill Bonnet (November 6th, 2011)





Similar Threads
Thread Thread Starter Forum Replies Last Post
"type" attribute missing in $pres() responce senpai BOOK: Professional XMPP Programming with JavaScript and jQuery 11 April 21st, 2010 12:14 PM
How to theme the "Browse" button of "FileUpload" control? varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 01:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM
Chap 11: "Properties" function missing tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 May 24th, 2009 09:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.