AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Forms - drawing order of definiton of "staticpicture"?

4 REPLIES 4
Reply
Message 1 of 5
Peter2_1
702 Views, 4 Replies

Forms - drawing order of definiton of "staticpicture"?

(Started here: https://forums.autodesk.com/t5/autocad-map-3d-forum/forms-drawing-order-of-staticpicture/td-p/118537...

but continued here ..)

Oracle, Industry Model (but maybe the same in FDO ..)

-----------------

I want to add two static overlapping images to my forms, and I want to place one image "above" the other - a kind of drawing order.

How can I define the "draw order" of static images?

AutoCAD Map 3D 2023 German / Oracle
4 REPLIES 4
Message 2 of 5
fieldguy
in reply to: Peter2_1

this works using pictureboxes and their image sources. in some kind of event, you can change the picturebox image source.

i had to try it. it seems a bit cumbersome. my understanding is you can do this but you have to re-order all of the images yourself.

 public partial class Form1 : Form
    {
        private static Bitmap bmp1 = new Bitmap(@"C:\Users\user\Pictures\Screenshots\Screenshot 2023-03-26 051845.png");
        private static Bitmap bmp2 = new Bitmap(@"C:\Users\user\Pictures\Screenshots\Screenshot_20221130_060143.png");

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            pictureBox1.Image = bmp1;
            pictureBox2.Image = bmp2;
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            pictureBox2.Image = bmp1;
            pictureBox1.Image = bmp2;
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = bmp1;
            pictureBox2.Image = bmp2;
        }
    }

 

Message 3 of 5
Peter2_1
in reply to: fieldguy

Hi @fieldguy 

 

hmmm - where does this code come from? I initially posted this question in the user-forum because I use only the integrated "form-designer" to modify my forms. I have no idea about Map-api and C# and all that stuff ..

AutoCAD Map 3D 2023 German / Oracle
Message 4 of 5
fieldguy
in reply to: Peter2_1

i asked if you were programming with a windows form or user control. you are not! if you want to discuss programming issues this is the correct forum. the code i posted shows 1 way to order images in a windows form,

you're question is about the form designer in the "Infrastructure Administrator".

i have never used it but will have to try it now.

my apologies if you feel mislead.

Message 5 of 5
Peter2_1
in reply to: fieldguy


@fieldguy wrote:
..my apologies if you feel mislead.

No, no - my bad. My limited knowledge in programming and in English and the soft border between user and advanced user and programming cause some confusion ...

AutoCAD Map 3D 2023 German / Oracle

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report