|
There are number of good articles deaing with how to raise custom events. You can refer to the following link (Events and Delegates Simplified)in CP.Hope this helps you
http://www.codeproject.com/csharp/events.asp
Regards,
Jay.
|
|
|
|
|
Hey
I have downloaded a project tat are using System.Management and i can compile an run it. But when i make a project meself I can't include System.Managemet.
It isn't in the drop down list (I use VS). And I get the following error : D:\Visual Studio Projects\ipset\WMIHelper.cs(3): The type or namespace name 'Management' does not exist in the class or namespace 'System' (are you missing an assembly reference?)
Does anybody know how to include System.Management ?!?
Thanks in advance
Jacob
|
|
|
|
|
You have to add a refrence to the System.Managment namespace. In the solution explorer, right click "Refrences" then click add refrence, then select the System.Managment one... and your in action.
If it's already in there with a yellow icon or something just delete it and add it again.
i think...
/\ |_ E X E GG
|
|
|
|
|
You need to include a reference to the System.Management.dll before you can include it within your project. Select Project --> Add Reference... and scroll down to the System.Management entry and hit the Select button. Now you should be able to include that namespace within your code.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Hi
I want my .DLLs to be in a subdir of the .exe, but so far have been unable to figure out how to configure things in order to make it work.
thanks
|
|
|
|
|
Why? Anyway, there really isn't any configuration you can do that will accomplish this, that is reliable. Keeping them in the same dir as the .EXE is the best practice.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Have you tried to add the sub directory to the system search path? I would have to assume you have a good reason to do that though. It is more reliable to keep them in the same directory.
|
|
|
|
|
|
|
Hi
I want to have a easy way to control my mdi documents. (like it's done on mirc, for example) but all i've been able to get is a list in the menu items.
|
|
|
|
|
Read[^] about the Form.MdiParent property in the .NET Framework SDK, which includes an example.
On a particular MenuItem (for example, "&Windows"), you can set MenuItem.MdiList to true in order to display all MDI Form s in the container application.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I have a simple text file on the network. My application will read and write to this file, can someone tell me how to lock this file while in exclusive mode so that another app or a user won't access this file while I'm reading/writing to the file? Also, can someone tell me how to check if this file is locked before I try to lock it?
Thanks
Sharon
|
|
|
|
|
Here is what I know
The IO namespace has a FileInfo class and some enumerations that control the Info, Access and Shareing of the file.
it looks kind of like this.
FileInfo fl = new FileInfo(@"C:\whatever.fil");
FileStream s = fl.Open(FileMode.OpenOrCreate,FileAccess.ReadWrite,FileShare.None);
This should get you an open file with RW and be exclusive to you.
|
|
|
|
|
Use the managed DirectX 9 SDK.
using Microsoft.DirectX.AudioVideoPlayback;
Audio theAudioFile = Audio.FromFile("name of the file.mp3");
theAudioFile.Play();
It works with .wav, .mp3, and .wma files. Also note that in the .NET framework 2.0 beta, there's a built-in .wav player control called SoundPlayer, found in System.Windows.Forms.SoundPlayer.
#include "witty_sig.h"
|
|
|
|
|
Ive tryed using AudioVideoPlayback before and it cant find the reference i have directx sdk 9 and have updated to the new 9.0b runtime, but is the managed direct x somthing extra? ive been looking and have seen it mentioned in my search but not understood its meaning
|
|
|
|
|
The Managed DirectX 9 SDK is seperate from the DirectX 9 SDK. See here[^]. If installed correctly, the MDX9 assemblies will be added to the GAC.
#include "witty_sig.h"
|
|
|
|
|
For tutorials see an article called Managed DirectX Tutorial Part 2
This part talks about AudioPlayback and may be able to help you get started.
Kev Pearman MCP
|
|
|
|
|
id seen the tutorial but couldnt get it to run as i didnt have managed directx it would seem, but i cant find the download for managed direct x, anyone able to point me in the right place?
|
|
|
|
|
I just downloaded the latest version of directX from microsoft. In your project's you then have to add a reference to each DirectX Dll you are going to use.
Do a search on your machine for DirectX.dll and then add a reference to it (any other directx dll's should be in the same folder), this worked for me.
Kev Pearman MCP
|
|
|
|
|
i do this but i dont have any reference to audiovideo.
ive got latest directx runtime but oviously not managed?
|
|
|
|
|
Do you hve this folder
C:\WINNT\Microsoft.NET\Managed DirectX\v9.00.1126\
The version number at the end might be different.
If you don't then make sure you get the latest version of directX (230+mb i think) from Microsoft, thats the version i used.
In the folder v9.xx.xxxx\ you should find all the managed directx dll's that you need, including directx.dll and the audivideo dll that your after.
Kev Pearman MCP
|
|
|
|
|
no i dont have that, i looked for the latest dirext x all i could find was the new runtime, but looking at the latest SDK with teh runtime in its 230mb+ so i started to download that, is that what u meant?
its gona take me couple hrs on my partents con so ill post when its done
thx dudes
|
|
|
|
|
Thats the version i have installed. When you have installed it you should have the driectory i specified in the previous post with all your dll's in it.
Let me know how it goes.;)
Kev Pearman MCP
|
|
|
|
|
Thx dude yer its got what i need
|
|
|
|
|
Ok,
I am going to write a Wizard for a new project that I am doing at work. Depending on where you are in the Wizard the screen will have different controls. My problem is that if I re-use the same form I will have to change the size and mess around with the posision of controls..
My question is when creating a Wizard is it better to use more then one form or re-use the same Form and just re-size it as needed..
Thanks
Will
|
|
|
|