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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to set the focus of two forms

How to set the focus of two forms

Scheduled Pinned Locked Moved C#
comdesignhelptutorialquestion
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.
  • D Offline
    D Offline
    dreamwinter
    wrote on last edited by
    #1

    Recently I design a custom comboBox control,this control includes two forms.The one of the forms is inherit from the namespace that System.Windows.Forms.ComboBox,When active DropDownEvent,The second form will be shown.But the focus is moved on the new form. However,I want keep the focus still on the main form. Will you help me,please? Thanks. MSN:tomatoboy78@hotmail.com ,you can email to me.;)

    S 1 Reply Last reply
    0
    • D dreamwinter

      Recently I design a custom comboBox control,this control includes two forms.The one of the forms is inherit from the namespace that System.Windows.Forms.ComboBox,When active DropDownEvent,The second form will be shown.But the focus is moved on the new form. However,I want keep the focus still on the main form. Will you help me,please? Thanks. MSN:tomatoboy78@hotmail.com ,you can email to me.;)

      S Offline
      S Offline
      Stanciu Vlad
      wrote on last edited by
      #2

      From what I understand you have two forms : a mainForm, and a "dropDownForm". When you press the drop down button you wish to show the dropDownForm but keep focus on the mainForm. If you do that the dropDownForm will not be visible (only if you make it allways on top, whitch is not a good thing, let's say you switch to an other aplication...in this case you will see the dropDownForm). I recommend you to forward all the focus actions you wish to keep onto the mainForm from the dropDownForm. I hope you understand...because is a rough world out there...

      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