Shell pulls up two windows

Discussion in 'Questions (Windows Mobile)' started by willisgt, Dec 12, 2007.

  1. willisgt

    willisgt Active Member Licensed User

    :sign0163:I've got a quick little snippet of code that's behaving oddly.

    Code:
    myArgs = "http://www.radtechs.org"

       
    Shell"explorer.exe", myArgs )
    It pulls up two Explorer windows when running on the desktop.

    I'm running Windows XP w/.Net 1.1 and 2.0, Basic4PPC v.5.8.

    Surely I'm not doing something wrong for once?

    Gary

    :sign0163:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Only one window here:
    Code:
    Sub App_Start
        Form1.Show
        myArgs = 
    "http://www.radtechs.org"
        
    Shell"explorer",myargs )
    End Sub
     
  3. agraham

    agraham Expert Licensed User

    Are you invoking it in an event - maybe the event is firing more than once. You can use a global variable as an event counter, increment it in the event and check it to see how many times the event is fired.
     
  4. willisgt

    willisgt Active Member Licensed User

    I was doing something wrong. Again.

    Solution:

    If a button is created dynamically, it does not need an event added to it to handle a click event.

    For instance, create a button called 'wubba'.

    Create a subroutine called wubba_Click.

    No need for an AddEvent for the click to be handled.

    Oops.

    Gary
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice