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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. using Timer in VC++

using Timer in VC++

Scheduled Pinned Locked Moved C / C++ / MFC
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kiethnt
    wrote on last edited by
    #1

    Dear all, In my project I woyld like to send data step by step, so now I want to put timer in this source to delay for each step, for example: send data 1 delay 2 seconds thend send data 2 delay 2seconds ... Anyone who have experence with timer in VC+ please help me solve this problem. Many thak for your help. As below is my source code: void DlgComputing::OnButtonSendtorobot() { int rowData, rowOutput; int tmpi[3]; rowData = m_grid2.GetRow(); for (int i=1; i<= rowData; i++) { // Get Data from Grid1 for (int j=5;j < 8; j++) { m_grid2.SetRow(i); m_grid2.SetCol(j); CString tmp = m_grid2.GetText(); tmpi[j-5] = atoi(tmp); } SendtoKuka (tmpi[0],tmpi[1],tmpi[2],m_iA,m_iB,m_iC); } SendtoKuka(0, 0, 0, 0, 0, 0);

    W T 2 Replies Last reply
    0
    • K Kiethnt

      Dear all, In my project I woyld like to send data step by step, so now I want to put timer in this source to delay for each step, for example: send data 1 delay 2 seconds thend send data 2 delay 2seconds ... Anyone who have experence with timer in VC+ please help me solve this problem. Many thak for your help. As below is my source code: void DlgComputing::OnButtonSendtorobot() { int rowData, rowOutput; int tmpi[3]; rowData = m_grid2.GetRow(); for (int i=1; i<= rowData; i++) { // Get Data from Grid1 for (int j=5;j < 8; j++) { m_grid2.SetRow(i); m_grid2.SetCol(j); CString tmp = m_grid2.GetText(); tmpi[j-5] = atoi(tmp); } SendtoKuka (tmpi[0],tmpi[1],tmpi[2],m_iA,m_iB,m_iC); } SendtoKuka(0, 0, 0, 0, 0, 0);

      W Offline
      W Offline
      William Wang
      wrote on last edited by
      #2

      WinAPI Sleep(...) could give u help on delaying 2 seconds.

      life is like a box of chocolate,you never know what you r going to get.

      1 Reply Last reply
      0
      • K Kiethnt

        Dear all, In my project I woyld like to send data step by step, so now I want to put timer in this source to delay for each step, for example: send data 1 delay 2 seconds thend send data 2 delay 2seconds ... Anyone who have experence with timer in VC+ please help me solve this problem. Many thak for your help. As below is my source code: void DlgComputing::OnButtonSendtorobot() { int rowData, rowOutput; int tmpi[3]; rowData = m_grid2.GetRow(); for (int i=1; i<= rowData; i++) { // Get Data from Grid1 for (int j=5;j < 8; j++) { m_grid2.SetRow(i); m_grid2.SetCol(j); CString tmp = m_grid2.GetText(); tmpi[j-5] = atoi(tmp); } SendtoKuka (tmpi[0],tmpi[1],tmpi[2],m_iA,m_iB,m_iC); } SendtoKuka(0, 0, 0, 0, 0, 0);

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        WaitForSingleObject !

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

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