|
ok. i have a tooltip control. and i want to change it font to other language. and i don found this tooltip's font property. it alway show as "ាសដថាសដ" when mouse on. and i also follow ur step that get text from Database. but i still cannót show in other language else from English after i get into tooltip control. so do u kno how to do with it ?
|
|
|
|
|
Whats the problem with "ាសដថាសដ"? It does not looks English to me.
जय हिंद
|
|
|
|
|
ាកសដកថis kind of other langauge that i want to show in tooltip control. it isnot a English langauge. understand ? it is just a data that i retrieved from database as a step that u have told me.
|
|
|
|
|
If you have retrieved this text from database, just set this as the text for the tooltip. If it does not shows up correct, I think you need to look into encoding.
By the way, which language is this?
जय हिंद
|
|
|
|
|
it is cambodain langauge. call "khmer unicode" . where of encoding should i look for ?
|
|
|
|
|
May be this[^] link can help you. Not sure though.
जय हिंद
|
|
|
|
|
ok let me tell u again. that langauge can be shown in textbox. because i set that textbox font property. and Tooltip doesn't have font property. so it cannot be display this type of text. so do u know how to set a font property to tooltip control ?
|
|
|
|
|
Hi,
AFAIK you can't choose the font size, style or family.
However you can draw everything yourself any way you like, see this example.[^]
[ADDED] Balloon Tips Galore![^]
might interest you too.
[/ADDED]
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Just a thought, can you assign the tooltip text to a textbox and is it readable. I suspect your database may not support unicode.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello all,
i am a newbie for c# and would like to know if it is correct way to do as below
public unsafe struct test
{
public long lTime;
public fixed char AlphaChar[2];
public fixed char Stamp[8];
public fixed char Stamp1[8];
public fixed char Stamp3[8];
public short tCode;
public short ECode;
public short MsgLength;
public fixed char MSGTEST[4];
}
now i am struck with filling data into this structure.
Jalsa
|
|
|
|
|
Hi,
not sure what the problem is. This snippet compiles well:
unsafe {
Test tt=new Test();
tt.Stamp1[1]='a';
}
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hello Luc,
Thanks for the early reply.
Can we set the whole stamp variable to null.
Jalsa
|
|
|
|
|
I don't think so, since it is declared fixed, the characters themselves are in the struct now, there is no pointer/reference stored anymore, it is just N consecutive characters.
What is the higher purpose of all this anyway? Are you trying to perform some P/Invoke?
Mimicking a file or network packet content? A hardware register layout?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
yes u are right i have sent this packet data on tcp socket and these are server side restrictions.
Jalsa
|
|
|
|
|
if the packet definition has N characters for something, then you must provide N characters; you can't transmit "null" can you? You could initialize to all spaces though.
Furthermore, be aware of the fact that .NET characters are Unicode, hence 16-bit, sooner or later you probably need to convert them to/from ASCII.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
hi boys
how can i insert into database all datagridview items with foreach...?
|
|
|
|
|
h_floppy wrote: with foreach
Inserting data in database through foreach
जय हिंद
|
|
|
|
|
help me to insert the data from the datagridview.
|
|
|
|
|
Hello,
I've embedded a MaskedTextBox in a UserControl and added it to the ToolStrip of a Form via ToolStripControlHost:
private void Form1_Load(object sender, EventArgs e)
{
ToolStrip1.Items.Add(new ToolStripControlHost(new UserControl1()));
}
In the Validating event of the MaskedTextBox in my UserControl the value of the Text is checked and if necessary corrected:
private void maskedTextBox1_Validating(object sender, CancelEventArgs e)
{
if (maskedTextBox1.Text == "0")
{
maskedTextBox1.Text = "1";
maskedTextBox1.SelectAll();
e.Cancel = true;
}
}
The user can give any input in the MaskedTextBox, validation should only occur when "leaving". If the focus "leaves" the MaskedTextBox (by the user clicking anywhere or tabbing), validation is performed.
If validation fails ( in this case Text = "0") a corrected value ("1") is set, no events (e.g. button clicks) occur outside the control and the control's text should be highlighted
After the value was automatically corrected (the user has been shown a warning... not relevant), he can now of course "Leave" without ado.
If the UserControl is added to a Form all the described behaviour occurs.
However as the userControl is put in a ToolStripControlHost I can't get the text of the MaskedTextBox highlighted after the validation of the maskedtextbox (inside the toolstrip) fails.
Any help on this would be sincerely appreciated.
|
|
|
|
|
Hi,
I've solved my problem, be it in a manner which could as well be posted under coding horrors:
In the validating event of the maskedTextBox I call on a timer (which was added to the userControl), and let its Tick event set the focus.
private void maskedTextBox1_Validating(object sender, CancelEventArgs e)
{
if (this.maskedTextBox1.Text == "0")
{
timer1.Start();
e.Cancel = true;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
this.maskedTextBox1.Text = "1";
this.maskedTextBox1.Focus();
this.maskedTextBox1.SelectAll();
timer1.Stop();
}
Cheers. 
|
|
|
|
|
I spent several hours trying to get this working, and to no avail until I stumbled upon your answer.
Whatever dark magic you've applied to this task in order to arrive at using a timer, I take it your journey as a sorcerer is already a colourful one.
Thanks alot sir.
|
|
|
|
|
|
myventsi wrote: I don' t get the structures of connections and etc
This [^]is possibly one of the simplest example you could find.
Anyways, you need to buy a good book on C# and start reading it.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Suppose I want to call a function whenever I'll press Control + N together.
Now I know I need to catch the keyPress event. But how can I catch two key in one event..?
Thanking In Advance
Johnny
|
|
|
|
|
You need to use either KeyDown or KeyUp events.
if (e.KeyData == Keys.N && e.Modifiers == Keys.Control)
{
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|