|
In windows you can define your own user-defined messages and send these messages between threads to notify each other, can someone tell me whats the eqt. for this in c#/.net, is there a native technique of doing this (event/delegate) or how do we do this thru p/invoke.
thanks
Kannan
|
|
|
|
|
Are you talking about SendMessage Api?
Bo Hunter
|
|
|
|
|
Yes..you are right.
I know that its possible to use this by p/invoke mechanism, but is there a native way.
thanks
Kannan
|
|
|
|
|
You can do anything in native code but it is just that Native.
If you want a native way then you need to go to the c++ forum.
Bo Hunter
|
|
|
|
|
I'm sorry
Its not "native" , I meant managed code here.
thanks
Kannan
|
|
|
|
|
Hi.
I'm currently working on a "PreView" Windows Form Control. I will use the control to preview multimedia content to the user, sutch as audio and video files. I need some help on finding out witch approatch to take.
Should i use Windows Media Services 9 Series SDK, should i use Windows Media Player 6.4 SDK, or should i use Managed DirectX and build some custom control playing the media file?
And, can this be done using managed code, or do i have to write a COM wrapper for the WMP9 COM object? Or, what about WMP6.4 ActiveX control, would that be a better choice?
Hope to get some feedback from people who have written applications like this before.
|
|
|
|
|
|
Hi Øyvind.
Thanks for feedback on my question. The only disadvantage by using DirectX9, is that it's more likley the user have WMP6.4 than DirectX9 installed on the computer. And, can i include DirectX as a part of my MSI package?
|
|
|
|
|
|
Found that link after some browsing on MSDN. I'll do a test to do a
audio/video player in Managed DirectX9.
Thanks alot for the help so far! Btw: From Norway?
|
|
|
|
|
can't hide my home country with that name, I guess
Hipp hurra for 17. mai!
Øyvind
|
|
|
|
|
I want to learn about sockets and how to write a client/server application for sending .zip files of family photos to my sister who has moved away for a year. It will basically be a file transfer between 2 IP addresses. I can vaguely remember writing a sockets-based app in Java at university a few years ago but sadly my knowledge has left me since then
I want to use C# for this application to get some experience of the new language. Can anyone point me in the direction of any useful tutorials so I can get started on my program?
Thanks
|
|
|
|
|
Sounds like this is something you want to learn for yourself so I wont get into the technicalities etc but I suggest that you look into C# Remoting.
There are quite a few examples here on CP
|
|
|
|
|
Hi ,
Is there a way to make a c# toolbar dockable with a gripper ?
Thanks
|
|
|
|
|
|
Hello,
I'm trying to use URLDownloadToFile and a have a strange behaviour (and WebClient doesn't fit my needs):
URLDownloadToFile(IntPtr.Zero,"http://www.kimo.com.tw",@"c:\test1.htm",0,IntPtr.Zero);
<-- create the file
URLDownloadToFile(IntPtr.Zero,"http://www.yahoo.com",@"c:\test2.htm",0,IntPtr.Zero);
<-- create the file
URLDownloadToFile(IntPtr.Zero,"http://www.boursorama.com",@"c:\test3.htm",0,IntPtr.Zero); <-- doesn't create the file (but no apparent failure returned from the function)
Any idea ? Try by yourself.
R. LOPES
Just programmer.
|
|
|
|
|
Hi I'm realativly new to the programming. Well I've taken it oppon my self to write this program.
Here's the background info. Let's say for example... The process "notepad.exe" keeps getting shutdown, for reasons that are irrelivant.
How can I make an application that will watch the process "notepad.exe" and see if it's running or not... and if it is not running immediately start it up?
I've tried my self... but I'm having mucho troubles...
/\ |_ E X E GG
|
|
|
|
|
Are you starting "notepad.exe"? If you are, you can monitor the ProcessExit (or something like it) event in the Process or ProcessStartInfo class. You can tell that I know very little about this.
If you are not starting the process, you have two options.
1) Make a device driver to monitor process creation and destuction. I have absolutely no idea how to do this, but I know it can be done.
2) Poll for process info using toolhelp or similar. This would involve P/Invoke and I am not sure I know how. .NET might also have a built-in process enumeration class, so check around with the Process class.
I hope I have helped
Mike_V
|
|
|
|
|
Uh, that dosn't really get me anywhere... but thanks for the effort....
/\ |_ E X E GG
|
|
|
|
|
You can "spawn" the process in debug mode and keep tracking debug events related to process exiting. Check these funcions in the MSDN:
CreateProcess
WaitForDebugEvent
ContinueDebugEvent
Function prototypes and structures are a bit complex, but that´s the only safe way to do that.
"When I look into your eyes, there´s nothing there to see, nothing but my own mistakes staring back at me"
|
|
|
|
|
I have a web form and would like to cause a button to be clicked under a certain condition. How do I (what's the syntax) programmatically cause a button click so that the user doesn't have to do it?
Thanks all, in advance, for your reply!
|
|
|
|
|
You should be able to call PerformClick on the button object.
|
|
|
|
|
|
I am working on a user control and I need to call uxtheme.dll if it is available. If I do the [DllImport("uxtheme.dll")] thing, my app will not load on anything but XP. So...
I must resort to GetProcAddress which returns a function pointer. How do I get that to a Delegate? Should I make special delegates, like OpenThemeDataDelegate or just cast them all to Delegate ?
Any suggestions?
Mike_V
|
|
|
|
|
Mike_V wrote:
I must resort to GetProcAddress which returns a function pointer.
Why? You dont need GetProcAddress for DllImport.
How do I get that to a Delegate? Should I make special delegates, like OpenThemeDataDelegate or just cast them all to Delegate?
Again, why?
[dllimport...]
static extern IntPtr OpenThemeData(IntPtr hWnd, string classlist);
You need IntPtr here, you are working with HANDLES, not CALLBACKS.
<a TITLE="See my user info" href=http:
|
|
|
|