|
I have created a UserControl that allaws a DataObject to be dragged.
The DataObject contains a Bitmap and string.
When the DataOject is dropped into MSWord. MSWord displays the text.
Does anyone know our to force MSWord to display the Bitmap.
I have tried adding the Bitmap to the DataObject first followed by the string.
But this has no effect.
|
|
|
|
|
hi, i have a real quick question. I just need to find the X,Y (0,0) for the location of my programs Window in relation to the entire Desktop. Reason being is i use a API call called GetPixel() that uses X,Y (location) as a overload...but its X,Y are global X,Y i.e the entire desktop. I need to transfer my X,Y inside my program over to Global Desktop X,Y's. is there a easy way to do this ?
Thanks for your help, Time. If you need me to explain clearer please let me know
Jesse M.
The Code Project Is Your Friend...
|
|
|
|
|
Use Form.PointToScreen().
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Thank you very much Sir.
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
I would like to know how can i combine and connect different projects into one big project?
e.g.
i have an existing project - TEST_A. I want to add this project into my new project (current working this one) - TEST_B.
I know i can add "existing project" into my current project. But i don't know how to connect both project, so that i can access the form in TEST_A.
Please help!!!
|
|
|
|
|
Create a blank solution, then you can add as many projects to that solution. To add a new solution click on File > New > Blank Solution.
|
|
|
|
|
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 />
|
|
|
|