|
Its the same as a windows application,
In new project, select Other Project Types, Setup and Deployment and select
Smart Device Cab Project
|
|
|
|
|
|
Thanks Jalpesh B. Patel.
Dear Patel i found Add Project output Group empty after so how do i achieve this; "In the File System pane, right-click Application Folder and select Add—>Project Output…. Add Project Output Group window, select Primary output set Primary output."
Thanks again
waiting for your response.
|
|
|
|
|
i am working with a project likely to be a media player.
can sum one tell me how to play video files in c#?
which namespace to be included?
which class to be used?
with thanks...
|
|
|
|
|
Namespace: System.Media
http://msdn2.microsoft.com/en-us/library/system.media.aspx
|
|
|
|
|
System.Media just contain classes for Sound Player but not 4 vido files. If u know how to play video files , can u give me a short codes
|
|
|
|
|
You should look into WPF it has some fantastic ability to handle media files. Try this article
http://msdn.microsoft.com/msdnmag/issues/07/03/DigitalMedia/default.aspx
|
|
|
|
|
Greetings
I am trying to make threads that run loops to be at the exact same step as the other threads. For example an output to the application could be the following:
Thread 1 = iteration 1
Thread 2 = iteration 1
Thread 3 = iteration 1
Thread 4 = iteration 1
Thread 1 = iteration 2
Thread 2 = iteration 2
Thread 3 = iteration 2
Thread 4 = iteration 2
and not
Thread 1 = iteration 3
Thread 2 = iteration 2
Thread 3 = iteration 1
Thread 4 = iteration 1
Thread 1 = iteration 4
Thread 2 = iteration 3
Thread 3 = iteration 2
Thread 4 = iteration 1
I am thinking of an implementation such as:
the first thread runs the iteration and waits
the second thread runs the iteration and waits...
the last thread runs the iteration and notifies all the other threads to wake (and go to the next step)
I have tried the following but it doesnt work:
<br />
CommonClass commonObject = (CommonClass)o;
for (int i = 0; i < 4; i++)<br />
{<br />
Console.WriteLine("Thread " + Thread.CurrentThread.Name + " is in iteration " + i);<br />
lock (commonObject)<br />
{<br />
if (Interlocked.Decrement(ref threadCounter) == 1)
{<br />
threadCounter = 4;
Monitor.PulseAll(commonObject);
}<br />
else { Monitor.Wait(commonObject); }
} <br />
}<br />
Do you find this approach correct?
Can you please suggest feasible solution?
Thanks in advance
|
|
|
|
|
Disclaimer: although I have studied threading, I am no guru, so take my suggestion with a grain of salt.
Also I'm not sure of .NET threading syntax, so everything will be in pseudocode.
---
Have one thread act as a scheduler for the rest of the threads, telling them when they are allowed to run.
1. Start running each thread.
2. When a thread completes an iteration, tell it to Wait on some condition variable that is regulated by the scheduler thread.
3. The scheduler thread will do nothing until the wait queue is "full" IE all available thread are waiting, or the "running" queue is empty.
4. The scheduler broadcasts to all waiting threads, telling them to wake up and start running.
|
|
|
|
|
To do what you want you can use a locking mechanism on a data object and start the threads in order. Essentially the locking mechanism causes a side effect of putting the threads in the order that they are received at the lock.
HOWEVER, the order that the threads arrive at the lock is not guaranteed and thus your program may not run the order that you want.
I don't understand why you would use separate threads if the order that these operations be done is critical. If the order is critical, then you should use a single thread to process the operations in order to guarantee the order.
Phil
|
|
|
|
|
hello C# community,
I have a windows form with a tab control in it, that acts as the container for 6 or 7 tabs. I would like to add shortcut functionality, so that when a user presses the F3 key on the key board it will go to tab1 of the tab control, F4 to tab2 of the tab control.....and so on.
I know I read how to do this somewhere, I have been having trouble locating where that was. Is it a property on the individual tab page or is it in the tabcontrol?
perhaps someone knows off the top of their head.
thanks in advance,
FG
-- modified at 10:38 Wednesday 25th July, 2007
I am who I am because of who everyone around me is.
|
|
|
|
|
|
Impatient, aren't you?
This board is supported by volunteers who do this on their own time, not yours. You're not paying for support, so why are you bitching that you're not getting it fast enough??
Enable the KeyPreview property of your form, then handle the form's KeyDown event. Check for the hot keys you want and show the appropriate tab depending on which key was hit.
|
|
|
|
|
Dave Kreskowiak wrote: You're not paying for support, so why are you bitching that you're not getting it fast enough??
I could give him a rather drawn out solution, but he'd have to pay up to me through PayPal first. Oh and by the way, my solutions are As-is, no refunds
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
relax...I just thought it was not such a hard question for this tremendous community.... In any case, I did not think that my post was particularly "rude", if I offended you or anyone else here at Code Project, my sincerest apologies.
Why does everything have to boil down to money. No I am not paying for support, but I am not paying for you to scowl me because I added a short comment to my own post. A great part of being part of a community is knowing how to interact in a community.
just like you, I am a volunteer as well, and where I can, I help people that need the help.
-- modified at 15:16 Wednesday 25th July, 2007
-- modified at 15:26 Wednesday 25th July, 2007
I am who I am because of who everyone around me is.
|
|
|
|
|
P.S. a simple "I don't know" would have sufficed.....but thanks for your help anyhow.
-- modified at 15:15 Wednesday 25th July, 2007
I am who I am because of who everyone around me is.
|
|
|
|
|
flyingnome wrote: P.S. a simple "I don't know" would have sufficed
How does "Turn the form's KeyPreview on and handle its KeyDown event..." translate to "I don't know how to solve your problem"?? Sounds like a solution that works to me...
|
|
|
|
|
thanks Dave.
I am who I am because of who everyone around me is.
|
|
|
|
|
flyingnome wrote: Is there really no one that knows how to do this?
Give people time to respond if they know. Impatience like that only is going to piss people off and allow them to be less likely to answer your question.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Paul Conrad wrote: Impatience like that only is going to piss people off
I didn't mean to piss anyone off.....just needed some help....sorry if you read the post and wanted to kick your dog.
I am who I am because of who everyone around me is.
|
|
|
|
|
I have a login page that contains user id and password and then a button called ok...
My problem is after typing tha password i have to click the oke button... now i want this to happen on click of any button...like enter
please help me i am new to c#
Thanks Vikas
|
|
|
|
|
There is property on the form, not the button.
After adding the button to the form, on the form set the AcceptButton property on the form. You also have a CancelButton property.
all can be done in form load
IButtonControl ib = (IButtonControl )button1;
this.AcceptButton = ib;
similarly others
|
|
|
|
|
i am doing all this
this.DialogResult = DialogResult.ok
this.Hide();
this.Dispose(true);
Now here this is happening on click the ok button
this i want to happen on click of enter button
Thanks in advance..
vikas
|
|
|
|
|
when you need it Enter Event
handle Key Event.
the form property is perfect.
|
|
|
|
|
right now i have to click on ok button i want after type the password if user click enter button that time event shoud fire to accept this...
|
|
|
|