473,462 Members | 1,128 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
Jul 19 '05 #1
2 1803
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
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: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.