当前位置:网站首页>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);
}边栏推荐
- Opendrive record
- Global and Chinese markets for medical oxygen machines 2022-2028: Research Report on technology, participants, trends, market size and share
- 1089 Insert or Merge 含测试点5
- L'étude a révélé que le système de service à la clientèle du commerce électronique transfrontalier a ces cinq fonctions!
- Batch modify the txt file code to UTF-8 (notepad++)
- Day09 how to create packages import package naming conventions Alibaba Development Manual
- 1-stm32 operation environment construction
- Extern keyword function
- Logistic regression: the most basic neural network
- Altium designer 19.1.18 - hide the fly line of a network
猜你喜欢

Shell脚本基本语法

软件设计师:03-数据库系统

C language enhancement -- pointer

L'étude a révélé que le système de service à la clientèle du commerce électronique transfrontalier a ces cinq fonctions!

Record the visual shock of the Winter Olympics and the introduction of the screen 2

Can't find real-time chat software? Recommend to you what e-commerce enterprises are using!

Connection mode - bridge and net

Train your dataset with yolov4

Improve lighting C program

导电滑环磨损快的原因
随机推荐
Package ‘*****‘ has no installation candidate
Record the visual shock of the Winter Olympics and the introduction of the screen 2
C language uses arrays to realize the intersection, union, difference and complement of sets
Cadence learning records
Summary of STM32 serial port sending and receiving data methods
RF ride side door processing of prompt box
From then on, I understand convolutional neural network (CNN)
Global and Chinese market of digital shore durometer 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets for waste treatment air switches 2022-2028: Research Report on technology, participants, trends, market size and share
Using C language to realize IIC driver in STM32 development
P3D gauge size problem
1089 insert or merge, including test point 5
[popular science] some interesting things that I don't know whether they are useful or not
Practical application cases of digital Twins - fans
Gradle composite construction
软件设计师:03-数据库系统
Global and Chinese markets of large aperture scintillators 2022-2028: Research Report on technology, participants, trends, market size and share
Improve lighting C program
[untitled] record the visual shock of the Winter Olympics and the introduction of the display screen
Programming knowledge -- basis of C language