1
Answer

small web service

Photo of dc

dc

12y
980
1
At my company I am told that I need to setup a web service with an 'xsd' file I will be receiving tomorrow morning. I have a visual studio.net 2010 professional version development software to work with and I have experience using C# 2010.

Since I have not setup a web service before, I am wondering how to setup the web service from scratch? All I want to do is have the web service that only works with the *.xsd file.

Thus can you tell me and/or point me to a reference on how to setup this web service?

Answers (1)

0
Photo of Kirtan Patel
NA 35k 2.8m 15y
sorry Dear there are some Correction in code


try below code now it will work


private void button1_Click(object sender, EventArgs e)

        {

            Form2 f2 = new Form2();

            f2.MdiParent= this;

            f2.StartPosition = FormStartPosition.CenterScreen;

            f2.Show();

        }


Accepted
0
Photo of Kirtan Patel
NA 35k 2.8m 15y
Hi


Make MDIFroms
KeyPreview Property to True

then  here Is Code For key press Event of MDI Form Now it will Open Form2 When i Press ' A' From keyboard ( Shift+A) key

  private void Form1_KeyPress(object sender, KeyPressEventArgs e)

        {


            if (e.KeyChar == (char)(65))

            {

                Form2 f2 = new Form2();

                f2.MdiParent = this;

                f2.StartPosition = FormStartPosition.CenterScreen;

                f2.Show();

            }

        }


0
Photo of garuka
NA 26 0 15y

Hi Kirtan,
Sweet. It's working. I think issue No1 is solved now.

But any idea about issue two? Do I have to handle this in from level instead of MDI level?
0
Photo of garuka
NA 26 0 15y

Hi Kirtan,
There is a problem in that approach which I already tried. The problem is related to part 1. My Login form loads when the MDI is loading. So when I add that code segment I get the error "Top-level control cannot be added to a control."

About the second part..the problem that child window is loaded from MDI window. the MDI should listern to key board and load the window in the middle of currently focused form inside MDI.

So I'm sorry I don't think that suggestion will work.
0
Photo of Kirtan Patel
NA 35k 2.8m 15y
Hi Garuka ,

here is solution for your Problem



you can Do it By Both Way By Code  and Setting Property

 Just Setting StartPositon Propety of Form  to "CenterScreen" of Which you trying to show in MDI form


or By Coding You can do it Like below Code


private void button1_Click(object sender, EventArgs e)

        {

            Form2 f2 = new Form2();

            f2.Parent = this;

            f2.StartPosition = FormStartPosition.CenterScreen;

            f2.Show();

        }