KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

howto control multiple screens?

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Tue Jun 06, 2006 10:49 pm    Post subject: howto control multiple screens? Reply with quote

I have a task to create a program that will show some images on the screening system of a huge nightclub.

but, at the same time, the images are added during the evening and night, thus, I need to have the main screen (laptop) visible while kixforms is showing the images on the secondary windows.

can I control which screen is used with kf?

hmm...
think I answered my own question while asking it.

I need to retrieve the primaryscreen.screen and it's size.
then remove it from screen size.
this will give me the size of the extended desktop (secondary) monitor.
then, using the left value 1 larger than the primary width, will set the form show on the secondary...

right? :p

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Jun 07, 2006 12:42 am    Post subject: Reply with quote

k, answering myself again.
no, this is not possible.

primaryscreen does have the correct values.
but also the $system.screen has the primaryscreen values, not the combined total.

so, shawn, is there any change to get it there?
or a handle to additional screens?

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Jun 07, 2006 8:41 pm    Post subject: Reply with quote

so shawn...
is there screens collection available in .net?

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Jun 09, 2006 1:31 am    Post subject: Reply with quote

You still needing that screen collection ?
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Fri Jun 09, 2006 8:41 am    Post subject: Reply with quote

still.
the script will be in use today, and in that version, I will need to manually alter the settings.

but for later use, I need it :p

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Fri Jun 09, 2006 2:01 pm    Post subject: Reply with quote

k, here is an example with VB:
Code:

    Dim Index As Integer
    Dim UpperBound As Integer

    ' Gets an array of all the screens connected to the system.

    Dim Screens() As System.Windows.Forms.Screen = _
        System.Windows.Forms.Screen.AllScreens
    UpperBound = Screens.GetUpperBound(0)

    For Index = 0 To UpperBound

        ' For each screen, add the screen properties to a list box.

        ListBox1.Items.Add("Device Name: " + Screens(Index).DeviceName)
        ListBox1.Items.Add("Bounds: " + Screens(Index).Bounds.ToString())
        ListBox1.Items.Add("Type: " + Screens(Index).GetType().ToString())
        ListBox1.Items.Add("Working Area: " + Screens(Index).WorkingArea.ToString())
        ListBox1.Items.Add("Primary Screen: " + Screens(Index).Primary.ToString())

    Next

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Fri Jun 09, 2006 2:24 pm    Post subject: Reply with quote

and here is the source of running C# version:
Code:

using System;
using System.Windows.Forms;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int index;
            int upperBound;

            // Gets an array of all the screens connected to the system.

            Screen[] screens = Screen.AllScreens;
            upperBound = screens.GetUpperBound(0);

            for (index = 0; index <= upperBound; index++)
            {

                // For each screen, add the screen properties to a list box.

               Console.WriteLine("Device Name: " + screens[index].DeviceName);
               Console.WriteLine("Bounds: " + screens[index].Bounds.ToString());
               Console.WriteLine("Type: " + screens[index].GetType().ToString());
               Console.WriteLine("Working Area: " + screens[index].WorkingArea.ToString());
               Console.WriteLine("Primary Screen: " + screens[index].Primary.ToString());

            }

        }
    }
}

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group