Hi all,
Using the toolbox I added a tooltip provider to my form, and set the text
for each of my buttons using the properties window.
When I first show the form using .showdialog the tooltips work. However
if I close and re-open the form the tooltips are no longer displayed.
Am I missing something obvious or is this a bug ??
thanks in advance
Steve 11 1682
Are you using 2003 or 2003, I have no problems on 2003. Also how are you
closing and re-opening the form ?
--
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmv ujpotXjui/OFU".ToCharArra y()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar( Convert.ToInt16 (ch(i)) - 1)
Next
Process.Start(" mailto:" & New String(ch))
--
"Steve Cutting" <sc******@optus net.com.au> wrote in message
news:op******** *************** *********@4ax.c om... Hi all,
Using the toolbox I added a tooltip provider to my form, and set the text for each of my buttons using the properties window.
When I first show the form using .showdialog the tooltips work. However if I close and re-open the form the tooltips are no longer displayed.
Am I missing something obvious or is this a bug ??
thanks in advance Steve
On Fri, 8 Oct 2004 14:11:22 +0100, "One Handed Man \( OHM - Terry Burns \)"
<news.microsoft .com> wrote: Are you using 2003 or 2003, I have no problems on 2003. Also how are you closing and re-opening the form ?
Hi Terry,
Using 2003. The form is opened using .showdialog from another form.
Closing via dialogresult.OK/cancel or close button. Just tried me.close as
well. All have the same effect.
The tooltips work with the first .showdialog call but not subsequent ones
thanks
Steve
I set the same up here and cant re-produce it I am afraid. If you create a
brand new project with Form1 and Form2, calling Form2 from Form1, does this
still fail. It may be that something is corrupted in your project or some
other oddity has occured
Try that first and lets see where we gor from there
--
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmv ujpotXjui/OFU".ToCharArra y()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar( Convert.ToInt16 (ch(i)) - 1)
Next
Process.Start(" mailto:" & New String(ch))
--
"Steve Cutting" <sc******@optus net.com.au> wrote in message
news:cu******** *************** *********@4ax.c om... On Fri, 8 Oct 2004 14:11:22 +0100, "One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> wrote:
Are you using 2003 or 2003, I have no problems on 2003. Also how are you closing and re-opening the form ?
Hi Terry,
Using 2003. The form is opened using .showdialog from another form. Closing via dialogresult.OK/cancel or close button. Just tried me.close as well. All have the same effect.
The tooltips work with the first .showdialog call but not subsequent ones
thanks Steve
On Fri, 8 Oct 2004 14:31:40 +0100, "One Handed Man \( OHM - Terry Burns \)"
<news.microsoft .com> wrote: I set the same up here and cant re-produce it I am afraid. If you create a brand new project with Form1 and Form2, calling Form2 from Form1, does this still fail. It may be that something is corrupted in your project or some other oddity has occured
Try that first and lets see where we gor from there
Yes I just tried that in order to isolate it from my project.
Here is what I just did...
Started a new project
Created form1 with 1 button
Created form2 with 1 button
Added tooltip to form2 and set tooltip text for the button
Put the following in form 1..
Public Class Form1
Inherits System.Windows. Forms.Form
#Region " Windows Form Designer generated code "
private f2 as new form2
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
f2.ShowDialog()
End Sub
End Class
This fails as I have described. form2 will only display the tooltip on the
first open
thanks again
Steve
Change your code to this and it will work. . . .
private f2 as form2
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
f2= new Form2
f2.ShowDialog()
End Sub
--
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmv ujpotXjui/OFU".ToCharArra y()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar( Convert.ToInt16 (ch(i)) - 1)
Next
Process.Start(" mailto:" & New String(ch))
--
"Steve Cutting" <sc******@optus net.com.au> wrote in message
news:b4******** *************** *********@4ax.c om... On Fri, 8 Oct 2004 14:31:40 +0100, "One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> wrote:
I set the same up here and cant re-produce it I am afraid. If you create a brand new project with Form1 and Form2, calling Form2 from Form1, does this still fail. It may be that something is corrupted in your project or some other oddity has occured
Try that first and lets see where we gor from there
Yes I just tried that in order to isolate it from my project.
Here is what I just did...
Started a new project Created form1 with 1 button Created form2 with 1 button Added tooltip to form2 and set tooltip text for the button Put the following in form 1..
Public Class Form1 Inherits System.Windows. Forms.Form
#Region " Windows Form Designer generated code "
private f2 as new form2
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
f2.ShowDialog()
End Sub
End Class
This fails as I have described. form2 will only display the tooltip on the first open
thanks again Steve
On Fri, 8 Oct 2004 15:31:07 +0100, "One Handed Man \( OHM - Terry Burns \)"
<news.microsoft .com> wrote: Change your code to this and it will work. . . .
private f2 as form2
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventAr gs) Handles Button1.Click
f2= new Form2 f2.ShowDialog()
End Sub
Thanks Terry. Yes this works but I don't see why it should be necessary to
instanciate a new form every time. After all a form called with .showdialog
just hides when you close it, and just sits there ready to be opened again.
As such you only need one instance if that's how you're using it.
That's how I use most of the forms in my program, and it's only these
tooltips that have caused problems.
I'm thinking this must just be a bug ??
thanks again
Steve
When a form is closed, all resources created within the object are closed
and the form is disposed. If you simply want to hide the form from view use
the Hide() method.
--
OHM ( Terry Burns ) * Use the following to email me *
Dim ch() As Char = "ufssz/cvsotAhsfbuTpmv ujpotXjui/OFU".ToCharArra y()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar( Convert.ToInt16 (ch(i)) - 1)
Next
Process.Start(" mailto:" & New String(ch))
--
"Steve Cutting" <sc******@optus net.com.au> wrote in message
news:u6******** *************** *********@4ax.c om... On Fri, 8 Oct 2004 15:31:07 +0100, "One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> wrote:
Change your code to this and it will work. . . .
private f2 as form2
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventA rgs) Handles Button1.Click
f2= new Form2 f2.ShowDialog()
End Sub
Thanks Terry. Yes this works but I don't see why it should be necessary to instanciate a new form every time. After all a form called with .showdialog just hides when you close it, and just sits there ready to be opened again. As such you only need one instance if that's how you're using it. That's how I use most of the forms in my program, and it's only these tooltips that have caused problems.
I'm thinking this must just be a bug ??
thanks again Steve
Hi Steve
There are undoubtedly problems with the way the tooltip control works. It
has been the subject of some recent threads.
I have had a similar problem, where clicking a button on a form, for
example, stops the tooltip working for that control. I have got round this
by handling the MouseEnter event for each control that has a tooltip, and
explicitly setting the text for the tooltip every time the event fires. It
shouldn't be necessary, but it works, and it may well get round your problem
as well.
HTH
Charles
"Steve Cutting" <sc******@optus net.com.au> wrote in message
news:u6******** *************** *********@4ax.c om... On Fri, 8 Oct 2004 15:31:07 +0100, "One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> wrote:
Change your code to this and it will work. . . .
private f2 as form2
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventA rgs) Handles Button1.Click
f2= new Form2 f2.ShowDialog()
End Sub
Thanks Terry. Yes this works but I don't see why it should be necessary to instanciate a new form every time. After all a form called with .showdialog just hides when you close it, and just sits there ready to be opened again. As such you only need one instance if that's how you're using it. That's how I use most of the forms in my program, and it's only these tooltips that have caused problems.
I'm thinking this must just be a bug ??
thanks again Steve
On Fri, 8 Oct 2004 16:40:39 +0100, "Charles Law" <bl***@nowhere. com> wrote: Hi Steve
There are undoubtedly problems with the way the tooltip control works. It has been the subject of some recent threads.
I have had a similar problem, where clicking a button on a form, for example, stops the tooltip working for that control. I have got round this by handling the MouseEnter event for each control that has a tooltip, and explicitly setting the text for the tooltip every time the event fires. It shouldn't be necessary, but it works, and it may well get round your problem as well.
Thanks Charles. I ended up with the following solution which seems to work.
I just create a new instance of the tooltip in my form_load event. The
tooltips now display as expected for each .showdialog call.
thanks again
Steve
Public Class form2
Inherits System.Windows. Forms.Form
#Region " Windows Form Designer generated code "
private ToolTip1 as tooltip
Private Sub form2_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'initialise tooltips
ToolTip1 = New ToolTip
ToolTip1.SetToo lTip(button1, "tooltip text 1")
ToolTip1.SetToo lTip(button2, "tooltip text 2")
end sub
end class This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Ei |
last post by:
I'm working on a C# Windows Forms application that is leaking memory.
I've been using the SciTech NetMem Profiler 2 (A really great tool,
BTW) to track down leaks. I've found one related to ToolTips that I've
been unable to fix.
We have a base form, from which we add and remove panels. When
created, the panels create tooltips which they associate with
themselves. When removed, the panels and their tooltips are Disposed.
The disposed...
|
by: ADavis |
last post by:
We have an existing ActiveX control that plots data points over an
image. When the mouse is moved over these points, a tool tip is
supposed to be displayed indicating information about the point.
This control is already deployed in an unmanaged application and works
correctly there. We have been attempting to re-use it in a .Net forms
based application and have gotten all other aspects to work except the
tooltips.
The ToolTips...
|
by: David Hayes |
last post by:
I've made tooltips work in Firefox*, but tooltip doesn't appear at the
specified location until the SECOND time that the user passes the mouse over
the location with the mouseover event. What I want is for the user to be
able to put the mouse over text that gives a year (e.g., "(1932)", "(1946)"
and "(1923)") and see the tooltip to the right and slightly beneath the
year.
(For the record -- this needn't concern the debugging effort --...
|
by: Wayne Aprato |
last post by:
Tooltips in Access have not worked on my machine for a long time
despite several reinstalls of the operating system and applications at
fairly regular intervals. I have finally pinned down the culprit. I
have just performed a reformat and reinstallation of all apps and
utilites one at a time and checked that tooltips in Access was working
after each new application was installed. Acrobat 5 was the culprit.
With it installed tooltips...
|
by: glhanson |
last post by:
I am using the AxWebBrowser control to display a simple HTML page on a
windows form. I want to display tooltips using the title attribute for
the hrefs. The tooltips work fine when the HTML is displayed in IE and
FireFox, but they don't work at all inside the AXWebBrowser.
Does anyone know if tooltips are not supported, or is there a property
on the control that needs to be set? Or maybe something else I am
overlooking?
Any help is...
| |
by: David Batt |
last post by:
Hello
I have a problem whereby I wish to setup a custom tooltip. I have the code attached to do this, it all works very wel
if you have the following code in a button click event on the form
toolTip1.SetToolTip(BtnProjSearch, "Search for a Project"
toolTip1.SetToolTip(cboSelect, "select the number of projects that you wish to select"
Dim tp As New CustomTi
tp.CustomBalloon(toolTip1
|
by: TyBreaker |
last post by:
I have a simple form with a toolstrip on it and some toolstrip buttons.
Tooltips work fine.
But then I use the ShAppBarMessage API call to register the form as an
Application Desktop Toolbar. That's when the tooltips seem to stop working.
Does anybody know why this is so?
I heard SP1 for Visual Studio 2005 is imminent so if nobody can help,
I'll cross fingers and see if it is a VS2005 bug rather than my own
|
by: timnels |
last post by:
I have an issue where I have a user control that is launched into a
floating form. At some point later, I allow the user to "unfloat" the
user control by reparenting it on a split container in another form.
Problem is if I wake a tooltip when the window is floated, and then try
the same thing when it is reparented, the app crashes with " Cannot
access a disposed object.Object name: 'Form'.
Presumably, this is a result of the tooltips...
|
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= |
last post by:
Hi,
Is it possible to access menustrips and tooltips from the IDE when they
are present on a form from which you have inherited? I would like to have a
template form from which a bunch of forms inherit. This template would have a
tooltip provider & a menustrip, but I need to be able to access both of those
in the child forms to add remove items. I can manipulate the programatically
by creating getters & setters, but I would prefer to...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |