|
yes i need your help...but that time u r so busy, so i can wait for few hours
|
|
|
|
|
Im developing in C# and im changing the selected index of a combox box dynamically during coding, and on selectedindex event i want to load another combobox. My problem is the second combobox is not being loaded when the first one's changed during runtime, its only trigering the selectedindex changed when i do a click, does nayone know whats missing from my code.
Please Note that i had posted this question on ASP forum but was adviced to use this forum.
Thank you.
|
|
|
|
|
Did you set your combo box autopostback property to true? If not try it. Your problem will probably be solved.
|
|
|
|
|
Thank you for your response
Yes its set to true and it can even postback if i chenge the index by clicking the combobox. The problem comes when i change the index at runtime
Thnak you
|
|
|
|
|
I want to calculate the difference between the timein and the current time.Now I want to know how to extract the date only and time only from the database using the DATETIME datatype.
this is what i tried
SELECT Kid.kidName, Kid.kidGender, Kid.kidsAddress, Parents.parentName, Parents.parentContactNumber, VisitLog.TimeIn
FROM Kid INNER JOIN
KidParent ON Kid.kidUniqueID = KidParent.kidUniqueID INNER JOIN
Parents ON KidParent.parentID = Parents.parentID INNER JOIN
VisitLog ON KidParent.kidUniqueID = VisitLog.kidUniqueID AND KidParent.parentID = VisitLog.parentID INNER JOIN
ImagesStore ON VisitLog.kidUniqueID = ImagesStore.kidUniqueID AND VisitLog.TimeIn = ImagesStore.TimeIn
WHERE (VisitLog.TimeIn BETWEEN DATEADD(d, - 1, GETDATE()) AND GETDATE())
|
|
|
|
|
use the datediff function.
|
|
|
|
|
how is the relevant to C#?
and use pre tags when posting code blocks
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
listen,
you already used getdate() function when you insert into table1, use it again in a procedure to get now date,use datediff count days.
You have already used dateadd, getdate and datediff i don´t see how you could miss this.
you have it in your code.
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
I have one panel in which i have my control, know i want to move it at run time using mouse.
|
|
|
|
|
You must listen to event MouseMove, then change the location of the control depends on mouse location.
|
|
|
|
|
Hello Everyone
I'm trying to write an application which gets input voice from 4 different microphones & saves them in four different files.
I've succeeded getting the voices simultaneously, but I can't save them in four different files. I used FileStream method to create files & to write into them; I could create them but all 4input audios go(mix) into the one file while 3 others are left empty. I've used 4seperate threads for 4 audio inputs, & winmm.dll to catch audio from inputs, as well as an M-Audio Delta1010-LT sound card.
I'm using visual studio 2005 & C# on windows platform.
How should I do that?
I appreciate any kind of help, As I need urgent help
I've used a mthod to start capturing called start()
& a class called WaveInRecorder that uses winmm.dll to capture voice, to get available devices & to choose the device to capture voice from.
Here is a sample for two microphones:
<br />
private void Start()<br />
{<br />
ThreadStart ts1 = new ThreadStart(doit1);<br />
ThreadStart ts2 = new ThreadStart(doit2);<br />
t1 = new Thread(ts1);<br />
t2 = new Thread(ts2);<br />
t1.Start();<br />
t2.Start();<br />
}<br />
<br />
private void doit1()<br />
{<br />
<br />
String filename = FilenameBox.Text;<br />
String ending = ".wav";<br />
RecorderOutputStream = new MemoryStream();<br />
WaveLib.WaveFormat fmt = new WaveLib.WaveFormat(44100, 16, 2); <br />
m_Recorder = new WaveLib.WaveInRecorder(Int16.Parse(SoundDeviceBox.Text), fmt, 2048, 1, new WaveLib.BufferDoneEventHandler(DataArrived));<br />
<br />
fs = new FileStream(filename + ending, System.IO.FileMode.Create);<br />
}<br />
<br />
private void doit2()<br />
{<br />
<br />
String filename1 = FilenameBox1.Text;<br />
String ending = ".wav";<br />
RecorderOutputStream1 = new MemoryStream();<br />
WaveLib.WaveFormat fmt = new WaveLib.WaveFormat(44100, 16, 2); <br />
m_Recorder1 = new WaveLib.WaveInRecorder(Int16.Parse(SoundDeviceBox1.Text), fmt, 2048, 1, new WaveLib.BufferDoneEventHandler(DataArrived1));<br />
<br />
fs1 = new FileStream(filename1 + ending, System.IO.FileMode.Create);<br />
}<br />
<br />
private void DataArrived(IntPtr data, int size)<br />
{<br />
if (m_RecBuffer == null || m_RecBuffer.Length < size)<br />
m_RecBuffer = new byte[size];<br />
System.Runtime.InteropServices.Marshal.Copy(data, m_RecBuffer, 0, size);<br />
RecorderOutputStream.Write(m_RecBuffer, 0, m_RecBuffer.Length);<br />
}<br />
<br />
private void DataArrived1(IntPtr data, int size)<br />
{<br />
if (m_RecBuffer1 == null || m_RecBuffer1.Length < size)<br />
m_RecBuffer1 = new byte[size];<br />
System.Runtime.InteropServices.Marshal.Copy(data, m_RecBuffer1, 0, size);<br />
RecorderOutputStream.Write(m_RecBuffer1, 0, m_RecBuffer1.Length);<br />
} <br />
<br />
Thanks in forward
modified on Tuesday, September 16, 2008 9:31 AM
|
|
|
|
|
MeContra wrote: How should I do that?
How are we suppose to know? You havent even given us any details of your implementation.
|
|
|
|
|
Thanks Leppie for your attention; Yes U are quite right! I've updated my question. I hope I could give some details. Thanks again. If it's needed to give more details i'll going on with that.
|
|
|
|
|
Re you sure you're actually capturing the individual inputs? It sounds like you're getting the monitor (stereo mix) instead. If you post the code where you select and assign the input devices we may be able to help further.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Tnx Dave for your attention. I've updated my question & added some of my implementaions. I hope this provides enough info to get help. Thanks again.
|
|
|
|
|
Cool. I can see you've based this on this article[^]. I have a Delta1010 (not the LT but basically the same) at home so will try tonight (UK) and see if I can find a solution.
In the meantime it may be worth asking the author for advice although I see a different user has posted the same question there 21 hours ago
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Thanks Dave! I appreciate your assistance; I'll wait for your answer...
|
|
|
|
|
As I suggested earlier, it looks like you're not selecting the correct devices.
Mine is the standard rackmount Delta 1010. The inputs for mine are numbered as follows by winmm.dll, I would imagine yours are the same.
-1: Default (Control Panel|Sounds and Audio Devices|Audio|Sound recording|Default device - normally M-Audio Delta 1010 Multi)
0: M-Audio Delta 1010 Multi
1: M-Audio Delta 1010 1/2
2: M-Audio Delta 1010 3/4
3: M-Audio Delta 1010 5/6
4: M-Audio Delta 1010 7/8
5: M-Audio Delta 1010 S/PDIF
6: M-Audio Delta 1010 Mon. Mixer
I actually used the code from here[^] and duplicated the necesary objects in the code and UI. I then recorded multitrack with no issues. Note, each device is a stereo device. If you want to record multitrack mono then you'll need to record the necessary input into two streams and drop a channel in each stream.
This mixer[^] may also be useful to integrate!
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Thanks Dave I'll going on with that solution. As you said the inputs for mine are the same as yours. But when I was recording from multi inputs, I got some gaps during playback & also a small delay. Did you have that problems during playback? & Did you used threads separatedly for every input to record?
Thanks again
|
|
|
|
|
I didn't use any threads, I just did it all on the main UI thread. The problems you're experiencing may be solvable my altering the buffer settings.
For low latency, it's better to use ASIO. There's an article on CP[^] that I haven't yet tried that uses ASIO with the steinberg SDK (they invented ASIO). There's also an open source project called PortAudio[^] and an open source .NET wrapper for it called PortAudioSharp[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Hi,
On my local machine I have admin rights.
I run a windows service and it works fine with correct results...
Now I would like to run the service under a different account. So I created an account i.e userTest which is on the domain on the network. Then added this userTest to my machines admin users.
Question:
I do not know why the service does not run under this user's account. When I try to start the service, the message is: "Service on local computer started amd then stopped. Some services stop automatically if they have no work to do, for eaxample, the performance logs and alerts service."
Any thoughts please?
Regards
|
|
|
|
|
So what does it say in the Eventlog?
|
|
|
|
|
User Logoff:
User Name: userTest
Domain: domainName
Logon ID: (0x0,0x7493371)
Logon Type: 5
|
|
|
|
|
Nope, not that, look for an exception caused by the service. Or even better, attach a debugger and see what happens.
|
|
|
|
|
Hi,
There is no exception.
|
|
|
|