|
The playing item could be found in:
WMP.currentMedia.name
Heino
|
|
|
|
|
Thank u for your reply!!
how can i appoint this Object?
please give me an example?
|
|
|
|
|
You must have AxWMPLib in your reference of your C#-project.
Then you have to add the Mediaplayer as a control to your form.
For instance, name the control to "WMP".
After that you can do.
WMP.URL = "the musicfile full path";
string cName = WMP.currentMedia.name;
Heino
|
|
|
|
|
I triedto execute a notepad application in windows services using
1. System.Diagnostics.Process.start("notepad.exe")
2. System.Diagnostics.Process process1 =new System.Diagnostics.Process();
process1.StartInfo = new ProcessStartInfo("NOTEPAD.EXE");
process1.Start();
and by giving full path also i.e "c:\windows\notepad.exe"
But the application is not started and it is not showing error also.
Could you please give a suggestion.
Please it is very urgent.
And I want to know how to get the acknowledgment from the process that i has been executed successfully.
-- modified at 7:31 Saturday 26th May, 2007
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I have a question. Why would you want to do this? The purpose of a windows service is that it is running as a set user that you define in the login tab. This allows the windows service to run all the time not just when someone is logged into the computer. Ok that being said.
I would guess that you are running your windows service with a login that doesn't have rights to open notepad, or that the window service perhaps is not running. The way you are going about trying to open note pad should work fine. Perhaps you should check the event log to see if any errors are getting logged. You could also do some event logging in your windows service. You also might want to put a try catch around the call to your process to open notepad, you might be getting an exception.
Hope that helps.
Ben
|
|
|
|
|
By chance I've come across this problem some time ago, too.
I wanted to create a service that's listening for PowerEvent and SessionChange events (suspend/resume windows) and executes applications in a given directory (similar to Autostart, but being executed even when the computer is restarted from suspend mode.
Unfortunately, I couldn't get it to work, no matter what I tried.
I could get the service to start the applications, but the application windows didn't show. Neither UseShellExecute=true nor UseShellExecute=false made any difference.
I couldn't find out why and the project was forgotten after a while...
So if anyone can help I'd be interested as well.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
This is what M. J. Jaya Chitra found:
Thanks for your reply.
I am having sufficient privileges.
Now I got the answer, I have checked the option 'interact with desktop' in the 'Log on' tab in the service properties window.
But this leads to another question, this is done manually is there any provision to change this property while designing the service itself
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Thanks for your reply.
I am having sufficient privileges.
Now I got the answer, I have checked the option 'interact with desktop' in the 'Log on' tab in the service properties window.
But this leads to another question, this is done manually is there any provision to change this property while designing the service itself
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I don't know any way of doing it, but that doesn't mean it can't be done. If you search through the ProcessInstaller you may find a property that would install the service as checked.
Ben
|
|
|
|
|
I created a custom control which simply is a data-bound ComboBox . It has a custom property that causes an ArrayList of KeyValuePair elements to be passed to the DataSource property. It also sets the DisplayMember and ValueMember properties.
What's weird, is the fact that my control sometimes works fine and sometimes it doesn't. I have no idea why, but when I put on Form1 everything is fine, while on Form2 the Items collection stays empty, although the DataSource property contains data and it is exactly the same data (pulled from the database in the same way) that I use in case of Form1 .
I tried to use a DataTable instead of an ArrayList , but it changed nothing.
Does anybody have any suggestions?
|
|
|
|
|
I found a solution.
It seems that the problem was caused by the fact that in one the windows (Form2 ) I was trying to access the Items collection in the window's constructor. Even though I put my code after the InitializeComponent method, the combo box must've been still not fully initialized. I moved the code to Form.Load event and everything works fine.
|
|
|
|
|
Hi
Does anyone have a tip about a nice C#-control for volumesettings ?
The common trackbar will do, but i need one where i can set Backcolor to Transparent, and the standard trackbar does not accept that.
Any tips ?
With Kind Regards
Heino
|
|
|
|
|
Either you search for custom control or you write your own
|
|
|
|
|
Could you create a user control that inherits the trackbar and use SetStyle to allow a transparent backdrop?
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Ok , that could be an idea.
I do not know how to use the SetStyle, but i will check that out.
Thanks.
Heino
|
|
|
|
|
SetStyles(System.Windows.Forms.ControlStyles cs, boolean b)
To try to have a transparent backcolor, you would use setstyle in the initialization of the control.
SetStyle(ControlStyles.SupportsTransparentBackColor,true);
Their are also a few other painting routine properties that you can set to true, the properties assist in reducing flickering from custom paint routines.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Ok..now i have tried , but....
As i can see....i can set my usercontrol to transparancy but i am not allowed to set the Trackbar-control backcolor to Color.Transparent anyway.
Heino
|
|
|
|
|
Are you using .NET 1.1 or .NET 2.0?
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
I using NET 2.o and VS2005.
Maybe it's lack of competence from my side, but i cannot figure out how to set the background to transparent of the Trackbar.
The only way i see is to redraw my own style trackbar.
Heino
|
|
|
|
|
Is other methods which show a png-picture in the Window Form ?
Thanks.
|
|
|
|
|
Is png not supported in the bitmap class?
Bitmap b=new Bitmap("C:\yadda.png");
pictureBox1.Image=b;
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi friends,
I have arrise a problem in active report C#.My report width is 6.938 in.But in constructor i have change the margins like that:
float fltMargin = 0.05F;
PageSettings.Margins.Right = fltMargin + 0.10F;
PageSettings.Margins.Left = fltMargin + 0.10F;
PageSettings.Margins.Top = fltMargin + 0.15F;
PageSettings.Margins.Bottom = 0.0F;
And if the report contains two pages it shows two pages in print preview.
BUT THE MAJOR PROBLEM IS THAT WHEN I CLICK THE PRINT BUTTON IT TAKES FOUR PAGES.
i.e TWO BLANK PAGES.
Please help me in this solutions.
Thanks.
|
|
|
|
|
i am getting same issue... please help...
Best Regards,
Wahyu
|
|
|
|
|
hi 4 all
when i try to limit installation for my application there is some problem occured , i need to protwct my application from any hacking ...
1- i need to limit install from cd (one installation for any cd ) and dont copy this cd .
2- this application contain mdb ( accses database) how can i making backup for this database .
3- when i install application , copy program folder from ( c:\program file \ my application ) and paste this folder in another computer it work probably, how can i prevent this hacking
thanxxxx for all
|
|
|
|
|
Any idea why do I get this stupid exception when I actually want to open a connection!!
ConnectMe = new OracleConnection("Data Source=orcl; Persist Security Info=True;User ID=DLDSP; Password=DLDSP;Unicode=True");
ConnectMe .Open();
ps. The database is running fine from Sql*Plus
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|