|
check if the active property is still true after the context menu, if it is I wouldn't know either
No hurries, no worries.
|
|
|
|
|
I have set the property also to true in the contextmenu. But I saw alos that if I press ESC in the contextmenu the tooltip is not shown anymore ((
Thanks for your help!!!
|
|
|
|
|
hi,
you can change the tool tip text when ever needed.
toolTip1.SetToolTip(this.button1, "My button1");
the follwing was from an external help:
The following code example creates an instance of the ToolTip class and associates the instance with the Form that the instance is created within. The code then initializes the delay properties AutoPopDelay, InitialDelay, and ReshowDelay. In addition the instance of the ToolTip class sets the ShowAlways property to true to enable ToolTip text to always be display regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a Button and a CheckBox. The code example requires that the method defined in the example is located within a Form that contains a Button control named button1 and a CheckBox control named checkBox1, and that the method is called from the constructor of the Form.
Visual Basic
' This example assumes that the Form_Load event handling method
' is connected to the Load event of the form.
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load
' Create the ToolTip and associate with the Form container.
Dim toolTip1 As New ToolTip()
' Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 5000
toolTip1.InitialDelay = 1000
toolTip1.ReshowDelay = 500
' Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = True
' Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(Me.button1, "My button1")
toolTip1.SetToolTip(Me.checkBox1, "My checkBox1")
End Sub
C#
// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
private void Form1_Load(object sender, System.EventArgs e)
{
// Create the ToolTip and associate with the Form container.
ToolTip toolTip1 = new ToolTip();
// Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = true;
// Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(this.button1, "My button1");
toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
}
C++
// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
void Form1_Load( Object^ sender, System::EventArgs^ e )
{
// Create the ToolTip and associate with the Form container.
ToolTip^ toolTip1 = gcnew ToolTip;
// Set up the delays for the ToolTip.
toolTip1->AutoPopDelay = 5000;
toolTip1->InitialDelay = 1000;
toolTip1->ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1->ShowAlways = true;
// Set up the ToolTip text for the Button and Checkbox.
toolTip1->SetToolTip( this->button1, "My button1" );
toolTip1->SetToolTip( this->checkBox1, "My checkBox1" );
}
J#
// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
private void Form1_Load(Object sender, System.EventArgs e)
{
// Create the ToolTip and associate with the Form container.
ToolTip toolTip1 = new ToolTip();
// Set up the delays for the ToolTip.
toolTip1.set_AutoPopDelay(5000);
toolTip1.set_InitialDelay(1000);
toolTip1.set_ReshowDelay(500);
// Force the ToolTip text to be displayed whether or not the form
// is active.
toolTip1.set_ShowAlways(true);
// Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(this.button1, "My button1");
toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
} //Form1_Load
|
|
|
|
|
I know that solution, but here it is not possible to update the text of the tooltip automatically.
The only solution to solve this is to generate an event OnDataChanged and then to update the ToolTip text...
|
|
|
|
|
hi guys
Anybody knows how to find the last saved file's full path while running
Windows XP?
for example user saved a file named "exam.txt".But I do not know the full path
where the file saved.I want to know "full path of the last saved file".
Who can help me?
thanks.
|
|
|
|
|
What do you use to select the filename?
Regards
Hansjörg
|
|
|
|
|
look up this
http://zamov.online.fr/EXHTML/CSharp/CSharp5.html
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
hi all
i am making a game using C#. a lot of the game variables, i am storing in hash tables. lately whenever i am trying to run the program i am facing outofmemoryexception.
i was not facing this problem before; and has erupted suddenly.
can you suggest a better way to store game information?
please help
vineet
|
|
|
|
|
What kind of data and how much are you talking about?
|
|
|
|
|
I suggest to not use much variables because it become large proccess when u run it and slows ur PC as well..
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
Besure to dispose of all graphics objects .. eg. Brush / Graphics / Pen etc.
|
|
|
|
|
The key thing I hear is "Hash Tables", i.e. plural. Sounds lke you have a added so much data that you have basiscaly overfilled the sink.
The answer I am about to give may not be easy to deal with but it sounds like you are at the point of fix or scrap. Here is what I would do: First perform a full evaluation of the design to determine how much data really needs to store in a persistent manner, how much is ephemeral in nature, and finally what is the best way to store all this stuff? Remember a hash table is a fair amount of code that comes at the expense of memory. However in a game "speed" is the chief criterion. Thus finding a viable storage mechanism and keeping memory utlization reasonable should guide the solution.
For these reasons I would think about creating a more efficient storage strategy. This takes into account things like graphics, you only need one copy and after that you should only store the deltas. Sure this means GDI programming but your are writing a game afterall. Game design is almost always equated with system code, and in C# that equates to unmanaged code. If you create a memory storage strategy and implement memory allocatio via Marshalled OS calls and pointers, then you are on the right track. For sure, any game write should know exactly how much data needs to be stored, how much needs to be paged in from disk, etc.
Although C# is nice for lots of applications, I personally would use C++ for a game because of the closer fit to the OS. At the same time you can always write DLLs in C++ if you need the performance tweaks.
Good Luck
Mike Luster
CTI/IVR/Telephony SME
|
|
|
|
|
hi,
i am writing an smart client appl in C# . and once the changes are made in server it is downloaded to client.. what i wanted to know is that is it the entire application being downloaded or only the UPDATED PART. if so ,where can i find some relevent documentation which can proove the point.further , is it necessary to specify in the mainfest file abt the updates . if needed the how do i do it. i know something abt a function checkfor pending updates but am not very clear.
|
|
|
|
|
I (and aparently others too) really don't know what you are talking about.
Please provide more information and write more clearly...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi Dears !
I need a Text Editor dll contains MS Word ToolBars for use directly in my win forms
Thx for your attention
www.behzadi.net
|
|
|
|
|
Hello,
What exactly is your requirement? A rich text editor or Toolbars like MS Word?
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
I want a richText Editor which has a perfect Tool Bar like MS Word ToolBar.
I have a form for typing and saving mails , and need a powerfull text editor . I know some text editors like WordPad but these are OLE... !
www.behzadi.net
|
|
|
|
|
Hello,
You can have this [^]for a start.
HTH. Cheers
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
I have managed to change the colour of tabpages. I also managed to change the fonts of each tab to my own font. Now my application is in my user defined colour EXCEPT for the tabs for the tabcontrol, how do I change that?!
|
|
|
|
|
see http://www.dotnetrix.co.uk/tabcontrols.html
Regards
Hansjörg
|
|
|
|
|
Hi
i want to know that how to use tracing in windows Application , i know there is trace class available in system.diagnostics and the methods in the trace class are static e.g. Trace.Write etc as i have read on books ,but when i try to use it in the windows application it doesn't gives the write or write line method in the trace class ,i have added the nam space too ,plz reply with example s o i can understand and then implement it,plz reply as soon as possible ,thanks in advance.
Hard work is key to success
|
|
|
|
|
Can you show some code of how you are using it?
|
|
|
|
|
There are some excellent articles here on TraceListeners, I recommend starting there. You can create you own trace logging methods like this:
<br />
public class MyTrace <br />
{<br />
private readonly string tracePath;<br />
private StreamWriter writer;<br />
<br />
public MyTrace( string filename )<br />
{<br />
this.tracePath = filename;<br />
}<br />
<br />
public bool Open( )<br />
{<br />
try<br />
{<br />
writer = new StreamWriter( tracePath );<br />
return true;<br />
}<br />
catch<br />
{<br />
return false;<br />
}<br />
}<br />
public void Log( string format, params object[] args )<br />
{ <br />
if ( writer != null )<br />
{<br />
string msg = string.Format( format, args );<br />
writer.WriteLine( msg );
}<br />
else<br />
throw new Exception( "Trace File must be opened" );<br />
}<br />
public void Close( )<br />
{<br />
writer.Flush( );<br />
writer.Close( );<br />
writer = null;<br />
}<br />
}<br />
Good Luck
Mike Luster
CTI/IVR/Telephony SME
|
|
|
|
|
Hi there!
I try to serialize Unit struct into XML,
<code>XmlSerializer xs = new XmlSerializer(typeof (Unit));
MemoryStream s = new MemoryStream();
xs.Serialize(s, new Unit(100));
Console.WriteLine(Encoding.UTF8.GetString(s.ToArray()));</code>
Then I got following XML:
<code><?xml version="1.0"?>
<Unit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></code>
There is no data in this XML.
Ummm, need helps, thanks.
-- modified at 23:50 Tuesday 14th March, 2006
|
|
|
|
|
The Xml serializer requires the fields to be public.
|
|
|
|