Specify window location on open.

Posted on 2004-10-21
Last Modified: 2010-05-02
I am developing a program that is to run on a dual monitor system.  The program is to run full screen on the second monitor.  In the event of a system reset, the program will be in the system startup, and needs to load full screen on the second monitor.

The program has no title bar, toolbar, menu, status bar, scroll bars, minimize, restore, or close buttons.  A single click anywhere on the program will close it.  The sole purpose of the application is to display information from files created on other systems, or from a user operating on the primary monitor.

I cannot find any controls that will let me specify "load full screen on second monitor".  Any assistance you can give would be appreciated.
Question by:dangell

    Author Comment

    Application is written in VB.Net.  Sorry if this is posted in the wrong forum.

    Expert Comment

    I presume, you are using a form on which you are displaying the information you need to display.

    So, if this is correct, then say you have a form called Form1, then you can set the width and height of the form, to that of the screen like this:
    Form1.Width= Screen.Width

    You can also set the Form's border property, to None, so only the form and its controls will be displayed.

    Hope this helps.

    Expert Comment

    Another thing i forgot to mention, set these properties on Form's Load event.

    Author Comment

    Form opening i not a problem, opening full screen is not a problem.  Telling the program to open on the second monitor is the problem.
    LVL 76

    Expert Comment

    On my Windows 2000 system, this works

    Private Sub Form_Load()
    'Me.BorderStyle = 0
    Me.Height = Screen.Height
    Me.Left = Screen.Width '<----
    Me.Width = Screen.Width
    Me.Top = 0

    End Sub
    LVL 32

    Accepted Solution

    A good discussion here:

    Working with Multiple Monitors

    LVL 4

    Assisted Solution

    These URLs will certainly help you

    Use Multiple Monitors in Visual Basic:

    Multiple Monitor Programming Basics


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    934 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now