Results 1 to 2 of 2

Thread: Quick VBScript/Style question :)

  1. #1
    Hmmm bed
    Join Date
    Jul 2003
    Posts
    441
    Thanks
    5
    Thanked
    0 times in 0 posts

    Quick VBScript/Style question :)

    Right , I have made a nice logon script for the network I am creating at a school, it is shown below. All I really need to know is how to get teh IE windows displayed to have a background image instead of just the 'white' color as a background,

    cheers

    Code:
    Sub InitIE(strMsg)
    ' Subroutine to initialize the IE display box.
      Dim intWidth, intHeight, intWidthW, intHeightW
      Set objIE = CreateObject("InternetExplorer.Application")
      With objIE
        .ToolBar = False
        .FullScreen = false
        .StatusBar = False
        .Resizable = False
        .Navigate("about:blank")
        Do Until .readyState = 4
          Wscript.Sleep 100
        Loop
        With .document
          With .ParentWindow
            intWidth = .Screen.AvailWidth
            intHeight = .Screen.AvailHeight
            intWidthW = .Screen.AvailWidth * .57
            intHeightW = .Screen.AvailHeight * .25
            .resizeto intWidthW, intHeightW
            .moveto (intWidth - intWidthW)/2, (intHeight - intHeightW)/2
          End With
          .Write "<body> " & strMsg & " </body></html>" 
          With .ParentWindow.document.body
            .style.backgroundColor = "white"
            .scroll="no"
            .style.Font = "10pt 'Verdana'"
            .style.borderStyle = "outset"
            .style.borderWidth = "4px"
          End With
          .Title = strIETitle
          objIE.Visible = True
          Wscript.Sleep 100
          objShell.AppActivate strIETitle
        End With
      End With
    End Sub

  2. #2
    IBM
    IBM is offline
    there but for the grace of God, go I IBM's Avatar
    Join Date
    Dec 2003
    Location
    West London
    Posts
    4,187
    Thanks
    149
    Thanked
    244 times in 145 posts
    • IBM's system
      • Motherboard:
      • Asus P5K Deluxe
      • CPU:
      • Intel E6600 Core2Duo 2.40GHz
      • Memory:
      • 2x2GB kit (1GBx2), Ballistix 240-pin DIMM, DDR2 PC2-6400
      • Storage:
      • 150G WD SATA 10k RAPTOR, 500GB WD SATA Enterprise
      • Graphics card(s):
      • Leadtek NVIDIA GeForce PX8800GTS 640MB
      • PSU:
      • CORSAIR HX 620W MODULAR PSU
      • Case:
      • Antec P182 Black Case
      • Monitor(s):
      • Dell 2407WPF A04
      • Internet:
      • domestic zoom
    I'm guessing that .style.backgroundImg.Src = "where the image resides" isn't going to work....

    You could always cheat and build an image into the .Write "<body> " & strMsg & " </body></html>" line....

    Let me know how you get on....
    sig removed by Zak33

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Quick watercooling question
    By skattrd in forum PC Hardware and Components
    Replies: 4
    Last Post: 02-08-2004, 12:14 AM
  2. Quick Question
    By Musaki in forum PC Hardware and Components
    Replies: 3
    Last Post: 07-07-2004, 11:50 PM
  3. Quick Rammstein question
    By Steve in forum Consumer Electronics
    Replies: 6
    Last Post: 07-07-2004, 09:51 AM
  4. Quick question re: hpi check
    By Stu in forum Automotive
    Replies: 3
    Last Post: 21-01-2004, 06:53 PM
  5. 'quick' vb/access question :)
    By streetster in forum Software
    Replies: 2
    Last Post: 30-11-2003, 10:23 PM

Posting Permissions

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