|
Hi:
I selected Tooltip from the toolbox and clicked on the form and then for the contriols I want a tooltip, I went to the properties and entered the text I want to show (I tried with an without double quotes).
But I cant get the tooltip to show up. Please could you tell me if I am missing doing something?
Thanks, smurfy
|
|
|
|
|
Hey Smurfy,
Are you talking about Windows or Web application?
Manas
|
|
|
|
|
Hi Manas:
this is for a windows application.
Thanks, smurfy
|
|
|
|
|
I've had various issues with tooltips before as well. What I've found is that if I don't set the tooltip text at form load then the tooltip will never show up. I've often found that I have to set generic text and then set the tooltip active property to false until sometime later in my code I set the text I need and mark the tooltip active again. Using this method works every time. Maybe a bug in c# but i'm not sure.
Oh, and if you need the tooltip to show up even if the control it's bound to isn't the active control of the form then set it's show always property to true.
|
|
|
|
|
thank you I will try that out.
Regards, smurfy
|
|
|
|
|
Please help me
How can I call pass the ArrayList to 2 threads as parameter, and Synchronization thread
This is my code. My coding is not good, please help me
static object lockObject;
static void Main(string[] args)
{
ArrayList space = new ArrayList();
for (int i = 1; i <= 10 ; i++)
{
space.Add(i);
}
lockObject = new object();
lock (lockObject)
{
Thread t1 = new Thread(new ThreadStart(AccessData));
t1.Start();
}
lock (lockObject)
{
Thread t2 = new Thread(new ThreadStart(AccessData));
t2.Start();
}
Thread.Sleep(20*1000);
}
public static void AccessData(ArrayList arr)
{
// Thread.CurrentThread.IsBackground = true;
Random rand = new Random();
int x = rand.Next(space.Count);
space.Remove(x);
Console.WriteLine("x = " + x);
int y = rand.Next(space.Count);
space.Remove(y);
Console.WriteLine("y = " + y);
int newNumber = x + y;
Console.WriteLine("newNumber = " + newNumber);
space.Add(newNumber);
foreach (int inte in space)
Console.WriteLine(inte);
}
eric
|
|
|
|
|
1. Locks are meant to be used inside the threaded code, not outside where you begin the thread. (In other words, use locks inside your AccessData method, not where you start the thread.)
2. You can start a thread with a parameter using something like this:
ParameterizedThreadStart threadStart = MyFunction;
Thread myThread = new Thread(threadStart);
myThread.Start(myArrayList);
...
void MyFunction(object parameter)
{
ArrayList list = (ArrayList)parameter;
}
3. Next time, use the <pre> tag around the code you post on this forum to preserve formatting.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: I luv teh choco
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Please help this. There are 2 errors down
using System;<br />
using System.Threading;<br />
using System.Collections;<br />
namespace ConsoleApplication2<br />
{<br />
class Program<br />
<br />
{<br />
static object lockObject;<br />
<br />
static void Main(string[] args)<br />
<br />
{ <br />
<br />
<br />
ArrayList space = new ArrayList(); <br />
<br />
for (int i = 1; i <= 10 ; i++)<br />
{<br />
space.Add(i);<br />
<br />
} <br />
<br />
lockObject = new object(); <br />
<br />
<br />
<br />
Thread.Sleep(20*1000);<br />
<br />
}<br />
<br />
<br />
<br />
public static void AccessData(object param)<br />
{<br />
<br />
ArrayList list = (ArrayList)param;<br />
<br />
lock (lockObject)<br />
{<br />
Random rand = new Random();<br />
<br />
int x = rand.Next(list.Count);<br />
list.Remove(x);<br />
Console.WriteLine("x = " + x);<br />
<br />
int y = rand.Next(list.Count);<br />
list.Remove(y);<br />
Console.WriteLine("y = " + y);<br />
<br />
int newNumber = x + y;<br />
Console.WriteLine("newNumber = " + newNumber);<br />
<br />
list.Add(newNumber);<br />
<br />
<br />
<br />
foreach (int inte in list)<br />
Console.WriteLine(inte);<br />
<br />
}<br />
<br />
<br />
<br />
}<br />
<br />
}<br />
}<br />
eric
|
|
|
|
|
eric_tran wrote: Please help this. There are 2 errors down
Please clarify. I don't know what you mean by "2 errors down".
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: I luv teh choco
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Sorry Judah
There are 2 errors at the Thread Creation and Start lines
Please help
eric
|
|
|
|
|
I'm replying to your other post above.
|
|
|
|
|
i just wanna know the basics of how it is done in Wav , i have understood the concept in Bitmaps and am able to hide the message in it using the key..
is the same need to be done in Wav File Format ?? or there is some change ..?? plz do help??
Thanx in advance
AMAN ANWAR
|
|
|
|
|
Looking for this one?[^]
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
|
|
|
|
|
Hi all
I put my all configuration data into XML. I want encrypt the XML in such a way to secure it from miscreant.
what approach can i use.
Shall i encrypt each XML element value or
Shall i encrypt the whole XML file
if i encrypt the whole XML file ,then i need to decrypt the file and store it as a temporary XML file, by this temp. file i can process the data using XML document object. how to avoid this.
if i encrypt single XML element alone then the user can able to see the tags and they can able do corrupt.
so what the method i can use for XML encryption or is there anyway to secure the XML file from anonymus users?
I found one method
File.Decrypt(FileName)
but this throws me an IOException "Recovery policy configured for this system contains invalid recovery certificate." how to use this function??
Thanks in advance
Srini
|
|
|
|
|
Hi:
When I tab into fields in a GUI, say a numeric that has the value 0.00 in it, I want the value to be selected by default (highlighted in blue) when I tab in -- so that I can directly replace the entry by typing a different number.
Do the textbox and numeric objects provide some property I can set to achieve this?
Thanks, Smurfy
|
|
|
|
|
You can do it in the Enter event:
private void textBox1_Enter(object sender, System.EventArgs e)
{
this.textBox1.SelectAll();
}
|
|
|
|
|
How is the KeyStream used ?? what is the purpose ?? Is it to find the Pixels in the Bitmap(Carrier) to hide Message bits?? PLz let me know Why is the KeyStream Used ?? is it For Encrypting the Message ??
AMAN ANWAR
|
|
|
|
|
Just stop, some people have tried to help you, but you dont seem to take advise or read English well.
|
|
|
|
|
so Leppie , that's ur name uh ... u think ur a kind of a genius person , just shut ur mouth if u can't help and let me give u some advise donot ever underestimate the person u donot know .... coz he might be the one ..... get it !!
AMAN ANWAR
|
|
|
|
|
Look, the best place for information about the code in an article is in the forum at the bottom of that article's page. If you can't get ahold of the person immediately, be patient. Not everyone visits the site every day to check on their articles.
Posting the same question, what, 11 times will not get it answered. Frankly, it'll more likely get you ignored.
nwr_mn wrote: coz he might be the one
Uhhh....The one what? Nevermind, I don't really care.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
nwr_mn wrote: so Leppie , that's ur name uh
no, it leppie .
nwr_mn wrote: just shut ur mouth if u can't help
I tried to help, but in a different way, seeing the other 10 responses didnt make sense to you.
nwr_mn wrote: let me give u some advise donot ever underestimate the person u donot know .... coz he might be the one
I'm heterosexual, sorry...
|
|
|
|
|
Hi everyone, Please help me
How to pass this ArrayList to a thread as an parameter.
Thread thread1 = new Thread(new ThreadStart());
thread1.Start();
ArrayList space = new ArrayList();
for (int i = 1; i <= 10 ; i++)
{
space.Add(i);
}
eric
|
|
|
|
|
You could try to use System.Threading.ParameterizedThreadStart instead of ThreadStart if you are using .NET 2.0.
If not - declare your ArrayList on class level (not inside function), and just call it from your thread... but be carefull to avoid cross-threading problems...
____________________________________________
Robin Panther http://www.robinland.com
|
|
|
|
|
Hi,
i have 2 textboxes txt1 and txt2 and a button(mybutton) which inserts variables into my textboxes.
problem:
i enter text into txt1 eg "my name is " and click on mybutton to enter a variable
so that my variable appears right after the text i entered eg "my name is xVariable_namex".
how do i let my button know which textbox it needs to enter the variable,in other words where the cursor position is.
remember i have two textboxes
hope you understand my question
thanks for your help;)
regards paula
|
|
|
|
|
just check the focused property of the textboxes and set
the value in the one which has the focused property true.
Regards,
Pramod
|
|
|
|