|
That will work if the user didn't use the paste feature
|
|
|
|
|
Hadn't thought of that , suppose it'll have to be either the OnValidating or OnTextChanged .
I have no idea what I just said but my intentions were sincere.
Poore Design
|
|
|
|
|
|
to complete with a bit of code, what has been already so nicely said:
void TxtRegisteringKeyKeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
char[] myNum = new char[11] { '0' , '1', '2', '3', '4', '5', '6', '7', '8', '9', '\b' };
bool blnNumFnd = false;
foreach (char c in myNum)
{
if (e.KeyChar == c)
blnNumFnd = true;
}
if (!blnNumFnd)
e.KeyChar = '\0';
}
|
|
|
|
|
Use MaskedTextBox Instead of Normal textbox, where you can restrict user entries
|
|
|
|
|
Hi,
I am having Text file that contains japanese characters ,I need to look out for Hiragana, Katakana and
ideograph characters searching through Microsoft and google i found that i can do it through Regular
Expressions
http://msdn2.microsoft.com/en-us/library/aa293063(VS.71).aspx[^]
I used Hiragana and Katakana regex like this string regexPattern = @"\p{IsHiragana}|\p{IsKatakana}"; its
working fine but for Ideograph I used \p{Lo} but this doesn't work
Any Help will be highly appreciated
Thanks and regards
Shweta Shrivastava
|
|
|
|
|
Hi
I am a computer engineer and I have developed some DLLs in .NET Framework 1.1 (C#.NET). Now I want to develop a new project in Visual C++ 6.0 and I need to use those DLLs in Visual C++. Would you please help me with this interoperability? I need a good and of course abstract resource in order to become familiar with these concepts and with the method I have to use for this transfer.
Thanks in advance
|
|
|
|
|
Tried Google[^]?
Surprise surprise where the first result it returned from...
I have no idea what I just said but my intentions were sincere.
Poore Design
|
|
|
|
|
hi,
In my windows application i added a menu strip item. The default color of the menu strip is the colors of the windows xp (blue and white).
When i change the backgroung color property to the color i want it is changed.
but when i click on an item for example File the menu that pops down under it has the color of the original menu strip (blue and white). I need it to be as the color i set. I couldn't find any property for that.
Is there a way to do it?
|
|
|
|
|
This code works for me.
MenuStrip mainmenu;
ToolStripMenuItem File;
ToolStripMenuItem News;
ToolStripMenuItem Exit;
mainmenu = new MenuStrip();
File = new ToolStripMenuItem();
News = new ToolStripMenuItem();
Exit = new ToolStripMenuItem();
mainmenu.BackColor = Color.Red;
mainmenu.ForeColor = Color.Yellow;
File.BackColor = Color.Violet;
File.ForeColor = Color.Cyan;
News.BackColor = Color.DarkBlue;
News.ForeColor = Color.DarkGreen;
Exit.BackColor = Color.DarkViolet;
Exit.ForeColor = Color.DeepPink;
File.Text = "File";
News.Text = "News";
Exit.Text = "Exit";
File.DropDownItems.Add(News);
File.DropDownItems.Add(Exit);
mainmenu.Items.Add(File);
this.Controls.Add(mainmenu);
|
|
|
|
|
|
hi,
it is not working completly
it works fine until i click of one of the main items (File menu item).
then this item changes back to the original colors, but the items under it doesn't change, They keep the color i gave to them.
do you know how to solve this
|
|
|
|
|
I myself was having same problem while selecting a treenode. that if i set its backgrout color or foreground color then its fine and it works but i want that when ever i select the node then the default windows color apear(blue,olive or grey) and i want a different color to apear so how to do so??
its same problem i guess only control is different
i will try sugestion of menu strip as well!
thax in advance!
sam tam
|
|
|
|
|
Yea this is happening with me too. if you find any solution for it, please give me a note.
Good luck
|
|
|
|
|
Hi All
how to remove fixed column from datagridview1?
thank you
|
|
|
|
|
Hi,
what's wrong in this code?
********************************************************
IHTMLDocument2 doc=(IHTMLDocument2)Explorer.Document;
doc.onmouseup+=new MouseEventHandler(MouseUp);
public void MouseUp(object sender, MouseEventArgs e)
{
MessageBox.Show("mouseUp");
}
******************************************************
The error discovered was:
Impossible to apply the operator '+=' to operands of type 'object' and 'System.Windows.Forms.MouseEventHandler'.
*****************************************************
Please something helping me ?
Thanks in advance
Lula
|
|
|
|
|
Hi everyone,
I want to know how to pass a parameter to a property in C#. I know how to do this VB.NET but not in C#.
In Vb.NET it looks:
Public Readonly Property Person(ByVal Id) as Employee
{
Get{
Return empObj(Id)
}
}
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
private string myName;
public string GetName
{
get
{
return this.myName;
}
set
{
this.myName = value;
}
}
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
Hello,
I think it's not possible in C#.
What you whant is possible with a method.
public Employee GetPerson(int Id)
{
return empObj(Id);
}
All the best,
Martin
|
|
|
|
|
It looks a bit like an indexer property:
public Employee this[int id]
{
get
{
return this.personArray[id];
}
}
|
|
|
|
|
Ohhhhh
Forgot that!
Thanks
|
|
|
|
|
Recently i had the same problem.
It is documented that in C# it cannot be done except for indexers. There was a guy that implemented a trick with vb for the specified function and said it worked but i haven't tested it.
If I can find it again i will post it here if no one other does
-- modified at 6:27 Wednesday 24th January, 2007
|
|
|
|
|
Can anyone provide me the usage details or documents or code related to this AxMSChart20Lib.AxMSChart control using C#?
|
|
|
|
|
Hi Friends,
In my C# application, i am listing several items in combobox. at runtime, combobox allows us to select from list as well as allows user to type.
But I have not allow to type the user. Please help me how to make uneditable combo box.
Thanks in Advance,
Regards,
Prya
|
|
|
|
|
Set the property of combobox is.......
DropDownStyle=DropDownList
Parwej Back...............DON of Developer.......
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|