|
This may sound like a stupid question, but are you sure it is the code? Are you giving the program a fully qualified path to the file, or relying on a relative path, which would differ depending on your debug or release mode? Is teh file in the directory where you run the app?
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
|
|
|
|
|
the argument file is in the same directory as the executable file...
I tried to send the argument through the IDE itself, it works great there...
|
|
|
|
|
As well it should, but when you execute it at the command line, are you in that same directory?
|
|
|
|
|
|
Exactly what are you typing at the command line, and exactly what did you type into the arguments box in the Visual Studio debugging options?
Are there spaces in the filename? If so, you have to enclose them in quotes:
MyExecutable.exe "File name with spaces.txt"
Otherwise they'll be counted as separate parameters, in which case your 'choice' variable won't be set, and the entire block of code will be skipped.
|
|
|
|
|
Hi world and word and u all Codeproject users !
Q)I want get date of 10 days after the current date !
more info :
<code>the date today is : 2010/03/31.
10 days later the date will be : 2010/04/10.</code>
Can dateTime compute this for me.
Example :(Something like this!)
DateTime dateTime = DateTime.Now + 10;
|
|
|
|
|
DateTime tenDaysFromNow = DateTime.Now.AddDays(10.0);
|
|
|
|
|
jojoba2011 wrote: Can dateTime compute this for me.
DateTime can do a whole lot of things for you. To know what they are, it would be sufficient to look at the documentation, there is a list of type members, showing methods, properties, etc.
|
|
|
|
|
Luc Pattyn wrote: it would be sufficient to look at the documentation
txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Luc Pattyn wrote: at the documentation
That's what I do, but I thought everyone else looked at the Intellisense.
|
|
|
|
|
I'm guilty of being an intellisense junky.
|
|
|
|
|
But I still wonder... why did he ask?
a simple google result for three terms - 'c# date add' gave me enough resources to read...
Are there really people who still don't depend on GOOGLE? I am Impressed.
|
|
|
|
|
asking here is a ticket for a break; you "have" to wait for a descent reply.
Google's main disadvantage is it leads to results much too quickly...
There is an opportunity for a slow search engine, something that replies with a splash screen, saying:
I'm working for you; accumulating possible answers to your query; please wait; ETA 7 minutes and counting.
If CP were to offer such a gateway to Google, it would not have server overloads ever again...
|
|
|
|
|
Luc... u amaze me with your answers...
I have been missing this insight for so long...
Now, I am sure that Google cannot tell me this side of the story!!!
|
|
|
|
|
What's a Google?
Edit: I seem to recall a product from the '70s called "Coogle" -- I think was peanut butter and jelly in one jar, but I could be wrong.
|
|
|
|
|
|
PIEBALDconsult wrote: What's a Google?
it's a dull binge.
PIEBALDconsult wrote: "Coogle"
Pretty klose[^].
|
|
|
|
|
|
You're welcome.
Another question solved by a minor Google action.
|
|
|
|
|
Bing would have found it if I'd spelled it correctly...
|
|
|
|
|
Google gave plenty when asked for Coogle peanut butter and jelly , the first hit was a CodeProject message (and that happens a lot)!
|
|
|
|
|
Luc Pattyn wrote: that happens a lot
You don't say.
|
|
|
|
|
Hi, is there some UML(rational rose)(class diagram) tool where I can draw my database design and generate SQL scripts for creating my database?
modified on Wednesday, March 31, 2010 11:43 AM
|
|
|
|
|
Not sure which forum this should be in, but C# isn't it.
also
Rational Rose != UML
Class Diagram != Table Diagram.
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.
|
|
|
|
|
Hi,
I've got a form with a gradient background. On that form I places a tabcontrol. But when I a hover a tab of the tabcontrol, the tab starts flickering a lot. Is there any way to stop this flicker?
I have already found some solutions. One of them is to create a custom control which inherits from System.Windows.Forms.Tabcontrol.
I dit this and the flicker is gone, but when I use the following code, the font on my tabs isn't the default font like the rest of my form.
public class DoubleBufferedTabControl : TabControl
{
private System.Drawing.Bitmap buffer;
public DoubleBufferedTabControl()
{
this.SetStyle(ControlStyles.UserPaint | ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
}
protected override void OnPaint(PaintEventArgs e)
{
this.SetStyle(ControlStyles.UserPaint, false);
base.OnPaint(e);
System.Drawing.Rectangle o = e.ClipRectangle;
System.Drawing.Graphics.FromImage(buffer).Clear(System.Drawing.SystemColors.Control);
if (o.Width > 0 && o.Height > 0)
DrawToBitmap(buffer, new System.Drawing.Rectangle(0, 0, Width, o.Height));
e.Graphics.DrawImageUnscaled(buffer, 0, 0);
this.SetStyle(ControlStyles.UserPaint, true);
}
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
buffer = new System.Drawing.Bitmap(Width, Height);
}
}
So if there is no easy way to stop this flicker, how can i get the font on my tabs just like the font of the rest of my form?
|
|
|
|