当前位置:网站首页>C WinForm [realize the previous and next selection pictures] - practice 7
C WinForm [realize the previous and next selection pictures] - practice 7
2022-07-05 07:55:00 【BoomBiuBiu】
In the process of traversing the picture , Sometimes we need to select a suitable picture in the document for application , This function is to adapt to this scenario .
1、 Double click the previous button
private void button2_Click(object sender, EventArgs e)
{
index--;
// Determine whether the array index has been found
if (index < 0)
{
index = path.Length - 1;
}
// Total number of pictures to be detected
toolStripStatusLabel2.Text = path.Length.ToString();
// Current number of pictures
toolStripStatusLabel4.Text = (index + 1).ToString();
// Read the picture
HOperatorSet.ReadImage(out ho_Image, path[index]);
HOperatorSet.DispObj(ho_Image, hv_WindowHandle);
}
2、 Double click the next button
private void button1_Click(object sender, EventArgs e)
{
index++;
// Determine whether the array index has been found
if (index > path.Length - 1)
{
index = 0;
}
// Total number of pictures to be detected
toolStripStatusLabel2.Text = path.Length.ToString();
toolStripStatusLabel4.Text = (index + 1).ToString();
// Read the picture
HOperatorSet.ReadImage(out ho_Image, path[index]);
HOperatorSet.DispObj(ho_Image, hv_WindowHandle);
}
边栏推荐
- Day01 markdown log entry tips
- Scm-05 basis of independent keyboard
- Global and Chinese markets for waste treatment air switches 2022-2028: Research Report on technology, participants, trends, market size and share
- Shell脚本基本语法
- P3D gauge size problem
- 如何进行导电滑环选型
- Package ‘*****‘ has no installation candidate
- ·Practical website·
- Global and Chinese markets for medical oxygen machines 2022-2028: Research Report on technology, participants, trends, market size and share
- Altium Designer 19.1.18 - 更改铺铜的透明度
猜你喜欢
Numpy——1.數組的創建
Altium Designer 19.1.18 - 更改铺铜的透明度
Could NOT find XXX (missing: XXX_LIBRARY XXX_DIR)
Numpy——1.数组的创建
Altium designer 19.1.18 - clear information generated by measuring distance
Oracle triggers and packages
Altium Designer 19.1.18 - 导入板框
研究發現,跨境電商客服系統都有這五點功能!
Connection mode - bridge and net
Practical application cases of digital Twins - fans
随机推荐
UEFI development learning series
通过sql语句统计特定字段出现次数并排序
How to realize audit trail in particle counter software
Cadence simulation encountered "input.scs": can not open input file change path problem
Threads and processes
Acwing - the collection of pet elves - (multidimensional 01 Backpack + positive and reverse order + two forms of DP for the answer)
Altium Designer 19.1.18 - 清除测量距离产生的信息
How to define guid in AMI code
Markdown tips
Network port usage
Screen record of the opening ceremony of the Beijing winter olympics 2
Global and Chinese markets for anesthesia, breathing and sleep apnea devices 2022-2028: Research Report on technology, participants, trends, market size and share
Significance and requirements of semiconductor particle control
Package ‘*****‘ has no installation candidate
生产中影响滑环质量的因素
研究發現,跨境電商客服系統都有這五點功能!
Can't find real-time chat software? Recommend to you what e-commerce enterprises are using!
1089 Insert or Merge 含测试点5
C language uses arrays to realize the intersection, union, difference and complement of sets
C language enhancement -- pointer