|
Change it to the static method:
String.IsNullOrEmpty(maskedTextBox2tel.text) == true
|
|
|
|
|
how to do Zoom to previous and next extent on map control using C#?
|
|
|
|
|
We don't know what framework you are using, you haven't supplied any code. Please supply your code. If you are using an external API (Such as Virtual Earth) you will be much better off contacting a forum dedicated to that API.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
|
We don't know what framework you are using, you haven't supplied any code. Please supply your code. If you are using an external API (Such as Virtual Earth) you will be much better off contacting a forum dedicated to that API.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
where can i find standard naming Conrols in C#.
I mean Prefix/like Hungarian notation.
for example:
Control Type Prefix Example
<code> Button btn btnName
GroupBox gb gbName</code>
|
|
|
|
|
You can find Microsoft standard naming guidelines here.
According to these guidelines, Hungarian Notation must not be used.
Still, nothing is said about private fields, so it's up to you to define your coding standards.
|
|
|
|
|
just check this article .
Its for VB !
and used Hungarian Notation .
http:
I wanna something like this article for C# .
So Plz Help !
|
|
|
|
|
The guidlines for C# development are NOT to use hungarion notation at all. Hence you wont find a (microsoft) article defining it.
|
|
|
|
|
If you're coding for yourself, make up your own. If you're coding at work, and if there's no policy in place, stick with the format used in the file you're editing.
If you're coding at work and there is no naming policy, suggest that they implement one, and provide examples and WHY the example is valid. If there is existing code that follows a consistent formatting/naming pattern, use it as a basis to avoid having to go back and "fix" existing code. If you're on a team of programmers, and if those programmers are worth their salt, they won't dispute the need for a formatting/naming policy. Getting them to agree with your version, though, may be a problem.
For what it's worth, I've been on six different teams in the last 10 years, and NONE of them had an established formatting/naming policy.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Just create a bunch and see what Visual Studio names them.
|
|
|
|
|
hello and have good time !
Q1.
How can change the color of #region Text ?
for example :
#region <code> txtName Textchanged</code>
.......
........
.........
..........
#endregion
Q2.
How can I change the particular code text color?
for example :
private void Reminder_Load(object sender, EventArgs e)
{
<code>ModeForm = clsGlobal.FormMode.Ready;</code>
if (ModeForm == clsGlobal.FormMode.Ready)
{
tsmiMain1.btnSaveEnable = true;
tsmiMain1.btnCancelEnable = true;
tsmiMain1.btnEditVisible = false;
tsmiMain1.btnDeleteVisible = false;
tsmiMain1.tss2Visible = false;
}
<code>cmbDaysWeek.Items.Add("1.شنبه");
cmbDaysWeek.Items.Add("2.یکشنبه");
cmbDaysWeek.Items.Add("3.دوشنبه");
cmbDaysWeek.Items.Add("4.سه شنبه");
cmbDaysWeek.Items.Add("5.چهارشنبه");
cmbDaysWeek.Items.Add("6.پنچشنبه");
cmbDaysWeek.Items.Add("7.جمعه");</code>
}
|
|
|
|
|
Goto Tools - Options..
Expand the environment node and select fonts and colors.
Have fun, there are loads to go through!
The FoZ
|
|
|
|
|
Not Clear!
Plz give more Info !
|
|
|
|
|
Not sure what else I can give you. So I've shown you where the options are to change the Fonts & Colours of the text editor. Looking through the display items, I can only assume that the "Collapsible Text" is what you need. Google may be your friend in finding out what each display item is
The FoZ
|
|
|
|
|
Hi,
I don't know whether this is the right place to ask this question.
I have an executable file that I want to run remotely. When I double Click the file and when I use the command prompt, It starts fine.It also runs fine when I use Task Manager. I included the file in the system path and when I run it through the run utility and when I run it in the command prompt(without giving it its full path), It runs but not as expected i.e some of the buttons on the running form are disabled.
Running the file through the System.Diagnostics.Process.Start function of C# has exactly the same problem. What I want is to run it through the System.Diagnostics.Process.Start on a remote XP machine.
|
|
|
|
|
It sounds to me like a bug in the program and not a remote issue. The fact that it performs differently when running it from cmd then when double clicking it suggest that to me. You could try adding a pause on startup, running it from the command line, attach a debuger and unpause it. Then you can see why the buttons are disabled.
|
|
|
|
|
Hi
i am using 2 form first from is logo 2nd is my application, i want to first show my logo from then after few mints the 2nd form is show and 1st form is close, i am using timer but not working correctly and my coding is below.
private void logo_Load(object sender, EventArgs e)
{
Timer timer = new Timer();
timer.Tick += new EventHandler(timer1_Tick);
timer.Interval = (1000) * (1);
timer.Enabled = true;
timer.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
Form1 frm = new Form1();
if (timer1.Interval == 1000)
{
this.Hide();
frm.Show();
timer1.Enabled = false;
}
|
|
|
|
|
What you are trying to do is implement a splash screen - have a look at this[^], it may be more than you want, but it will show you how to do it!
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
link is very good but i need small coding
|
|
|
|
|
Ok my friend i found a solution for your problem with a short code
you made a simple mistake in the form1_load method, it should be left empty!
here is the full code of the program (I included the full code page!):
public partial class Form2 : Form
{
Form1 F = new Form1();
public Form2()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
int A = 1000; // represents number of seconds before Form2 is shown. each 1000 = 1 sec.
for (int i = 0; i < A; i++)
{
this.Hide();
F.Show();
}
this.timer1.Stop();
this.timer1.Enabled = false;
}
}
|
|
|
|
|
Thank u
|
|
|
|
|
Hi everyone. I'm trying to invoke a constructor through reflection, with no luck.
Basically, I have an object that I want to clone, so I look up the copy constructor for its type and then want to invoke it. Here's what I have:
public Object clone(Object toClone) {
MethodBase copyConstructor = type.GetConstructor(new Type[] { toClone.GetType() });
return method.Invoke(toClone, new object[] { toClone });
}
I call the above method like so:
List<int> list = new List<int>(new int[] { 0, 1, 2 });
List<int> clone = (List<int>) clone(list);
Now, notice the invoke method I'm using is MethodBase 's invoke. ConstructorInfo provides an invoke method that does work if invoked like this:
return ((ConstructorInfo) method).Invoke(new object[] { toClone });
However, I want to use MethodBase 's method, because in reality instead of looking up the copy constructor every time I will store it in a dictionary, and the dictionary contains both methods and constructors, so it's a Dictionary<MethodBase> , not Dictionary<ConstructorInfo> .
I could of course cast to ConstructorInfo as I do above, but I'd rather avoid the casting and use the MethodBase method directly. I just can't figure out the right parameters.
Any help? Thanks so much.
modified on Wednesday, March 31, 2010 4:07 AM
|
|
|
|
|
Dunno. If casting works, you might as well do that.
Also, why not make the method generic?
|
|
|
|
|
PIEBALDconsult wrote: If casting works, you might as well do that.
Well, I know I can, but I don't want to. This method will be called pretty often and I don't want to be doing any unnecessary operations (such as casting) that may impact performance.
PIEBALDconsult wrote: Also, why not make the method generic?
How will that help? Can you be more specific?
Thanks.
|
|
|
|