Click here to Skip to main content
15,884,177 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionData Flow between a web server and a computer Pin
Tarik Guney23-Jul-07 12:12
Tarik Guney23-Jul-07 12:12 
AnswerRe: Data Flow between a web server and a computer Pin
Paul Conrad23-Jul-07 15:20
professionalPaul Conrad23-Jul-07 15:20 
GeneralRe: Data Flow between a web server and a computer Pin
Tarik Guney23-Jul-07 22:39
Tarik Guney23-Jul-07 22:39 
QuestionDisplaying a Form in a specific monitor Pin
Leslie Sanford23-Jul-07 10:21
Leslie Sanford23-Jul-07 10:21 
AnswerRe: Displaying a Form in a specific monitor Pin
Luc Pattyn23-Jul-07 11:18
sitebuilderLuc Pattyn23-Jul-07 11:18 
GeneralRe: Displaying a Form in a specific monitor Pin
Leslie Sanford23-Jul-07 12:56
Leslie Sanford23-Jul-07 12:56 
GeneralRe: Displaying a Form in a specific monitor Pin
Luc Pattyn23-Jul-07 13:28
sitebuilderLuc Pattyn23-Jul-07 13:28 
GeneralRe: Displaying a Form in a specific monitor Pin
Leslie Sanford25-Jul-07 17:28
Leslie Sanford25-Jul-07 17:28 
I've had some luck with this issue. Here a couple of code snippets:

protected override void OnLoad(EventArgs e)
{
    foreach(Screen s in Screen.AllScreens)
    {
        if(s.Primary)
        {
            Debug.Assert(primaryScreen == null);

            primaryScreen = s;
        }
        else
        {
            secondaryScreens.Add(s);
        }
    }

    Debug.Assert(primaryScreen != null);

    base.OnLoad(e);
}


This is in the main form. It goes through all of the "Screens" available on the desktop, storing the secondary screens in a collection.

if(video != null)
{
    video.Dispose();
    video = null;
}

video = new Video(openFileDialog1.FileName);

video.Owner = videoForm;

if(secondaryScreens.Count > 0)
{
    videoForm.Bounds = secondaryScreens[0].Bounds;
    video.Fullscreen = true;
}

videoForm.Show();


The above is from a method that handles opening a dialog box and letting the user choose which video to play. If there are any secondary monitors available, the first one is chosen and the video will display in a Form set up to display in the second monitor in full screen mode.

The code was written quickly and could use some improvement. I was just anxious to get something working as a proof of concept. Fortunately, it works. As far as blacking out the secondary monitor, that's easy enough by making the videoForm's background color black.

So far so good. The only problem with the above is that it requires that the secondary monitor be part of the virtual desktop. There may be situations in which I need to display a video on a device not part of the desktop. Oh well. A little bit of progress at a time...
GeneralRe: Displaying a Form in a specific monitor Pin
Paul Conrad25-Jul-07 17:49
professionalPaul Conrad25-Jul-07 17:49 
QuestionC# Winforms DataGridView control in User Control Pin
ADSolArch22-Jul-07 23:08
ADSolArch22-Jul-07 23:08 
QuestionGet window handle from mouse, outside form Pin
Genbox22-Jul-07 4:10
Genbox22-Jul-07 4:10 
QuestionAdding a row with combobox control to a datagrid / datagridview Pin
atulagarwal5620-Jul-07 0:01
atulagarwal5620-Jul-07 0:01 
QuestionGrid Box Control With Check Box Where is it? Pin
ozzyrocsdbn18-Jul-07 3:15
ozzyrocsdbn18-Jul-07 3:15 
AnswerRe: Grid Box Control With Check Box Where is it? Pin
Naji El Kotob18-Jul-07 23:31
Naji El Kotob18-Jul-07 23:31 
QuestionDataGrid Pin
Taras61117-Jul-07 10:23
Taras61117-Jul-07 10:23 
Questioninstallshield Pin
ellllllllie17-Jul-07 1:51
ellllllllie17-Jul-07 1:51 
AnswerRe: installshield Pin
ekynox17-Jul-07 20:02
ekynox17-Jul-07 20:02 
QuestionShortcut Keys to Toolbar Pin
Arunacss17-Jul-07 0:25
Arunacss17-Jul-07 0:25 
AnswerRe: Shortcut Keys to Toolbar Pin
Luc Pattyn18-Jul-07 8:03
sitebuilderLuc Pattyn18-Jul-07 8:03 
QuestionMerging DirectX Pin
Rakesh.Barabari16-Jul-07 20:39
Rakesh.Barabari16-Jul-07 20:39 
QuestionThe Basics - How do I create Arrays? Pin
Digital_Scapegoat16-Jul-07 16:55
Digital_Scapegoat16-Jul-07 16:55 
AnswerRe: The Basics - How do I create Arrays? Pin
Dave Kreskowiak16-Jul-07 17:03
mveDave Kreskowiak16-Jul-07 17:03 
AnswerRe: The Basics - How do I create Arrays? Pin
Brady Kelly17-Jul-07 2:36
Brady Kelly17-Jul-07 2:36 
JokeRe: The Basics - How do I create Arrays? Pin
WillemM18-Jul-07 7:38
WillemM18-Jul-07 7:38 
GeneralRe: The Basics - How do I create Arrays? Pin
Dave Kreskowiak18-Jul-07 7:44
mveDave Kreskowiak18-Jul-07 7:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.