|
But how can i access the items in different projecT?
|
|
|
|
|
HELLO,
here is a little problem that i am facing.
in a foreach( ) loop, i want to display a message box or anything,
but i want to display that after some gap. i.e. PRODUCING SOME DELAY
is there any method like delay() in c/c++?
i found timer class for windows forms in c#, but there is some problem
with it. it just says invalid com component exception after each
display of the message box. i just want to have a gap of 30 seconds. if there is anyother way plz guide me.
can someone guide me on this. A piece of code or link.
i would really be thankful on this help.
LOOKING FOR HELP
ASIM.
Asim
|
|
|
|
|
Thread.Sleep(1500);
will cause a 1.5 second pause before going to the next line of code..
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
Can some one point me to a good resource on WMI using c#
Thanks
|
|
|
|
|
There is very good one here. I don't have the link now,but search this site or go to C# section.You can find it there.
Mazy
No sig. available now.
|
|
|
|
|
Hi!
In one of my base classes, I have a function which receive a callback from another application. In this function, I would like to access Excel.Application object but I receive an exception: QueryInterface for interface Excel._Application failed.
If my class were inherited from Windows.Forms, I could use BeginInvoke function. So I would like to know a way to access Excel.Application object in my callback function.
Build with C# for Excel Object 9.0 (Excel 2000)
Thanks in advance!
|
|
|
|
|
Can you point me to a book or article that explains how to create tabbed forms?
Thank you
P.S.
What is the equivelent of BeginWaitCursor()?
|
|
|
|
|
i am not sure about any tabbed form articles, youll have to search.. but they are built into windows.forms.. they are listed in your toolbox as 'TabControl'.. you should be able to use it pretty easy..
and here is the cursor question
Cursor.Current = Cursors.WaitCursor;
Cursor.Current = Cursors.Default
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
Will I do not know of an article on the topic, it is very easy to do in Visual Studio.
Place a TabControl on your blank form. Right click on it and select New Tab. Now start placing controls on that tab. At any time, right click the tab control and select Add Tab to make more tabs. You can switch between the tabs while in the designer.
Rocky Moore <><
|
|
|
|
|
That was just too easy. Thanks!
|
|
|
|
|
I have an integer representing a month, what is the best way to convert it into the full month name?
thanks
U.M.
It ain't what you know that matters.
Uncle Monkey
|
|
|
|
|
I don't really know if there is a built-in function (I looked in System.DateTime but didn't see one) so I threw this one together:
private string MonthName(int iMonth)<br />
{<br />
string[] sMonths = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };<br />
return sMonths[iMonth] ;<br />
}
|
|
|
|
|
thanks for that GISnet.
I didn't see one either and wondered if I'd missed something really obvious and was being stoopid
It ain't what you know that matters.
U.M.
|
|
|
|
|
System.Globalization.DateTimeFormatInfo.MonthNames
|
|
|
|
|
Ok now I feel .
|
|
|
|
|
Here is my contribution:
public enum Months
{
January = 1,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
};
[STAThread]
static void Main(string[] args)
{
for (Months month = Months.January; month <= Months.December; month++)
Console.WriteLine ("{0} - {1}", (int)month, month.ToString ());
}
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
Jim Stewart wrote:
Here is my contribution:
This has no international support...
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
I respectfully submit that the problem description did not indicate the need for internationalization. Therefore my modest contribution met the initial requirements.
Since the bar has been raised, I will attempt to satisfy.
One solution might go thus:
public enum Mois
{
Janvier = 1,
Février,
Mars,
Avril,
Peut,
Juin,
Juillet,
Août,
Septembre,
Octobre,
Novembre,
Décembre
};
[STAThread]
static void Main(string[] args)
{
for (Mois mois = Mois.Janvier; mois <= Mois.Décembre; mois++)
{
Console.WriteLine (mois.ToString ());
}
}
I suspect that this is not what was intended. So to blend my previous solution with Monsieur Nischalke:
public enum Months
{
January,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
};
[STAThread]
static void Main(string[] args)
{
DateTimeFormatInfo dtfi = new DateTimeFormatInfo ();
for (Months month = Months.January; month <= Months.December; month++)
{
Console.WriteLine (dtfi.MonthNames[(int)month]);
}
}
This has the benefit of symbolic constants instead of literals with the internationalization.
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
Since the gauntlet of challenge has been thrown.
<br />
using System.Globalization;<br />
<br />
CultureInfo ci = new CultureInfo("fr-FR", true);<br />
DateTimeFormatInfo di = ci.DateTimeFormat;<br />
<br />
foreach(string strMonth in di.MonthNames)<br />
Console.WriteLine(strMonth);<br />
<br />
|
|
|
|
|
May I ask how one gets the month name from an integer in this scenario?
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
DateTimeFormatInfo.MonthNames
Gets or sets a one-dimensional array of type String containing the culture-specific full names of the months.
|
|
|
|
|
Touche - I was getting a bit punchy last night.
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
Hi all:
I'm a total newbie to C#, but would like to know if there is a freeware implementation of the zip component for data compression.
I have used a similar component in C++ for years but have not seen a similar implementation for C#.
TIA,
Martin.
---
Regards,
Martin.
|
|
|
|
|
|
Thanks James, just what the doctor ordered )
---
Regards,
Martin.
|
|
|
|