Results 1 to 4 of 4

Thread: Sizing a URL

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2015
    Posts
    2

    Sizing a URL

    How can I open a URL and size it to a specific size using just code. I'm using VS 2012.

    Thanks!

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,687

    Re: Sizing a URL

    If you're referring to the string's length then return the original string's SubString with desired:
    Code:
    url = url.SubString(0, <some length>)

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2015
    Posts
    2

    Re: Sizing a URL

    dday9,

    Maybe I should have been more specific. I'm using the following code (in this case google.com is just a example) to open up a website from vb 2012, but I want the webpage to open up half the size of a window. If it can't be done using my code, is there other code I should be using?

    Dim url As String = "www.google.com"
    Process.Start(url)

    Can anyone offer ideas?

    Thanks!

  4. #4
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,687

    Re: Sizing a URL

    Ok, so you do not want to size the URL string, rather you want to size a window that just so happens to be launched by a URL string. In this case take a look at the MoveWindow API. Because you're launching the process using System.Siagnostics.Process.Start, you can get the window's handle like this:
    Code:
    Dim p As Process = Process.Start("www.google.com")
    Dim windowHandle As IntPtr = p.Handle

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width