|
Hi!
Does anyone know, where i can specify a channel of my sound card to
play a mci-video?
I created a class Media, where i have 2 functions that are neccessary
for playing the movie:
1.) public void Open(string sFileName,System.Windows.Forms.PictureBox
videobox)
{
if(this.Status() == "playing")
this.Close();
sCommand = "open \"" + sFileName + "\" type mpegvideo alias
MediaFile style child parent " + videobox.Handle.ToInt32();
mciSendString(sCommand, null, 0, IntPtr.Zero);
sCommand = "put MediaFile window at 0 0 " + videobox.Width + " "
+videobox.Height;
mciSendString(sCommand, null, 0, IntPtr.Zero);
FileIsOpen = true;
}
2.)
public void Play()
{
if(FileIsOpen)
{
sCommand = "play MediaFile";
if (Repeat)
sCommand += " REPEAT";
mciSendString(sCommand, null, 0, IntPtr.Zero);
timer1.Enabled = true;
}
}
But where can i specify the channel for audio output????
As i said i have a sound card with 4 channels, additionally i have the
on board sound.
I want to play the sound on every channel - but how can i do this???
|
|
|
|
|
I have made a windows service.And write a low level keyboard event in it. But it did not invoke when any key pressed.
May any one tell me How events would be invoke in Windows Service.
|
|
|
|
|
What do you mean by "a low level keyboard event"? Did you write a keyboard hook? What does the code look like? Also, Services run under their own desktop. If all you did was create a form and handle its KeyDown event, it'll never see a single keystroke.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
Is it possible to use DAO (Data Access Objects) with C# code?
I need to edit a Jet database... and DDL SQL is not cutting it.
I've searched the net, and can't find DAO code samples in C#.
Is DAO a dead dog? If so, I can't find much on ADOX for C# either.
thanks,
Ron
|
|
|
|
|
C# supports ADO.Net for any kind of databases. so you can use ADO.Net to access your database.
|
|
|
|
|
Unfortunately, from my research, ADO.NET SQL isn't able to change the column's "Allow Zero Length" property. That is why I'm turning to DAO or ADOX.
Ron
|
|
|
|
|
DAO died a long time ago. Also, the last version of DAO won't work with Access XP and above databases.
You can find the ADOX docs here[^]. There are no C# examples, so you'll be translating the VB6 examples.
Just make sure you have the latest MDAC installed. You'll be adding a COM reference to ADOX. You won't find this stuff in a .NET library anywhere.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks for the info and link Dave!
Half the battle is finding the right direction to follow.
Ron
|
|
|
|
|
Hi
I want to read/write file located in the C:\Windows directory of remote pc. Can anyone suggest me wat are the possible ways and which is the best way to do that.
Regards
sAqIb
|
|
|
|
|
Well if you are looking for a C# solution then you will need a program running on that remote PC that will be able to accept commands(and then operate with that file) over the internet from your PC. Look at remoting (this site has plenty of articles) for ideas how to acomplish that.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Is it possible that i access a file for read/write without a program that is running on the remote pc over the network. (i mean i don't want to access the file with the traditional client/server based programs.)
so any suggestions???
sAqIb
|
|
|
|
|
if it is a local network then you just have to share that file/folder.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
consider the scenario when the folder is not shared. As i have to access a file which is located at C:\Windows, so no one like to access that file over the network. so is there still any possibility?
sAqIb
|
|
|
|
|
Nope. But you could grant access to that file ony to one user so nobody else could access it.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
there must b some way to do that
sAqIb
|
|
|
|
|
I am pretty shure that there isn't. I mean just think for a moment. What if you ware able to mess around with other peoples files over the network. Not a happy place, eh?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
So long as you have admin permissions to the remote PC, the UNC path to the Windows folder (without any additional shares) would be "\\machineName\C$\Windows\filename". This is what you would use for opening your files.
But this is dependant on your network environment. If the machines are setup in Workgroup mode, you'll probably have problems because the account that your code is running under doesn't have permissions to the remote PC. Each machine maintains its own set of user accounts.
If in a domain environment, this gets much easier, since domain user accounts are common to all machines in the domain.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
I have created a chat application, and one of it's functionality to send files to the connected user.
I read the contents of the files into a Byte array and send that through sockets.
Now when i send a file of 150 kb size the file seems to be corrupted at the receivers end.
some part of the file is not received.
Is there any restriction of size for sending files across internet using sockets?
I am able to send small files without any problem.
When i run the same application locally, i am able to send huge files of 3-4 MB easily.
Can anyone point out why this is happening?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Hi,
System.IO.FileStream fstream = new System.IO.FileStream(filename, System.IO.FileMode.Open, System.IO.FileAccess.Read);
byte[] buffer = new byte[fstream.Length];
fstream.Read(buffer, 0, buffer.Length);
fstream.Close();
//writing to the network stream//
outStream = this.Client.GetStream();
for (int i = 0; i < buffer.Length; i++)
{
//outStream.Write(buffer, 0, buffer.Length);
outStream.WriteByte(buffer[i]);
}
I have used this and its working correctly....
nishu
|
|
|
|
|
Thanks for the reply,
but i have a defined format of the messages that are sent across.
And i send the file contents in that message i.e.
i read the bytes of the file and send that at once.
is that creating any problem?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Can you please tell me how you are doing ecxactly coz I have creadted a similar kind of application in which I have a seperate thread to process the sending of the file.
You are sending in a message format right?i didnt get that part of yours acxactly.
Can you please tell me in little detail so that i can help you ,
Other side at recieving end what are you doing?you are parsing your messages ?
--
nishu
|
|
|
|
|
ok, just tell me how do i create a separate thread to receive file from the same socket stream?
Becuase what i want is during the file transfer if some sends some text message that message should also be received and displayed.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
I was on vacation thats y I coudnt answer your question that time,
See what you do,send some special message for sending the file ,after receiving the message from the other side open new socket with specific port in different thread,and continue the process ,after reaching end of the file,close that socket.You will have to implement theading for multiple file transfer or everyting will be messed up.
Now you must have got your answer ,right?
If you face any more difficuties post me,ok?
enjoy buddy
nishu
|
|
|
|
|
ok, now one question,
wht if the user is connected to more than one buddies and while some one is sending file to this user, some one else sends some text message.
Do u think these messages will mess up as they will be received thru the same port.
Also is there any chances of exception when 2 threads are using the same port?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
how to identify whether a dropped object in my application is a file or a folder.
atpresent, i am using File.Exists method and Directory.Exists.
Is thr any other way to find out.
Actually if we rightclick a file or folder and select properties... it will tell us whether it is a file or folder(Type: FileFOlder or File)
any ways to retrive tht information.
I am using C# application.
|
|
|
|