473,385 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Jul 19 '05 #1
2 1799
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
Jul 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

Jul 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...
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...
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,...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.