Click here to Skip to main content
15,911,646 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: What is wrong with my loop - VB.net Pin
Ian Shlasko24-Aug-07 7:27
Ian Shlasko24-Aug-07 7:27 
GeneralRe: What is wrong with my loop - VB.net Pin
Smokeywade24-Aug-07 8:48
Smokeywade24-Aug-07 8:48 
QuestionUpdate data acces layer Pin
jesusnaun24-Aug-07 3:50
jesusnaun24-Aug-07 3:50 
AnswerRe: Update data acces layer Pin
Colin Angus Mackay24-Aug-07 5:10
Colin Angus Mackay24-Aug-07 5:10 
GeneralRe: Update data acces layer Pin
jesusnaun24-Aug-07 7:08
jesusnaun24-Aug-07 7:08 
GeneralRe: Update data acces layer Pin
Mark Churchill26-Aug-07 4:53
Mark Churchill26-Aug-07 4:53 
JokeRe: Update data acces layer Pin
Colin Angus Mackay26-Aug-07 5:39
Colin Angus Mackay26-Aug-07 5:39 
QuestionApplying CSS/JavaScript to a WebBrowser Control [modified] Pin
Nick Rioux24-Aug-07 2:43
Nick Rioux24-Aug-07 2:43 
Say I wanted to use CSS to change the background color of every page in my Web Browser control to blue (I know you can do this by setting the documents back color property, but that won't work with every stylesheet) and all the links' colors to green. How should I go about doing this?

I found two solutions on MSDN - one looked overly complicated and the other just didn't work. And they were both in C#Sigh | :sigh: .
My best guess was:
Private Sub wbBrowser_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles wbBrowser.DocumentCompleted

    With wbBrowser.Document

        Dim elmCSS As System.Windows.Forms.HtmlElement = .CreateElement("style")

        elmCSS.InnerText = _
        "body {background-color: blue;}" & vbNewLine & _
        "a:link {color: green;}" & vbNewLine

        .GetElementsByTagName("head").Item(0).AppendChild(x)

    End With
End Sub

or
Dim elmCSS As System.Windows.Forms.HtmlElement = .CreateElement("link")
elmCSS.SetAttribute("rel", "stylesheet")
elmCSS.SetAttribute("href", "Styles.css")

.GetElementsByTagName("head").Item(0).AppendChild(elmCSS)


Thanks in advance for any help.Big Grin | :-D


-- modified at 9:12 Friday 24th August, 2007


-- modified at 7:24 Saturday 25th August, 2007


Fluent in VB, Attempts to speak C#, Python, English Wink | ;)

---
File Association in VB.Net

Creating Custom Controls: Casino Royale

AnswerRe: Applying CSS/JavaScript to a WebBrowser Control Pin
Dave Kreskowiak24-Aug-07 5:42
mveDave Kreskowiak24-Aug-07 5:42 
AnswerRe: Applying CSS/JavaScript to a WebBrowser Control Pin
Nick Rioux25-Aug-07 2:41
Nick Rioux25-Aug-07 2:41 
Questionwebbrowser Search Function Pin
Ahmad Zaidi24-Aug-07 2:32
Ahmad Zaidi24-Aug-07 2:32 
AnswerRe: webbrowser Search Function Pin
Nick Rioux24-Aug-07 2:47
Nick Rioux24-Aug-07 2:47 
QuestionMultiple Subreports [modified] Pin
Saranya B24-Aug-07 1:24
Saranya B24-Aug-07 1:24 
QuestionCannot display a control on panel in this way... Pin
BooleanTrue24-Aug-07 0:10
professionalBooleanTrue24-Aug-07 0:10 
AnswerRe: Cannot display a control on panel in this way... Pin
Dave Kreskowiak24-Aug-07 1:53
mveDave Kreskowiak24-Aug-07 1:53 
GeneralRe: Cannot display a control on panel in this way... Pin
BooleanTrue24-Aug-07 3:12
professionalBooleanTrue24-Aug-07 3:12 
GeneralRe: Cannot display a control on panel in this way... Pin
Dave Kreskowiak24-Aug-07 5:38
mveDave Kreskowiak24-Aug-07 5:38 
QuestionProblem in Mobile Incoming call detected Pin
Nimesh U23-Aug-07 23:53
Nimesh U23-Aug-07 23:53 
AnswerRe: Problem in Mobile Incoming call detected Pin
Dave Kreskowiak24-Aug-07 1:54
mveDave Kreskowiak24-Aug-07 1:54 
AnswerRe: Problem in Mobile Incoming call detected Pin
Rupesh Kumar Swami24-Aug-07 2:13
Rupesh Kumar Swami24-Aug-07 2:13 
QuestionHelp needed for DataGridView Pin
Exelioindia23-Aug-07 23:30
Exelioindia23-Aug-07 23:30 
AnswerRe: Help needed for DataGridView Pin
Dave Kreskowiak24-Aug-07 6:01
mveDave Kreskowiak24-Aug-07 6:01 
QuestionOperation Was cancelled Error Pin
ShuklaGirish23-Aug-07 23:18
ShuklaGirish23-Aug-07 23:18 
AnswerRe: Operation Was cancelled Error Pin
BooleanTrue24-Aug-07 0:24
professionalBooleanTrue24-Aug-07 0:24 
GeneralRe: Operation Was cancelled Error Pin
ShuklaGirish24-Aug-07 1:51
ShuklaGirish24-Aug-07 1:51 

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.