Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

levis

@levis
About
Posts
16
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MODBUS TCP
    L levis

    What kind of question is that? Can you be more precise in your questions? I will have to ban you if you continue to post such questions! Thanks for your cooperation. I have reviewed your profiles and discover you have various identities and post questions which are irrelevent and i might say is stupid. So i ask of you to stop posting such questions. Veerasamy S/O Muthu-- Chief System Analyser World Informatics

    C / C++ / MFC sysadmin tutorial question

  • char [ ] to float?
    L levis

    hi all!i have a code like this.The port.Read(4) mean that i read 4 bytes from serial port..i had convert from byte [] to char [] and now i want to convert from char [] to float? mean that my final answer must be in float type.How can i do it?Thanks! private char [] Read_Data = new char[4]; { Read_Data = Encoding.ASCII.GetChars(port.Read(4)); }

    C# question

  • [Message Deleted]
    L levis

    [Message Deleted]

    C#

  • Timer
    L levis

    the 1st line mean assign the time(second) in the my computer to float time and the 2nd mean add point to the graph with X-axis is time and Y-axis is power..So basically this AddPoint is add the point to the point to the graph

    C# question

  • Timer
    L levis

    Actually this timer is act like a stop watch in my program..So when everytime i press start button it will start run from 0 seconds until i press stop button to stop it.Now the problem is when i press the start button it start according to my computer time(second). float time =(float)DateTime.Now.Second ; xyGraphControl1.AddPoint(time, power); long StartClock; private void StartButton_Click(objectsender,System.EventArgse) { timer1.Start(); // get the exact hour started in milliseconds StartClock = DateTime.Now.Ticks; xyGraphControl1.Reset(); } Thank very much!

    C# question

  • Timer
    L levis

    Hi all!I have these two lines of codes in my program: float time = (float)DateTime.Now.Second; xyGraphControl1.AddPoint(time,power); The result of the codes is that the timer starts at the same second as the clock in my computer. How am I going to force the timer to always and only start at 0 second? Thank you very much!

    C# question

  • How to call to MAIN
    L levis

    Hi all!i am using microsoft visual studio.net 2003.i have create a class for communication with serial port via RS-232.It contains read and write function.i run this in the console application.Class 1 is all the function and class 2 is my MAIN.i use Main to call the read and write function.Can someone please please help me how i can read unlimited bytes?How to call the Public MemoryStream Read(int bufSize) to my MAIN?I try it so many time but still fail to do it..Please please help me..Thanks a lot! This is my Class 1 using System; using System.Runtime.InteropServices; using System.IO; using System.Text; using System.Globalization; using System.Threading; namespace yong { public class port { /*-- Definition of variables by Programmer --*/ /*-- Setting win32 API constants --*/ private const uint GENERIC_READ = 0x80000000; private const uint GENERIC_WRITE = 0x40000000; private const int CREATE_ALWAYS = 2; private const int INVALID_HANDLE_VALUE = -1; /*-- End ofSetting win32 API constants --*/ public int PortNum = 1; //-------------Delaring of Port number to 1 public int BaudRate = 9600; //---------Set BaudRate to 9600 public byte ByteSize = 8; //-----------Set ByteSize to 8 public byte Parity = 0; //-------------0-4 = no,odd,even,mark,space public byte StopBits = 0; //-----------0,1,2 = 1, 1.5, 2 public int ReadTimeout = 1500; //------Set TimeOut to 1500 private int hComm = -1; //-------------Declaring of comm port win32 file handle public bool Opened = false; //---------Declaring of Opened and set to false /*-- End of Definition of variables by Programmer --*/ [StructLayout(LayoutKind.Sequential)] public struct DCB { /*-- taken from c struct in platform sdk --*/ public int DCBlength; //-----------Sizeof(DCB) public int BaudRate; //------------Current baud rate public uint flags; //--------------Flags public ushort wReserved; //--------Not currently used public ushort XonLim; //-----------Transmit XON threshold public ushort XoffLim; //----------Transmit XOFF threshold public byte ByteSize; //-----------Number of bits/byte, 4-8 public byte Parity; //-------------0-4 = no,odd,even,mark,space public byte StopBits; //-----------0,1,2 = 1, 1.5, 2 public char XonChar; //------------Tx and Rx XON character public char XoffChar; //-----------Tx and Rx XOFF character public char ErrorChar; //----------Error replacement character public char EofChar; //------------End o

    C# csharp help visual-studio json tutorial

  • read more bytes
    L levis

    Hi!Thanks!This code no problem but how am i going to call it to my Main,please?Thanks again!

    C# help data-structures question

  • read more bytes
    L levis

    Hi all!i have a read function here.I face a problem,it just can read limited byte only..Can somebody help me?Where to edit to make it read more bytes?Thank so much! public byte[] Read(int NumBytes) { byte[] BufBytes; //------Declaring of dynamic Array byte[] OutBytes; //------Declaring of dynamic Array BufBytes = new byte[NumBytes]; //------Setting the Array Size to NumBytes( From parameter ) /*-- Check Port is Open --*/ if( hComm != INVALID_HANDLE_VALUE ) { OVERLAPPED ovlCommPort = new OVERLAPPED(); //------Declaring of ovlCommport int BytesRead = 0; //------Declaring of BytesRead and set to 0 ReadFile(hComm, BufBytes, NumBytes, ref BytesRead, ref ovlCommPort); //------Get data from RS232 OutBytes = new byte[BytesRead];//------Setting the size of Array to BytesRead Array.Copy(BufBytes, OutBytes, BytesRead); //------Copy previous array data to new array data for preventing data loss return OutBytes; //------Return the GET data }/*-- End of Check Port is Open --*/ return null; //------Return null( nothing ) }/*-- End of Function Read --*/

    C# help data-structures question

  • ActiveX Control
    L levis

    Hi!i have no idea how to write the classes.May you show me how to write the classes?thanks in advance!

    C# com tutorial question lounge

  • ActiveX Control
    L levis

    Hi all!How to capture data from a device and at the same time plot a line chat..Is that i must use ActiveX Control?Any suggestion for me.Thanks!

    C# com tutorial question lounge

  • radio button
    L levis

    code for how to make the OK button function,mean when i select any of the radio button and i click the Ok button.it will send the value(value for the radio button) out.Thanks!

    C#

  • radio button
    L levis

    hi all!i have a form which has a group box and inside the group box have five radio buttons(one is selected by default).At the same time it also have a "OK" button at the form.So when i click on "Ok" button it will sent the value out..Does anybody can provide my some guideline or code..Thanks in advance!

    C#

  • read and write at the same time
    L levis

    ok thanks!i will try to do it!

    C# data-structures tutorial question

  • read and write at the same time
    L levis

    thanks for your advice..i think using thread is better...may you help me to edit my source code using thread?i am just a very new beginner in c#..I need your help a lot.Thank so much!

    C# data-structures tutorial question

  • read and write at the same time
    L levis

    I am not so familliar with threads methods.May you try to edit for me?thank a lot!How about i use While loop and at the same time inside the While loop contain a if-else loop?

    C# data-structures tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups