unit2.cpp~
来自「线程调用参数然后输出,参数使用来控制计算的输出」· CPP~ 代码 · 共 57 行
CPP~
57 行
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "spmdll.h"
#include "Unit1.h"
#include "Unit2.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
// Important: Methods and properties of objects in VCL can only be
// used in a method called using Synchronize, for example:
//
// Synchronize(UpdateCaption);
//
// where UpdateCaption could look like:
//
// void __fastcall th1::UpdateCaption()
// {
// Form1->Caption = "Updated in a thread";
// }
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
__fastcall th1::th1(bool CreateSuspended)
: TThread(CreateSuspended)
{
FreeOnTerminate = false;
Resume();
//Priority=tpTimeCritical; //最高优先级别
}
//---------------------------------------------------------------------------
void __fastcall th1::Execute(void)
{
//---- Place thread code here ----
// Form1->Button2->Click();
//double m_spectrum[3648], WL[3648];
while(!Terminated)
{
Form1->Button2->Click();
//DoScan();
//getSpectrum(m_spectrum);
//getWavelengths(WL);
//DrawCordinate();
//DrawSpectrum();
}
Form1->BitBtn1->Enabled = true;
Form1->Button2->Enabled = false;
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?