Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
GeneralRe: events between two threads Pin
Pete O'Hanlon5-Dec-10 9:55
mvePete O'Hanlon5-Dec-10 9:55 
AnswerRe: events between two threads Pin
PIEBALDconsult5-Dec-10 13:48
mvePIEBALDconsult5-Dec-10 13:48 
Questionhow make textbox or masked textbox take month and year only such as "mm/yyyy" Pin
Nabawoka5-Dec-10 5:43
Nabawoka5-Dec-10 5:43 
AnswerRe: how make textbox or masked textbox take month and year only such as "mm/yyyy" Pin
OriginalGriff5-Dec-10 6:11
mveOriginalGriff5-Dec-10 6:11 
AnswerRe: how make textbox or masked textbox take month and year only such as "mm/yyyy" Pin
Manfred Rudolf Bihy5-Dec-10 6:14
professionalManfred Rudolf Bihy5-Dec-10 6:14 
AnswerRe: how make textbox or masked textbox take month and year only such as "mm/yyyy" Pin
Nabawoka5-Dec-10 11:06
Nabawoka5-Dec-10 11:06 
AnswerRe: how make textbox or masked textbox take month and year only such as "mm/yyyy" Pin
Eddy Vluggen5-Dec-10 12:01
professionalEddy Vluggen5-Dec-10 12:01 
QuestionWeb Browser Tab Control problem Pin
nawoc5-Dec-10 5:06
nawoc5-Dec-10 5:06 
I'm trying to make a simple web browser with tab support and am having difficulty with getting pages to load in the right tabs.
I can make new windows and tabs and switch between them, however the web page typed in the address bar always loads in tab 0. I've never really used tab controls before and I'm kind of learning as I go.

I think I need somehow to almost dynamically name each new instance of webBrowser so they can be accessed individually but I don't know how to go about something like that.

Here's what I've got so far

private void toolStripTextBox1_KeyPress(object sender, KeyPressEventArgs e)<br />
        {<br />
            if (e.KeyChar == 13)<br />
            {<br />
                int currentTab = tabControl1.SelectedIndex;<br />
                MessageBox.Show(currentTab.ToString());<br />
               // tabControl1.SelectedTab.<br />
                webBrowser1.Navigate(toolStripTextBox1.Text);<br />
                // Identify selected tab from tabControl1 and use this <br />
                // to load the requested URL in the current tab's web browser<br />
            }<br />
        }<br />
<br />
        private void Form1_Load(object sender, EventArgs e)<br />
        {<br />
            webBrowser1.Navigate("http://www.google.co.uk");<br />
        }<br />
<br />
        private void newWindowToolStripMenuItem_Click(object sender, EventArgs e)<br />
        {<br />
            Form nextWindow = new Form1();<br />
            nextWindow.Show();<br />
        }<br />
<br />
        private void newTabToolStripMenuItem_Click(object sender, EventArgs e)<br />
        {<br />
            TabPage nextTab = new TabPage("Google");<br />
            tabControl1.TabPages.Add(nextTab);<br />
            tabControl1.SelectedTab = nextTab;<br />
            WebBrowser webBrowser1 = new WebBrowser();<br />
            nextTab.Controls.Add(webBrowser1);<br />
            webBrowser1.Dock = DockStyle.Fill;<br />
            webBrowser1.Navigate("http://www.google.co.uk");<br />
            <br />
<br />
        }


Thank you for any help
AnswerRe: Web Browser Tab Control problem Pin
Luc Pattyn5-Dec-10 7:46
sitebuilderLuc Pattyn5-Dec-10 7:46 
GeneralRe: Web Browser Tab Control problem Pin
nawoc5-Dec-10 9:42
nawoc5-Dec-10 9:42 
GeneralRe: Web Browser Tab Control problem Pin
Luc Pattyn5-Dec-10 9:44
sitebuilderLuc Pattyn5-Dec-10 9:44 
QuestionShould I be using inhertance for this? Pin
Jacob D Dixon4-Dec-10 15:26
Jacob D Dixon4-Dec-10 15:26 
AnswerRe: Should I be using inhertance for this? Pin
PIEBALDconsult4-Dec-10 16:30
mvePIEBALDconsult4-Dec-10 16:30 
GeneralRe: Should I be using inhertance for this? [modified] Pin
Jacob D Dixon4-Dec-10 17:14
Jacob D Dixon4-Dec-10 17:14 
GeneralRe: Should I be using inhertance for this? Pin
PIEBALDconsult5-Dec-10 3:49
mvePIEBALDconsult5-Dec-10 3:49 
GeneralRe: Should I be using inhertance for this? Pin
Jacob D Dixon5-Dec-10 4:15
Jacob D Dixon5-Dec-10 4:15 
GeneralRe: Should I be using inhertance for this? Pin
PIEBALDconsult5-Dec-10 8:53
mvePIEBALDconsult5-Dec-10 8:53 
GeneralRe: Should I be using inhertance for this? Pin
Jacob D Dixon6-Dec-10 16:17
Jacob D Dixon6-Dec-10 16:17 
GeneralRe: Should I be using inhertance for this? Pin
Spectre_0016-Dec-10 2:33
Spectre_0016-Dec-10 2:33 
AnswerRe: Should I be using inhertance for this? Pin
nortee5-Dec-10 21:29
nortee5-Dec-10 21:29 
AnswerRe: Should I be using inhertance for this? Pin
Steve Naidamast6-Dec-10 3:04
professionalSteve Naidamast6-Dec-10 3:04 
AnswerRe: Should I be using inhertance for this? Pin
mbb016-Dec-10 22:05
mbb016-Dec-10 22:05 
GeneralRe: Should I be using inhertance for this? Pin
nortee6-Dec-10 23:21
nortee6-Dec-10 23:21 
GeneralRe: Should I be using inhertance for this? Pin
Jacob D Dixon8-Dec-10 3:46
Jacob D Dixon8-Dec-10 3:46 
AnswerRe: Should I be using inhertance for this? Pin
James Lonero8-Dec-10 8:41
James Lonero8-Dec-10 8:41 

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.