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
A

Adnan Merter

@Adnan Merter
About
Posts
30
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Sleep less than 1 ms
    A Adnan Merter

    i found this and it works fine, there is no problem so far but i cant how to set the timer less time periods and the ms is accurate ms here?

    #include <windows.h>
    #include <process.h>
    #include <stdio.h>

    unsigned __stdcall TF(void* arg) {
    HANDLE timer=(HANDLE) arg;

    while (1) {
    WaitForSingleObject(timer,INFINITE);
    printf(".");
    }

    }

    int main(int argc, char* argv[]) {

    HANDLE timer = CreateWaitableTimer(
    0,
    false, // false=>will be automatically reset
    0); // name

    LARGE_INTEGER li;

    const int unitsPerSecond=10*1000*1000; // 100 nano seconds

    // Set the event the first time 2 seconds
    // after calling SetWaitableTimer

    li.QuadPart=-(2*unitsPerSecond);
    SetWaitableTimer(
    timer,
    &li,
    750, // Set the event every 750 milli Seconds
    0,
    0,
    false);

    _beginthreadex(0,0,TF,(void*) timer,0,0);

    // Wait forever,
    while (1) ;

    return 0;
    }

    --always comes daylight after night-----

    C / C++ / MFC css question career

  • Sleep less than 1 ms
    A Adnan Merter

    thanx for warning, what do you suggest? i need any kind of idea, i have to do this job whatever it costs :)

    --always comes daylight after night-----

    C / C++ / MFC css question career

  • Sleep less than 1 ms
    A Adnan Merter

    thanx tony i will try what you suggest if i cant do this (most probably :-D ), i will let you know.

    --always comes daylight after night-----

    C / C++ / MFC css question career

  • Sleep less than 1 ms
    A Adnan Merter

    you suggest me to keep my comp busy? it is not a stabil solution, i think :) i will try to connect an oscilator which creates particular frequency pulses. and write an event handler in my program which sends the motion code to output whenever the input is high is it possible? (i know it is dangerous, i can break my mainboard down :) )

    --always comes daylight after night-----

    C / C++ / MFC css question career

  • Sleep less than 1 ms
    A Adnan Merter

    thank you but, it is hard to input data to microcontroller instantly it is not user-frienly :) i need to run upto 8 motors at the same time and also, i am not good at programming pics i have to use computer

    --always comes daylight after night-----

    C / C++ / MFC css question career

  • Sleep less than 1 ms
    A Adnan Merter

    thanx i appriciate your answers

    --always comes daylight after night-----

    C / C++ / MFC css question career

  • Sleep less than 1 ms
    A Adnan Merter

    i am using win7 i just need to sleep my comp for a very short time

    --always comes daylight after night-----

    C / C++ / MFC css question career

  • Sleep less than 1 ms
    A Adnan Merter

    Hi everybody, i have been working on a step controller program, and i succeed to control, but i cant run the step motors as fast as i want i am using the Sleep(1) function in "windows.h" to delay next step, but it is still so slow i need something like Sleep(0.05) :-D , is there someone who can suggest me a method to do this job? thanx,

    --always comes daylight after night-----

    C / C++ / MFC css question career

  • threading problem
    A Adnan Merter

    because, the second form will start a process ,and the process can be stopped and the 2nd form will be closed if it is neccessary. as far as i know, there is no way else to stop a process but using threads. is there?

    --always comes daylight after night-----

    Managed C++/CLI help question debugging

  • threading problem
    A Adnan Merter

    i am working on a project which has two form. i want to run the second form in a different thread. and i declared my thread private: System::Threading::Thread^ MyThread; and this->myThread = (gcnew System::Threading::Thread( gcnew System::Threading::ThreadStart( &MyClass::MyFunction))); and i added" this->MyThread ->Start(); into button1_Click decleration and i include the form2 into my form1 header file and added my class codes under under the Form2's codes so far everything is ok, but when i debug my project form2 can open once and after i close Form2, it doesnt open again, when i tried to click the button an error occours "Thread is running or terminated" How can i run my thread again after i close it?

    --always comes daylight after night-----

    Managed C++/CLI help question debugging

  • common variables
    A Adnan Merter

    i am trying to create an application whis has one more forms and i have problem, how can i declare a variable, which can be reached and changed by different form controls(not the same time)? i mean one of forms change the value of variale and the other form reach it create a process dependent this variable.

    --always comes daylight after night-----

    Managed C++/CLI question help

  • shockwawe flash movie
    A Adnan Merter

    (OCX)i added a shockwawe flash object to my form but still i cant display my animation. how i can use this object?

    --always comes daylight after night-----

    Managed C++/CLI adobe help question

  • shockwawe flash movie
    A Adnan Merter

    hi everybody, i've been trying to display one of my flash animation on a windows form, but i havent succeed so far. can someone help me?

    --always comes daylight after night-----

    Managed C++/CLI adobe help question

  • windows 98
    A Adnan Merter

    Can i install the .NET framework to Windows98/ME?

    --------Don't forget-------------------- --always comes daylight after night-----

    System Admin csharp dotnet question

  • capturing keyboard inputs
    A Adnan Merter

    i got my answer it is helpfull thanx...

    --we were great,and we will rise again-- --------Don't forget-------------------- --always comes daylight after night-----

    C / C++ / MFC question

  • capturing keyboard inputs
    A Adnan Merter

    i would like to create a windows form application which captures the keyboard inputs. Can someone tell me the best and easiest method? thanks...

    C / C++ / MFC question

  • background worker
    A Adnan Merter

    i need to create a function that can stop a process which takes long time. i mean the user can stop the process while it is processing(just like a cancel buton). can i do this by using "backgroung worker"? i found some example code and information in C# but i couldnt in C++. do i have to use multithreading?

    C / C++ / MFC csharp c++ tutorial question

  • CANCEL BUTTON
    A Adnan Merter

    i need help about stopping the process the prcess is driving a stepper motor i mean the button must stop all actions while my program sending data to parallel port, just like an emergency "stop button" or "cancel button in install application" thanks

    C / C++ / MFC question

  • CANCEL BUTTON
    A Adnan Merter

    I need to add a button to my form which stops the process, just like cancel button in install applications. which way do i have to use? please somei-one hel me!!!

    C / C++ / MFC question

  • copying textbox information
    A Adnan Merter

    no i am using CLR

    C / C++ / MFC c++ data-structures help 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