|
I just downloaded the 65MB C# Direct X SDK (quite a lot for a 56k), installed it, rebooted, fired up VS.NET ann.....
None of the Direct X references were there. I have the DX Redist Runtime and .NET framework installed. Do I need to download the huge 'full' SDK just for some dlls?
I don't see how a few samples and some XML files can cause a 65MB download without providing the core files needed to develop.
"How long has the "Quote Selected Text" been around???" - Marc Clifton, Lounge 4 Mar '03 "But a fresh install - it's like having clean sheets" - Chris Maunder Lounge 3 Mar '03
|
|
|
|
|
Jonny Newman wrote:
I just downloaded the 65MB C# Direct X SDK (quite a lot for a 56k), installed it, rebooted, fired up VS.NET ann.....
I believe the DirectX 9 SDK is over 200MB in size. I don't know what this 65MB package refers to.
|
|
|
|
|
.S.Rod. wrote:
I don't know what this 65MB package refers to.
The 220MB file is the FULL SDK, that includes the C++ headers etc...
I got the 65MB 'C# Direct X SDK'.
I was under the impressons that the C# SDK would have everything minus the C++/VB/J# specific stuff. I'm 74% into the Dev Runtime. if this isn't it, i'll have to leave it overnight downloading the full SDK.
I thought the term 'SDK' mean't everything you needed to develop apps for this platform. They should have refered to it as "Direct X Documentation and samples" because thats all I got in this.
"How long has the "Quote Selected Text" been around???" - Marc Clifton, Lounge 4 Mar '03 "But a fresh install - it's like having clean sheets" - Chris Maunder Lounge 3 Mar '03
|
|
|
|
|
Probly the redistributable.
any idiot
can write haiku you just stop
at seventeenth syl
-ThinkGeek Fortunes
|
|
|
|
|
David Stone wrote:
Probly the redistributable.
Nope, the 'C# DirectX SDK'
"How long has the "Quote Selected Text" been around???" - Marc Clifton, Lounge 4 Mar '03 "But a fresh install - it's like having clean sheets" - Chris Maunder Lounge 3 Mar '03
|
|
|
|
|
Jonny Newman wrote:
None of the Direct X references were there. I have the DX Redist Runtime and .NET framework installed. Do I need to download the huge 'full' SDK just for some dlls?
I don't see how a few samples and some XML files can cause a 65MB download without providing the core files needed to develop.
The DX9 installer does not add the assemblies to the correct place, in fact the SDK just provides DOC's and samples. Did you download the runtime BTW?
You can in fact develop Managed DX9 apps without the SDK.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
im looking to start a small project reguarding internet privacy. I want to use PInvoke to detect running I.E instance.. and when the last window closes instantly run my program (thats sitting in tray with N-icon) and delete the windows history...ect. My question is... where doe i.e store all its history file ? i know about cookies...and the HISTORY folder....but i mean its microsoft...where else are they storing it? also how can i use PInvoke to get I.E processes running possibly even count... (i saw a code sample somewhere before possible here on CP)... anyways thanks guys...
Jesse M
P.s: I start school on monday....getting mcsd...wish me luck peoples...(7 month class)
The Code Project Is Your Friend...
|
|
|
|
|
jtmtv18 wrote:
im looking to start a small project reguarding internet privacy. I want to use PInvoke to detect running I.E instance.. and when the last window closes instantly run my program (thats sitting in tray with N-icon) and delete the windows history...
Sounds like you are about to start development of a tool which is going to do much more harm to the OS stability, than without.
My recommendations are :
- Change IE settings, and select only 1 day for the history setting. (may be 0 even works).
- On the same property tab, check the radio button so that IE removes all cookies and visited pages any time you restart IE.
And of course, download one of the billions IE cleaning freewares to fulfill your paranoia fears.
|
|
|
|
|
Does anyone have any pointers on how to draw directly onto the screen in C# or VB.Net? I've found you can get a handle to the desktop using this VB.Net code:
Graphics.FromHwnd(IntPtr.Zero)
However, attempts to draw to this result in nothing, no errors, and no output. Any suggestions would be very welcome...
William Bartholomew
|
|
|
|
|
William Bartholomew wrote:
I've found you can get a handle to the desktop using this VB.Net code:
Graphics.FromHwnd(IntPtr.Zero)
That will get the foreground window AFAIK.
Have a look on GotDotNet.com for Eric Gunnersons (what happened to him anyways?) Win32 library, it has all the functions needed for what you are trying to do.
Cheers
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Use Win32 Api GetHDC :
Graphics.FromHdc(GetHdc(IntPtr.Zero));
Wiizi
|
|
|
|
|
I want to use Control.Invoke to interact between the UI thread and other threads. In some cases, I expect I might need to make thousands of Invoke calls in a short period of time. How expensive is Invoke? Might I be better off optimizing by grouping together data so I don't have to make many Invoke calls, or is it nothing to worry about?
|
|
|
|
|
Control.Invoke itself is not expensive. Using Reflection to invoke a function is. But you are not using reflection.
So the answer is: Not expensive. (unless you want to send me money)
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Adequate efficiency is not usually something that can be predicted, so you might just have to test things.
However, even if you were not making cross-thread calls, thousands of calls in a short period of time (say milliseconds) is not as efficient as batching some data together. This would be especially true if each call only passes a small amount of data. Cross-thread calls will add to execution time, but may or may not be the crucial factor. If things aren't happening as fast as you'd like, it can't hurt to try batching some data together.
Also, keep in mind that Invoke() is synchronous, so each call will wait for completion. BeginInvoke() might be worth looking at, since it is asynchrous, and will return immediately. However, it might be less attractive if the data needs to be synchronised. Which one to use really depends on the particular situation.
Cheers
|
|
|
|
|
Any idea why I get the above error with the following simple code snippet?
void parseStream()
{
string str = " " +
"<foo> "+
"<foo> ";
StringReader strReader = new StringReader(str);
XmlTextReader reader = new XmlTextReader(strReader);
while( reader.Read() )
{
switch( reader.NodeType )
{
case XmlNodeType.Element:
Console.WriteLine("{0} : {1}", reader.Name,reader.Value);
break;
}
}
Console.WriteLine("Done");
Console.Read();
}
|
|
|
|
|
Your XML is most like incorrect, with out the XML or the exceptions message (not just the exception) people cant answer you.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
This is the error I'm currently getting in Visual C# when I try to drop in one of my home made components.
I've made several components before and even this one I am working on was performing exactly how I was expecting, but for some reason last night, that's the only thing I see now. I can't add any of my components to a form without seeing this message.
Strangely enough, I can still run the forms and they work great, but I can't modify the form due to this error.
Any thoughts on where I should look?
Thanks!
|
|
|
|
|
Finally got the error a bit narrowed down. I took a new project, added a blank control, and a blank form.
I can drag the control onto the form no problem without the error.
*If* I add a reference to 'Microsoft.DirectX' to the project, then I can no longer add the control onto the form without 80131019.
So if my project or my component is using DirectX, then I cannot use them. Thoughts? Ideas?
|
|
|
|
|
Tad more info...
My component can have a reference to Microsoft.DirectX, but my form that is the target for the component cannot. Once I removed the reference to it, my form works fine and my component can now be dropped onto my form. But, alas, I need to do some DirectX in my form as well.
|
|
|
|
|
I am trying to write a wrapper to some VB6 code in C#. The problem is the VB6 code wants to return a Variant. How do you handle this in C#?
Example:
[VB6]
Dim pixels As Variant<br />
pixels = pixelBlock.SafeArray(0)
[C#]
? = pixelBlock.SafeArray(0);
Mark Sanders
sanderssolutions.com
|
|
|
|
|
object pixels = pixelBlock.SafeArray(0);
is the direct traslation.
You could probably also use
System.Array pixels = ...
or if you know the type of the array, you might get away with
MyType[] pixels = (MyType[]) ...
Paul
We all will feed the worms and trees So don't be shy - Queens of the Stone Age, Mosquito Song
|
|
|
|
|
I'm sure this is totally documented and I am just looking / searching for the wrong things here - if some kind soul can point me to the right documentation, then I'm sure I can work it out for myself.
I want to add a new element to the Windows Explorer "Send To..." - call it "Send To->Webmail Recipient" - what it will do is parcel up the files that have been highlighted and present a (C#) form that will ask for a recipient and then send those files via my webmail system to the recipient.
Can someone point me in the right direction?
-Adrian
|
|
|
|
|
|
I thought so too - however, the article pointed to shows you how to add a "Send To" menu item to your own application, not how to add a menu item to the "Send To" menu.
-Adrian
|
|
|
|
|
I thought there were interesting stuff in the code itself, but anyway. A SendTo handler is a COM object which implements the IDropHandler interface.
Mike dunn has written an article[^] about how to do this using C++/ATL.
Now for C#, the basic start is to implement the IDropHandler interface using the appropriate attributes. A good start is COMInteropPart2\CSharpServer from the VS.NET sample cds. It goes like this :
using System;
using System.Runtime.InteropServices;
namespace CSharpServer
{
[Guid("DBE0E8C4-1C61-41f3-B6A4-4E2F353D3D05")]
public interface IManagedInterface
{
int PrintHi(string name);
}
[Guid("C6659361-1625-4746-931C-36014B146679")]
public class InterfaceImplementation : IManagedInterface
{
public int PrintHi(string name)
{
Console.WriteLine("Hello, {0}!", name);
return 33;
}
}
}
|
|
|
|