当前位置:网站首页>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);
}
边栏推荐
- P3D gauge size problem
- Interview catalogue
- Communication standard -- communication protocol
- [untitled] record the visual shock of the Winter Olympics and the introduction of the display screen
- Numpy——1. Creation of array
- Markdown tips
- UEFI development learning 4 - getting to know variable services
- Altium designer 19.1.18 - Import frame
- [popular science] some interesting things that I don't know whether they are useful or not
- Global and Chinese market of peeled bourdon tubes 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
Altium Designer 19.1.18 - 隐藏某一个网络的飞线
Numpy——1.數組的創建
The printer encountered an abnormal configuration problem 0x8007007e (win10)
Altium designer learning (I)
P3D gauge size problem
Shell script basic syntax
UEFI development learning 2 - running ovmf in QEMU
研究發現,跨境電商客服系統都有這五點功能!
Programming knowledge -- assembly knowledge
Process communication mode between different hosts -- socket
随机推荐
Cadence learning records
The sublime version that XP can run is 3114
IC software learning
solver. Learning notes of prototxt file parameters
Programming knowledge -- assembly knowledge
1089 insert or merge, including test point 5
RF ride side door processing of prompt box
[popular science] some interesting things that I don't know whether they are useful or not
Connection mode - bridge and net
Train your dataset with yolov4
Package ‘*****‘ has no installation candidate
mysql 盲注常见函数
Record the visual shock of the Winter Olympics and the introduction of the screen 2
Altium Designer 19.1.18 - 导入板框
通过sql语句统计特定字段出现次数并排序
Consul installation
Programming knowledge -- basis of C language
MySql——存储引擎
Practical application cases of digital Twins - fans
assert_ Usage of param function