Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
QuestionHow to use session ?? Pin
lsh486love11-May-09 21:23
lsh486love11-May-09 21:23 
Questiongetting directory list in creation date order Pin
JacquesBrits11-May-09 21:14
JacquesBrits11-May-09 21:14 
AnswerRe: getting directory list in creation date order Pin
tim_gunning12-May-09 1:14
tim_gunning12-May-09 1:14 
Questionconvert postscript to pdf Pin
tauras8111-May-09 20:57
tauras8111-May-09 20:57 
AnswerRe: convert postscript to pdf Pin
LesF23-Nov-09 22:32
LesF23-Nov-09 22:32 
Questioncalender Pin
smithasuryanarayanan11-May-09 20:42
smithasuryanarayanan11-May-09 20:42 
AnswerRe: calender Pin
Henry Minute11-May-09 21:06
Henry Minute11-May-09 21:06 
Questionhow to receive a frame in Serial port by FiFo buffer Pin
hamed_farasat11-May-09 20:16
hamed_farasat11-May-09 20:16 
I have a joystick.I write this code to control my device.but my application has delay after several minute of begin
my receive code:
     private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
      {

            int count = serialPort1.BytesToRead;
            byte[] receive = new byte[count];
            serialPort1.Read(receive, 0, count);

                foreach (byte data in receive)
                {



                    receivedbyte.Enqueue(data);

                }

           try
           {
              ReceiveFrameThread.Resume();
           }
}

<here is processframe code:>
        void FrameMaker()<br />
        {<br />
            <br />
          <br />
               while (permission)<br />
                {<br />
                    bool stop = false;<br />
                    byte[] tempX = new byte[7];<br />
                    try<br />
                    {<br />
                       <br />
                        do<br />
                        {<br />
                            lock (receivedbyte.SyncRoot)<br />
                            {<br />
<br />
                                if (receivedbyte.Count > 7 && !stop)<br />
                                {<br />
                                    tempX[0] = (byte)receivedbyte.Dequeue();<br />
<br />
                                }<br />
                            }<br />
                        } while (tempX[0] != 0xfe);<br />
                        lock (receivedbyte.SyncRoot)<br />
                        {<br />
<br />
                            for (byte i = 1; i <= 6; i++)<br />
                            {<br />
                                if (receivedbyte.Count > 0)<br />
                                    tempX[i] = (byte)receivedbyte.Dequeue();<br />
<br />
                            }<br />
                        }<br />
                        if (permission)<br />
                            ReceiveFrameThread.Suspend();<br />
                    }<br />
                    catch (Exception ex)<br />
                    {<br />
                        MessageBox.Show(ex.Message);<br />
<br />
                    }<br />
                    FrameProcess(tempX);<br />
                }<br />
           <br />
        }<br />

<start code is>:
void Start()
{
serialPort1.Open();
ReceiveFrameThread = new Thread(new ThreadStart(FrameMaker));
permission = true;
ReceiveFrameThread.Start();


}


&



<big>plz say to me how to dicrease this delay
QuestionAdding Authentication in C# client for gSOAP C++ webservices........ Pin
King Julien11-May-09 19:46
King Julien11-May-09 19:46 
QuestionDataGridView CellPainting (some cells only) Pin
John Jak11-May-09 19:36
John Jak11-May-09 19:36 
QuestionHow can I get the reference of PDF file opened in Internet Explorer using c#? Pin
svt gdwl11-May-09 19:26
svt gdwl11-May-09 19:26 
Questionpassing parameters between two application Pin
imannasr8811-May-09 19:23
imannasr8811-May-09 19:23 
AnswerRe: passing parameters between two application Pin
dan!sh 11-May-09 19:36
professional dan!sh 11-May-09 19:36 
GeneralRe: passing parameters between two application Pin
imannasr8812-May-09 0:35
imannasr8812-May-09 0:35 
QuestionGet time zones in windows mobile Pin
vijaywithu11-May-09 19:08
vijaywithu11-May-09 19:08 
Questionhow to nudge a picture in excel sheet using c# Pin
tofa11111-May-09 18:14
tofa11111-May-09 18:14 
AnswerRe: how to nudge a picture in excel sheet using c# Pin
dan!sh 11-May-09 18:22
professional dan!sh 11-May-09 18:22 
GeneralRe: how to nudge a picture in excel sheet using c# Pin
tofa11111-May-09 18:28
tofa11111-May-09 18:28 
GeneralRe: how to nudge a picture in excel sheet using c# Pin
dan!sh 11-May-09 18:51
professional dan!sh 11-May-09 18:51 
AnswerRe: how to nudge a picture in excel sheet using c# Pin
tofa11111-May-09 20:23
tofa11111-May-09 20:23 
QuestionRelated to mobile Pin
Ch.Gayatri Subudhi11-May-09 18:10
Ch.Gayatri Subudhi11-May-09 18:10 
AnswerRe: Related to mobile Pin
dan!sh 11-May-09 18:32
professional dan!sh 11-May-09 18:32 
AnswerRe: Related to mobile Pin
Dave Kreskowiak11-May-09 19:07
mveDave Kreskowiak11-May-09 19:07 
GeneralRe: Related to mobile Pin
Ch.Gayatri Subudhi11-May-09 19:15
Ch.Gayatri Subudhi11-May-09 19:15 
AnswerRe: Related to mobile Pin
Rajesh Anuhya11-May-09 19:26
professionalRajesh Anuhya11-May-09 19:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.