question

SindhuH-2474 avatar image
0 Votes"
SindhuH-2474 asked DanielZhang-MSFT commented

how to overlap one picture on another without getting hidden by any image?

122682-picture-2.png122657-picture1.png




Here I am using picture1.jpg on multiple places on the main image (Picture-2.jpg).
Since it can be noticed that the highlight white rim is hidden by another one.
Can somebody please help me found a solution for the same?


windows-forms
picture-2.png (7.6 KiB)
picture1.png (2.4 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SindhuH-2474,
>>Here I am using picture1.jpg on multiple places on the main image (Picture-2.jpg).
Which picture is Picture-2.jpg and picture1.jpg?
>>Since it can be noticed that the highlight white rim is hidden by another one.
Could you explain it in detail? And please provide some code to reproduce the situation.
Best Regards,
Daniel Zhang

0 Votes 0 ·

Please check my answer to my query.
I would be grateful.
Thank you

0 Votes 0 ·

1 Answer

SindhuH-2474 avatar image
0 Votes"
SindhuH-2474 answered DanielZhang-MSFT commented

123031-gif.gif


In my code, the blinking square prompts the user to select either of them.
I am facing difficulties in positioning these squares with respect to the main page.
The squares are being cut off from each other, and they are not in position like I want to code shown in the gif image.
Please find the code attached and the output that explains my problem.

122973-picture6.png




Please help me find a solution.

Thank you in advance


gif.gif (7.3 KiB)
picture6.png (91.5 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The blinking boxes are named by PictureOverlay1 and PictureOverlay2 , and the main background image is being named as PictureBox1

0 Votes 0 ·

Hi @SindhuH-2474,
>>I am facing difficulties in positioning these squares with respect to the main page.
The location property is always relative to the parent.
PictureOverlay1 and PictureOverlay2 correspond to different parents, so the relative coordinates should also be different.
And in your code, you cannot use double type(4.5) in Point(Int32, Int32).
I did a test with your code, and the following results will appear.
123365-816.png
Best Regards,
Daniel Zhang


0 Votes 0 ·
816.png (5.9 KiB)