Question

Vijayark on Tue, 27 Nov 2012 15:33:26


Hi All,

How to maintain the windows form Same State switching between Vistrual Desktop one and two With Out Minimize C#.Net

What is my problem is, I am switching the Desktop 1 to Desktop 2. My Window Form always minimizing.

I need to avoid Window Form minimizing switching between Vistrual Desktop one and two.

Please see the below image & Code and I am using the "SelectedIndexChanged" for switching the Desktops.

Please any can help on this request.

        private void DesktopListlistBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                VirtualDesktop[] desktops = _controller.GetVirtualDesktopArray();
                _desktop = desktops[DesktopListlistBox.SelectedIndex];
                _controller.ShowVirtualDesktop(_desktop);
	     }
	     catch
	     {
	      }
	}


Sponsored



Replies

Bob Shen on Wed, 28 Nov 2012 07:47:25


Hi Vijayark,

Could you tell us more information about the VirtualDesktop type please? It's hard to repro this problem based on above code.

Thanks.  

Vijayark on Wed, 28 Nov 2012 09:28:34


Hi Bob,

Please share your email id, I will share the code you.

You check out.

Bob Shen on Thu, 29 Nov 2012 03:23:22


Hi Vijayark,

You can consider upload your test sample to the SkyDrive and share it.

https://skydrive.live.com/

Thanks.

Bob Shen on Mon, 03 Dec 2012 04:51:26


Hi Vijayark,

I am writing to check the status of the issue on your side. 

What about this problem now?

Thanks.

Vijayark on Tue, 04 Dec 2012 07:49:29


Thanks Lot Bob.

I got solution. No need any assistance for this help.

Bob Shen on Wed, 05 Dec 2012 03:28:43


Hi Vijayark,

I'm glad to hear that you got it working. Could you share your solutions here please? If you can share your solutions here, it will be very beneficial for other community members who have similar questions.

Thanks.

Vijayark on Wed, 05 Dec 2012 11:07:05


Hi Bob,

 _config.AddDesktop(txt_EnterNewName.Text);
                        VirtualDesktop[] desktops = _controller.GetVirtualDesktopArray();
                        VirtualDesktop _desktop = desktops.First(vd => vd.VirtualDesktopName == txt_EnterNewName.Text);
                        _controller.ShowVirtualDesktop(_desktop,this.CallMethod.Handle);