|
Look up /resetsettings command line for the IDE.
|
|
|
|
|
Thanks been playing about un-installing reinstalling VS2005 for the past day now
the tool bar now seems to work but I still get the following in the output window upon loading
The ReportDesignerPackage ({11B8C903-8FFD-4DFC-87CE-F6A82D77AF6B}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'devenv /resetskippkgs' at the command prompt.
The DataWarehouse VSIntegration layer ({4A0C6509-BF90-43DA-ABEE-0ABA3A8527F1}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'devenv /resetskippkgs' at the command prompt.
|
|
|
|
|
Hey guys,
I have a date string (dd-mm-yyyy) which I want to convert into a yyyy-mm-dd string (i'm retrieving the string from a plain XML file, but that doesn't matter)
I though creating a string array, inverse that, and create a string again would solve my problem, but I didn't get an inverse method on the string array. What is the quickest way to accomplish this?
|
|
|
|
|
Read the date and then output it using one of the date conversion formatters. It's far simpler.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Problem is that most of the time, the DateTime.TryParse won't return true on the string, which means .NET cannot convert it to a valid datetime object. That's exactly the reason why I want to convert the string the other way around...
|
|
|
|
|
Did you try the TryParseExact method? It allows to specify an expected format (amongst other things).
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Yeah, that's pretty much the solution I was looking for...
created two functions, one checks for a date and returns a boolean whether the string is a valid date or not
return DateTime.TryParseExact(Value, "dd-MM-yyyy", null, System.Globalization.DateTimeStyles.None, out dtOut);
The other function returns a datetime object of the converted date
return DateTime.ParseExact(Value, "dd-MM-yyyy", null, System.Globalization.DateTimeStyles.None);
Both work fine, thnx guys!
|
|
|
|
|
You might need to change your system culture.
|
|
|
|
|
Something along the lines of this?
string date = "12-12-2006";
DateTime time = DateTime.Parse(date);
string newdate = time.ToString("yyyy-MM-dd");
|
|
|
|
|
you can use
Convert.ToDateTime("string");
too
|
|
|
|
|
Hi everyone!
Please tell me how can i restrict only one child window in MDIParent?
Does Microsoft Word 2003 use MDI with only child window?
I have made child window and made it Maximize and Minimze button "false" and its window state "Maximized" but it doesn't give desired results. It shows Minimize and restore button in Main Menu bar.
Please tell me what to do ?
Thanks
|
|
|
|
|
Microsoft Word 2003 uses a different type of option called Multiple SDI. .NET 2 has this option available to it by deriving your form class from WindowsFormsApplicationBase. An example can be found here:
http://en.csharp-online.net/Application_Architecture_in_Windows_Forms_2.0%E2%80%94Multiple-SDI_Applications[^]
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks.
I have used this in my application. I have made
"Multiple Single Document Interface" for the Main Form of my application.
But now that Main Form is an MDI Parent Form. If I open first instance of application that gives me option to create a new file under the "File Menu". Now I want that file to show only close button in Menu bar and take all the MDI parent client space.
Is that possible?
I have made my Main Form as MDI Parent. I used to create new file using file menu, but how i can emit minimize and restore button in the menu bar. I want to show only close option.
|
|
|
|
|
please tell me how one child can be shown if Parent Mdi has Main MEnu and Toolbar.
I create Mdi child it doesn't fills whole client area of MdiParent.
Also when i close the MdiParent icon bar of child takes space up on the MdiParent Main Menu for a while and form closes although i have disabled child control box.
|
|
|
|
|
Hi All,
I need to to dispose of some stuff in a class. But, the class derived from a class which also implements IDisposable.
The dispose method is not marked as virtual, I cannot override it.
How can I get my classes Dispose() called and then call Dispose() on it's base class?
Thanks
Jon
|
|
|
|
|
You need to have your derived class derive from IDisposable also and explictly implement the Dispose method, call the base dispose from there.
public class Foo : IDisposable<br />
{<br />
public Foo()<br />
{<br />
<br />
}<br />
<br />
public void Dispose()<br />
{<br />
}<br />
}<br />
<br />
public class Bar : Foo, IDisposable<br />
{<br />
public Bar()<br />
{<br />
<br />
}<br />
<br />
void IDisposable.Dispose()<br />
{<br />
base.Dispose();<br />
}<br />
}
only two letters away from being an asset
|
|
|
|
|
Try this:
namespace TestDisposable
{
public class DisposeClass : IDisposable
{
public DisposeClass()
{
}
#region IDisposable Members
public void Dispose()
{
Console.WriteLine("Called dispose in DisposeClass");
}
#endregion
}
public class Class2 : DisposeClass, IDisposable
{
public new void Dispose()
{
base.Dispose();
Console.WriteLine("Called dispose in Class2");
}
public void DoIt()
{
}
}
}
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks guys,
I thought i'd tryed that in the myriad things I tried, but evidentally not. I'll get back on it.
|
|
|
|
|
Your class also needs to derive from IDisposable and call base.Dispose() in your Dispose method.
You can also look here for more information:
http://www.codeproject.com/useritems/idisposable.asp[^]
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Hi,
Does anyone know how to export my code to visio so it will be an UML diagram?
Thanks in advance!
|
|
|
|
|
From project menu, you should be having an option to Reverse Engineer to Visio right?
|
|
|
|
|
Hi Vasudevan Deepak Kumar,
Thanks for your reply!
Strange, i don't see that link. I got vs 2005.
I'll check it out, i needed the "key word" to do this.
Thanks!
|
|
|
|
|
If you've got VS2005 why do you need to reverse engineer to Visio? You can create a class diagram in Visual Studio directly.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello,
How many instances of x do I have in the following example?
class MyBaseClass<br />
{<br />
protected static int x;<br />
}<br />
<br />
class MyDerived1 : MyBaseClass { }<br />
class MyDerived2 : MyBaseClass { }<br />
<br />
MyDerivedClass1 c1;<br />
MyDerivedClass1 c2;<br />
<br />
MyDerivedClass2 c3;<br />
MyDerivedClass2 c4;
I would say for sure that c1 and c2 share the same x .
But what about c3 and c4 ?
Do they share c1 's and c2 's x ?
Is a new static x allocated for them?
Thanks in advance,
Shy.
|
|
|
|
|
Hi, i would say that x has every where the same value.
Because the static-Element is a type, outside of all instances.
Each instance has access to this variable and can manipulate it.
And your derived classes have derived this permission to this element.
So i think all instances can alternate this static variable.
I never use/try it before, but it seems logic for me.
|
|
|
|