473,469 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

What is wrong with Designer? Task List errors...

Hi,

I wanted to insert linebreaks in the tooltip property of some of my
controls.
I simply altered the designer generated code in InitializeComponent:

Me.MyTooltip.SetToolTip(Me.TextBox1, "Text line 1" & vbCr & "Text line 2.")

But whenever I change back to desinger I get this error in the Task List:
"The variable 'vbCr' is either undeclared or was never assigned."

I've encountered similar problem before when I've e.g. inherited the data
grid textbox and used the altered data grid textbox within a datagrid and
the designer always deleted the code related to the inherited data grid
textbox. In this case I just had no choice but to put the related code in
sub new of the form.

I even tried something like this:

Private strToolTip As System.String

Me.strToolTip = New System.String("Text line 1" & vbCr & "Text line 2.")
Me.MyTooltip.SetToolTip(Me.TextBox1, Me.strToolTip)

But then I get the error: "The variable 'strToolTip' is either undeclared or
was never assigned."
It seems to me that you can't even declare a variable and use it
InitializeComponent sub.
I sure could put the code in sub new of the form or in form load, to get it
work but this is not about that. I simply want to know how to get it work
straight within InitializeComponent.
I tried everythink to get it work but no success! This is strange behaviour!
Isn't it?
Am I missing something here?
--
Thanks in advance
Ali Eghtebas Sweden
Nov 19 '05 #1
2 1771
Hello,

"Ali Eghtebas" <al***@home.se> schrieb:
I wanted to insert linebreaks in the tooltip property of some of my
controls.
I simply altered the designer generated code in InitializeComponent:

Me.MyTooltip.SetToolTip(Me.TextBox1, "Text line 1" & vbCr & "Text line 2.")
But whenever I change back to desinger I get this error in the Task List:
"The variable 'vbCr' is either undeclared or was never assigned." [...] I sure could put the code in sub new of the form or in form load, to get it work but this is not about that. I simply want to know how to get it work
straight within InitializeComponent.


I am able to reproduce the behavior. IMHO you should not alter the Designer
Generated Code. Maybe you can add the code to the Load event handler.

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 19 '05 #2
Also, unless .NET does something wierd with tooltips, Multiline tooltips
only work in 2000+

--
Happy to help,
-- Tom Spink
(th**********@ntlworld.com)

"Go down with your server"

http://dotnetx.betasafe.com >> On The Mend

Please respond to the newsgroup,
so all can benefit
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:ey**************@tk2msftngp13.phx.gbl...
Hello,

"Ali Eghtebas" <al***@home.se> schrieb:
I wanted to insert linebreaks in the tooltip property of some of my
controls.
I simply altered the designer generated code in InitializeComponent:

Me.MyTooltip.SetToolTip(Me.TextBox1, "Text line 1" & vbCr & "Text line 2.")

But whenever I change back to desinger I get this error in the Task List: "The variable 'vbCr' is either undeclared or was never assigned."

[...]
I sure could put the code in sub new of the form or in form load, to get

it
work but this is not about that. I simply want to know how to get it work straight within InitializeComponent.


I am able to reproduce the behavior. IMHO you should not alter the

Designer Generated Code. Maybe you can add the code to the Load event handler.

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris Cioffi | last post by:
I started writing this list because I wanted to have definite points to base a comparison on and as the starting point of writing something myself. After looking around, I think it would be a...
2
by: Ali Eghtebas | last post by:
Hi, I wanted to insert linebreaks in the tooltip property of some of my controls. I simply altered the designer generated code in InitializeComponent: Me.MyTooltip.SetToolTip(Me.TextBox1,...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
3
by: Bob.Henkel | last post by:
I write this to tell you why we won't use postgresql even though we wish we could at a large company. Don't get me wrong I love postgresql in many ways and for many reasons , but fact is fact. If...
0
by: RK | last post by:
Hello I am using Microsoft Development Environment 2003 Version 7.1.3088 & Framework 1.1.4322 and developing Windows Forms using Visual C#. It was working fine for quite a month. Currently...
5
by: Markus Wildgruber | last post by:
Hi! We create an inherited user control and add it to a form. When we successfully compile the project and switch to the designer of the form again, the control disappears and we get 2 error...
0
by: Chris Dunaway | last post by:
I use 'TODO's to add items to the task list to remind me of things that I need to do. I right click the task list and choose Show Tasks > All so that all items are shown. This works fine. ...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
12
by: =?Utf-8?B?QnJhZA==?= | last post by:
i dont understand this behaviour... i open a vb form i created and want to save it as a new name and make some changes when i do (in vs2005) the original form looses its ui whats up with...
5
by: Smokey Grindel | last post by:
Anyone able to figure whats wrong here? It is saying it cant convert from itself to itself? I am confused on this error that the designer is throwing... One or more errors encountered while...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.