473,704 Members | 2,347 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ToolTip Show(...) Method - And External Objects

Hello. I'm trying to display a tooltip to an external window. I have a wrapper class
public class WindowWrapper : System.Windows. Forms.IWin32Win dow {
public WindowWrapper(I ntPtr handle) { _hwnd = handle; }
public IntPtr Handle { get { return _hwnd; } }
private IntPtr _hwnd;
}

But when I call the following

ToolTip tt = new ToolTip();
tt.ShowAlways = true;
tt.Show("Hello" , new WindowWrapper(h Wnd), 100, 100);

I get a "NullObjectRefe rence Exception" - Object reference not set to an instance of an object. at System.Windows. Forms.ToolTip.I sWindowActive(I Win32Window window)

I can however call

MessageBox.Show (new WindowWrapper(h Wnd), "Hello World!");

and a MessageBox shows fine. I can't even get ToolTip method (using show(..)) to work with non-external objects (using the WindowWrapper). Is there something I'm doing wrong or just can't do this with tooltips?

NvrBst
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

Jan 11 '06 #1
0 2620

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

Similar topics

2
1500
by: runningdog | last post by:
Hi, I have created a number of Windows Forms Controls that require tooltips. If I add a tooltip object to each of my controls will this create any resource/performance issues that I should be concerned with. Would it be better to bind to a single tooltip object when the control is consumed by an application? Thanks Steve
2
6610
by: mark | last post by:
I am developing an application in .Net C# that needs to restore a number of tool windows to some previous location and size. The problem I have is that when I create the form and set the Location and Size properties before calling the Show method, the form is not created in the Location that I set. If I call Show first everything works fine but there is excesive flicker when the Location and Size properties are set. I tried calling...
2
4759
by: Alexander Bolotnov | last post by:
Good day to everyone, I am trying to make a ToolTip for a couple of TextBoxes. What I do is: create a new ToolTip and make it a Balloon: ToolTip myToolTip = new ToolTip(); myToolTip.IsBalloon = true; then I add the title and show it:
1
6635
by: Paul Fairless | last post by:
Could someone please explain how I overload the Show() method of a form? Suppose I select a record from a datagrid on Form1, then I want to show the details of the selected record by opening Form2 using say the CustomerID as an 'argument' to the Show method. So, in Form1 I would have code such as: Sub GetSelectedRecord() Form2.Show(CustomerID)
2
39747
by: Paul E Collins | last post by:
How can I show a tooltip programmatically? I want to make it appear over a particular control at the specific time I choose, and not rely on the user's mouse movements. I don't mind using some Windows API call for this, if somebody can explain the parameters. Eq.
4
3776
by: juergen | last post by:
Hello everyone, I want to display a help text when in help mode in my application. Something like a tooltip. Now my application is a taskbar deskband and so not everything works what normally does. Second the WinXP machine is a PC with touchscreen so a tooltip doesn't work because it only appears on hover and not on click. And when pointing the mouse by touching the screen it's a click. The tooltip class is sealed so I can't even...
3
10111
by: Amanda | last post by:
Can anyone help me to display the output in MessageBox for the following program result? -------------------------------------------------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; namespace A2_CISP40506F {
10
2441
by: =?Utf-8?B?QWxiZXJ0IEZ1?= | last post by:
Hi, my function: myAdjustForm.Show(); I am using the Show method to show the pop-up window to the users in my C# program. I found that I have invoke this function TWICE at the beginning before I can see the pop-up window poping up.
8
20444
by: shwethatj | last post by:
How to use MessageBox.Show() method in ASP.NET I mean what namespace should be added...?
0
8677
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,...
0
9130
jinu1996
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...
0
8974
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7879
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, 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...
1
6603
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5926
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();...
1
3130
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 we have to send another system
2
2468
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2074
bsmnconsultancy
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...

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.