|
Hello
i have 3 txtboxes where the enter the date
the first one: maxlength is 4
the second one: maxlength is 2 and the greater value is 12 without the number 0
the third one: maxlength is 2 and the grater depend on what is chosen in the second and the first
what i need to do is to give the name of the day also to the user ???
any help ...
Thanks in advance
Assaf
|
|
|
|
|
|
Why not use a DateTimePicker?
|
|
|
|
|
Hello Assaf,
of course you need the DateTimePicker, and if you want a very flexible one, try Smart FieldPackEditor.Net.
|
|
|
|
|
Hi im having trouble in displaying the char '&'
well im trying to do a simple thing like:
Label l_name= new Label();
this.panel1.Controls.Add(l_name);
l_name.Text = "lol&lmao";
l_name.AutoSize = true;
l_name.Location = new Point(10,10);
instead of getting a label that says "lol&lmao" on my panel
i get "lollmao" , i was try to use escape charcter like this:
l_name.Text = "lol\&lmao";
and it didnt work cause the & charcter is not an escape char.
so im out of ideas , if anyone know the answer please share thanks :P
.Nerd
|
|
|
|
|
A real nerd knows the power of Label.UseMnemonic
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
now i have the power , thanks
im a nerd but still newb
Net
|
|
|
|
|
Luc Pattyn wrote: real nerd knows the power of Label.UseMnemonic
So true
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
A quick question: What is default type (ByVal/ByRef) in C# and Vb.Net? And which is a good practice if passing values to different components when they are on same machine and as well as on different machines.....Thanks!!
Thanks.
-- modified at 10:42 Monday 3rd September, 2007
|
|
|
|
|
Reference types ( classes ) are by reference, intrinsic types like int are by value.
It really doesn't matter, anything that's not a trivial size is byref no matter what you do. In C# you can use ref or out to force by reference, but you cannot force by value.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks, but still i feel you missed to reply my queries...default type
|
|
|
|
|
Well - all classes ultimately inherit from object .
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hey Chris/Pete
I think we all are missing my queries
a) What is default type (ByVal/ByRef) in C# and Vb.Net?
b) Which is a good practice if passing values to different components when they are on same machine and as well as on different machines.....
Thanks
Thanks
|
|
|
|
|
a) ByVal/ByRef are not types, they are keywords in VB.NET (and ref is in C#)
b) best practice is to use what you need; i.e. use ByRef if the callee must be able to
change the value/object as seen by caller, use ByVal otherwise.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I think you might need to go back to basics and read up on the fundimentals of .Net.
You can have two different types of type, one is reference types, the other is value types.
By default reference types are passed by reference and value types are passed by value.
Classes are reference types and structs/primatives are value types.
If you don't understand any of this buy any beginner .Net book and it'll be in the first few chapters
As for best practice ... use what is needed.
|
|
|
|
|
Ahh - I think I see what you are getting at. .NET differs from VB (6) in that it passes parameters by value and not by reference.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Suppose ...
public interface IMyInterface{<br />
void MyMethod();<br />
}<br />
<br />
public class ClassA:IMyInterface{<br />
public void MyMethod(){}<br />
}<br />
<br />
public class ClassB:ClassA,IMyInterface{<br />
public void MyMethod(){}<br />
}<br />
Can anyone tell me if it's required to specify that ClassB inherits IMyInterface ?
The interface is to my opinion inherited through the base class ClassA, but it seems
specifying (or not) the interface inheritance in the derived class ClassB makes no
difference.
|
|
|
|
|
You dont need to unless u want to 'override' the behaviour. This normally means you have designed something wrong
To override the interface implementation, you would likely have to use an explicit implementation.
|
|
|
|
|
Indeed I want to override (reimplement) the interface behaviour in the derived ClassB,
but my question really is wether to use ...
public class ClassB:ClassA,IMyInterface
or
public class ClassB:ClassA
as the ClassB declaration ?
Both work for me, but I was wondering if there's a difference
(behind the scenes ?) for either one of them !
|
|
|
|
|
hi all
how i can to calculate the width of the text
i means of width of text is not the number of char in text
i mean the width of this text the width for each of text
Thaer
|
|
|
|
|
The System.Drawing.Graphics object has a MeasureString method
|
|
|
|
|
hi
in a form or control do this:
using(Graphics g = this.CreateGraphics())
{
SizeF textSize = g.MeasureString("mytext", Font);
}
regards
|
|
|
|
|
when user press F12, my prg will open a new form showing screen shot.
how could i code?
i used keypreview, keyup event.
it works just if the main window is activated, or not it doesnt work.
is there any easy way without writing a win. service.?
|
|
|
|
|
No. I'm not even sure a service will do it, you need a system wide keyboard hook
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|