Click here to Skip to main content
15,892,161 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to hook a global PASTE EVENT? Pin
DaveyM692-Nov-08 9:48
professionalDaveyM692-Nov-08 9:48 
GeneralRe: How to hook a global PASTE EVENT? Pin
dactivo5-Nov-08 1:58
dactivo5-Nov-08 1:58 
GeneralRe: How to hook a global PASTE EVENT? Pin
DaveyM695-Nov-08 7:13
professionalDaveyM695-Nov-08 7:13 
GeneralRe: How to hook a global PASTE EVENT? Pin
dactivo7-Nov-08 19:58
dactivo7-Nov-08 19:58 
QuestionWeb Browser With Tabs Pin
jas0n231-Nov-08 11:45
jas0n231-Nov-08 11:45 
AnswerRe: Web Browser With Tabs Pin
Pedram Behroozi1-Nov-08 12:13
Pedram Behroozi1-Nov-08 12:13 
GeneralRe: Web Browser With Tabs Pin
jas0n231-Nov-08 13:35
jas0n231-Nov-08 13:35 
GeneralRe: Web Browser With Tabs Pin
jas0n231-Nov-08 14:02
jas0n231-Nov-08 14:02 
Okay, I couldn't get the code to work. It compiles. But just doesn't work at runtime, nor does it bring up any errors. Weird. Thanks your your help though, I appreciate it. Smile | :)

Here's my code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace JT_Explorer
{
    public partial class Form1 : Form
    {

        // The following code is used to move a borderless form.
        public const int WM_NCLBUTTONDOWN = 0xA1;
        public const int HTCAPTION = 0x2;
        [DllImport("User32.dll")]
        public static extern bool ReleaseCapture();
        [DllImport("User32.dll")]
        public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);

        public Form1()
        {
            InitializeComponent();
        }

        private void Stop_Click(object sender, EventArgs e)
        {
            Status.Text = ("Operation aborted.");
        }

        private void AddressBar_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                TabPage page = new TabPage("Tab");
                tabControl1.TabPages.Add(page);
                WebBrowser wb = new WebBrowser();
                wb.Dock = DockStyle.Fill;
                page.Controls.Add(wb);

                wb.Navigate(AddressBar.Text);

            }
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Close();
            this.Dispose();
            Environment.Exit(-1);
        }

        private void Like_MouseEnter(object sender, EventArgs e)
        {
            LikedList.Visible = true;
            LikedList.BringToFront();
        }

        private void LikedList_MouseLeave(object sender, EventArgs e)
        {
            LikedList.Visible = false;
        }

        private void Tags_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Disabled.");
        }

        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Hide();
        }

        private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            this.Show();
        }

        private void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons)
            {
                ReleaseCapture();
                SendMessage(Handle, WM_NCLBUTTONDOWN, HTCAPTION, 15);
            }
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            TabPage page = new TabPage("Tab");
            tabControl1.TabPages.Add(page);
            WebBrowser wb = new WebBrowser();
            wb.Dock = DockStyle.Fill;
            page.Controls.Add(wb);

            TabPage tp = tabControl1.SelectedTab;
            tp.Controls["wb"].Text = string.Format("kjh", (tabControl1.SelectedIndex + 1).ToString());
        }
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            tabControl1.SelectedTab.Dispose();
        }

        private void Back_Click(object sender, EventArgs e)
        {
            WebBrowser wb = tabControl1.SelectedTab.Controls[0] as WebBrowser;
            wb.GoBack();
        }

        private void Forward_Click(object sender, EventArgs e)
        {
            WebBrowser wb = tabControl1.SelectedTab.Controls[0] as WebBrowser;
            wb.GoForward();
        }
    }
}

GeneralRe: Web Browser With Tabs Pin
Pedram Behroozi1-Nov-08 19:57
Pedram Behroozi1-Nov-08 19:57 
GeneralRe: Web Browser With Tabs Pin
jas0n231-Nov-08 21:43
jas0n231-Nov-08 21:43 
GeneralRe: Web Browser With Tabs Pin
Pedram Behroozi1-Nov-08 22:11
Pedram Behroozi1-Nov-08 22:11 
GeneralRe: Web Browser With Tabs Pin
jas0n231-Nov-08 22:30
jas0n231-Nov-08 22:30 
GeneralRe: Web Browser With Tabs Pin
Pedram Behroozi1-Nov-08 23:04
Pedram Behroozi1-Nov-08 23:04 
GeneralRe: Web Browser With Tabs Pin
jas0n232-Nov-08 1:37
jas0n232-Nov-08 1:37 
GeneralRe: Web Browser With Tabs Pin
Pedram Behroozi2-Nov-08 2:19
Pedram Behroozi2-Nov-08 2:19 
GeneralRe: Web Browser With Tabs Pin
jas0n232-Nov-08 3:05
jas0n232-Nov-08 3:05 
GeneralRe: Web Browser With Tabs Pin
Pedram Behroozi2-Nov-08 5:16
Pedram Behroozi2-Nov-08 5:16 
QuestionHelp With dataGridView Copy and Paste Feature Pin
That Asian Guy1-Nov-08 9:02
That Asian Guy1-Nov-08 9:02 
GeneralRe: Help With dataGridView Copy and Paste Feature Pin
That Asian Guy1-Nov-08 14:47
That Asian Guy1-Nov-08 14:47 
QuestionGenerate ordered sequence of 11 numbers Pin
J-Cod3r1-Nov-08 7:57
J-Cod3r1-Nov-08 7:57 
GeneralRe: Generate ordered sequence of 11 numbers Pin
Luc Pattyn1-Nov-08 8:40
sitebuilderLuc Pattyn1-Nov-08 8:40 
Questiondatatable and datareader Pin
Zeyad Jalil1-Nov-08 6:58
professionalZeyad Jalil1-Nov-08 6:58 
QuestionHow can we create a plugin for IE with C# ? Pin
Mohammad Dayyan1-Nov-08 5:32
Mohammad Dayyan1-Nov-08 5:32 
AnswerRe: How can we create a plugin for IE with C# ? Pin
Pedram Behroozi1-Nov-08 6:21
Pedram Behroozi1-Nov-08 6:21 
QuestionSplitting a MP3 file ? Pin
Mohammad Dayyan1-Nov-08 4:53
Mohammad Dayyan1-Nov-08 4:53 

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.