|
Satips do you intentionally just answer questions badly?
|
|
|
|
|
Hi,
I embedded windows media player 11 on a form, and I add a few files to the currentplaylist of it. like:
WMPLib.IWMPMedia m= wmp.mediaCollection.add(sFile);
wmp.currentPlaylist.appendItem(m);
I want this playlist "Repeat" forever. but the function "repeat/Ctlcontrols.repeat" is gone. How to do this????
I don't want to create my own timeline thread to check the duration by the way.
Also I could not use the StatusChange and PlayStateChange event, it is not recommended by MS.
thanks a lot in advance!!
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
hello all;
i am working with an external electronic curcuit and i want to take the data that this circuit provides by serial port to the computer and by windows application open the port and read the data and finally to draw these data.
please any body hase an idea about how can i do what i am talking about using c# 2005 please help me.
Thank you all
ahmad al-omar
ahmad al-omar
|
|
|
|
|
It is very simple to open/read from a port in .NET.
Investigate (aka MSDN/Google) the System.IO.Ports namespace and in particular the System.IO.Ports.SerialPort class.
A small sample:
System.IO.Ports.SerialPort port = new System.IO.Ports.SerialPort("COM1"); //whatever com-port your device is hooked to
port.Open();
string oneLine = port.ReadLine();
Hope this gets you started.
-Phil
|
|
|
|
|
thank you
i made a button to open the port and other to read the data but when i click on the read button my PC stop working and i have to reset it
may be i wrote a wrong code and may be i choose wrong COM port
i will try it again
thank you
ahmad al-omar
|
|
|
|
|
[shameful plug]Take a look at my article on Terminal3[^], this has a simple graphing feature built into it as a demonstration. If you have any queries don't hesitate to ask.[/shameful plug]
|
|
|
|
|
thank you
but i dont know how to use your program when i choose terminal or graph no thing appears to me i dont know how to use it , can you help me in order to understand the operation.
thank you
ahmad al-omar
|
|
|
|
|
The code which displays stuff on the graph is in GraphWindow.cs. I intended this program as more of a reference than to actually use it. To see stuff in action do the following:
- File | New | Graph
- Click the SerialPort icon on the toolbar, this will add a port to the graph window (multiple ones are supported).
- Click the little drop-down arrow of the new button and select Properties.
- Edit the port settings to what you require (note you must change the Color as this defaults to White and will not display on the graph).
- Click the little drop-down arrow and select open, this will open the port and is ready to receive data.
To see data being plotted the sample program requires that data being read on the serial port has two double values seperated by a comma, it then splits these and uses them as the X and Y values of the graph. Note this was an example so there is no complex error checking or anything like that. One problem you might come across is the two values and the comma must be read in all at the same time. How I used this as a demo for my colleagues was to set up the com0com virtual serial port drivers and then I could have another window open in the terminal window and use the combo box to send the comma-seperated values as one string.
Hope that helps, by the way, if you're doing work with serial ports I strongly recommend installing these virtual ports, it makes it perfect for testing stuff because you don't need two hardware ports and a null modem cable, what you write to one port (COM10 on mine) is sent out on the other (COM11 on mine) and vice versa so you can get applications to talk to each other and you can debug things in Hyperterminal etc without having to hook up the hardware system.
|
|
|
|
|
I have an odd problem with remoting. I have an application that acts as a server for my remote object and also acts as a client for the same object (so it can work on it and react to changes to it). So in this case the object is in not just on the same machine, but even in the same process. Now this works fine most of the time, but on some machines, when the computer is connected to the internet it works, but when it's disconnected it doesn't work. I get an error "No connection could be made because the target machine actively refused it".
I added a sleep statement between the publishing of the object and the attempt by the server to connect to it and I could see using netstat.exe that the object is published and listening. Does anybody have any ideas as to what might be happening here?
Of course, it works just fine on my development box
|
|
|
|
|
Sounds like a dns problem of some sort.
Did you define the connectionstring to the hosting process as localhost or someother hostname? If the hostname cannot be resolved due to lost connection to your dns server, you might get the results you're seeing.
-Larantz
|
|
|
|
|
Thanks for the reply.
I should be connecting to the localhost. Here's how I have it set up:
BinaryServerFormatterSinkProvider provider = new BinaryServerFormatterSinkProvider();<br />
provider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;<br />
IDictionary props = new Hashtable();<br />
props["port"] = mySettings.TCPPort; <br />
TcpChannel channel = new TcpChannel(props, null, provider);<br />
ChannelServices.RegisterChannel(channel, false);<br />
RemotingConfiguration.RegisterWellKnownServiceType(typeof(MyMessenger), "MyRemoteService", WellKnownObjectMode.Singleton);<br />
<br />
messenger = (MyMessenger)Activator.GetObject(typeof(MyMessenger), "tcp://localhost:" + mySettings.TCPPort + "/MyRemoteService");
Am I doing this correctly?
|
|
|
|
|
Looks correct to me.
Then I'm not sure what's causing your problem.
-Larantz-
|
|
|
|
|
Hi.
Can direct me, from where should I start .Net 3?
I don't have any idea about it.
Best wishes
|
|
|
|
|
Downloading the framework!
After that write the famouse Hello World! program. And after that use your imagination
|
|
|
|
|
hahah!!!
Well said!!
by the way y is it always the hello world program!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
yeah, I'm sure that Google doesn't have ANY links about the subject.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
You're just getting bitter.... :P
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm bitter about several things today and posts like these is just like poking a bruise.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
leckey wrote: I'm bitter about several things today
Would it have anything to do with those circular reports you posted about the other day?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
No, not anymore. Although the manager had me fill in the request for this new report. Which I suspect I will be running for HIS team. In the end it's not a big hassle as long as he doesn't ask for a quarter's worth of data in one hour.
Things I am bitter about:
1. The Chatty Cathy's. A couple of them have the most annoying laughs. Today they would not shut up.
2. My husband forgot to take all the trash to the curb last night.
3. My husband has yet to call his cousin to tell him we're coming to visit this weekend.
4. Bulimic cat. At least today it was not in my shoe.
5. Dislocated jaw. I had dental work and my jaw hurt like crazy. Had to have it put back in place yesterday, but my jaw still hurts from the manipulation.
That's all...for now....muhahahaha.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Chatty Cathy, I remember those.
Forgot trash night, oops, been there done that
Call cousin, there's nothing funner than a surprise visit. Unless your cousin-in-law doesn't like that :->
Bulimic cat, bummer ... our kitten was straining too much last week, and the vet had to stitch his a-- back in place ( I had to remove the stitches after about a week, and he's doing alot better now )
Dislocated jaw....hmmmm, ice cream if possible?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I don't know why the Chatty Cathy's think we all need to hear about their daily lives. Like they are SOOOOO important.
The problem with the trash is that my husband has only two chores: trash and unload the dishwasher. I am not asking for much here.
yeah, the prolapsed anus is not fun. I once got to see surgery on a lizard that had that.
The jaw is back in place and the swelling is going down. However I am lactose intolerant. (Give me a dilly bar and I'll be cramped over in pain in 20 minutes.) Lots of soup. Made goulash tonight.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
leckey wrote: I don't know why the Chatty Cathy's think we all need to hear about their daily lives
Maybe they either are unaware of others around them or they are starving for some strange form of attention.
leckey wrote: dishwasher
Wish we had one. It's planned once we get around to remodeling the kitchen Rest of the house first, though...
"You will see a delete button on each of your posts. Press it." - Colin Angus Mackay
|
|
|
|
|
Is the cat female, and did you get it "fixed"?
If so, this is a pretty common thing. After the fixing process, female cats often tend to gorge themselves (perhaps they think they're constantly pregnant?) and vomit. And vomit. And vomit. Trick is to feed them little but often. Or kick them out.
|
|
|
|
|
I used to be a vet tech and I have never heard that one. Some cats just vomit more than others. She doesn't necessarily gorge herself and vomit. Sometimes it's just bile. My cats have to be on soft cat food because the eldest has digestive problems. I already feed them four times a day. And they are NOT getting kicked out...even though I found out I am allergic.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|