Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. WM_CONTEXTMENU ?

WM_CONTEXTMENU ?

Scheduled Pinned Locked Moved C#
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    god4k
    wrote on last edited by
    #1

    protected override void OnMouseUp(MouseEventArgs e) { int WM_CONTEXTMENU = 0x7B; this.Capture = false; Message msg = Message.Create(this.Handle, WM_CONTEXTMENU, ???, ???); DefWndProc(ref msg); } ========================================= Dear Sir And Madam, The code above.... I need to show Windows Form Title Bar Context Menu. Message msg = Message.Create(this.Handle, WM_CONTEXTMENU, ???, ???); What parameter I should create and pass to Message.Create method. Sorry for bad English. Thank You.

    N 1 Reply Last reply
    0
    • G god4k

      protected override void OnMouseUp(MouseEventArgs e) { int WM_CONTEXTMENU = 0x7B; this.Capture = false; Message msg = Message.Create(this.Handle, WM_CONTEXTMENU, ???, ???); DefWndProc(ref msg); } ========================================= Dear Sir And Madam, The code above.... I need to show Windows Form Title Bar Context Menu. Message msg = Message.Create(this.Handle, WM_CONTEXTMENU, ???, ???); What parameter I should create and pass to Message.Create method. Sorry for bad English. Thank You.

      N Offline
      N Offline
      new2pgrmg
      wrote on last edited by
      #2

      using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace DateSelectionforPGE { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void dateTimePicker1_ValueChanged(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { selectDate(); connectSQl(); } public void connectSQl() { SqlConnection conObj = new SqlConnection("Server=localhost;Integrated security=SSPI;database=master"); conObj.Open(); } public void selectDate() { //To take the Database Name string nameDatabase = dateTimePicker1.Value.ToString("MMdd"); string nameDB = "CustList_PGE_" + nameDatabase; MessageBox.Show("The name of the database will be CustList_PGE_" + nameDatabase); //To take the Database Table string nameDatabasetable = dateTimePicker1.Value.ToString("MMddyy"); string nameTable = "CustList_PGE" + nameDatabasetable; MessageBox.Show("The name of the Database table will be CustList_PGE" + nameDatabasetable); //Connecting to the Stored Procedure SqlCommand cmdObj = new SqlCommand(); cmdObj.CommandText = "CreateDataBases"; cmdObj.CommandType = CommandType.StoredProcedure; cmdObj.Parameters.AddWithValue("@databaseName", nameDB); cmdObj.ExecuteNonQuery(); } } }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups