Click here to Skip to main content
15,886,362 members
Home / Discussions / C#
   

C#

 
GeneralRe: Navigation in multiple forms Pin
Mehdi Moshtaghi30-Dec-03 0:37
Mehdi Moshtaghi30-Dec-03 0:37 
GeneralRe: Navigation in multiple forms Pin
Heath Stewart30-Dec-03 5:10
protectorHeath Stewart30-Dec-03 5:10 
GeneralRe: Navigation in multiple forms Pin
Hayat31-Dec-03 16:12
Hayat31-Dec-03 16:12 
GeneralRe: Navigation in multiple forms Pin
Mehdi Moshtaghi31-Dec-03 21:52
Mehdi Moshtaghi31-Dec-03 21:52 
GeneralThis is probably a silly question, Pin
Nick Seng29-Dec-03 16:41
Nick Seng29-Dec-03 16:41 
GeneralCut, Copy, Paste Event needed. Pin
Nicholas Cardi29-Dec-03 12:00
Nicholas Cardi29-Dec-03 12:00 
GeneralRe: Cut, Copy, Paste Event needed. Pin
je_gonzalez29-Dec-03 13:33
je_gonzalez29-Dec-03 13:33 
GeneralRe: Cut, Copy, Paste Event needed. Pin
Heath Stewart30-Dec-03 5:03
protectorHeath Stewart30-Dec-03 5:03 
A good way is to take advantage that WM_COMMAND messages are passed to a control's parent (keep in mind that all controls in System.Windows.Forms are just wrapper classes for Windows Common Controls). If you override WndProc in your main form, all child controls - as well as their children, and so forth - will send you a WM_COMMAND message that you can mask for the EN_SETFOCUS or EN_SELCHANGE notification message. You then use the Message.HWnd property to get the Window handle (HWND) and use Control.FromChildHandle to get the control. You can then cast it to a TextBoxBase (base class for both TextBox and RichTextBox) and call the Cut, Copy, or Paste methods on it.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Cut, Copy, Paste Event needed. Pin
panache102319-Jan-04 11:35
panache102319-Jan-04 11:35 
GeneralInstalled Applications Pin
Melanius29-Dec-03 10:36
Melanius29-Dec-03 10:36 
GeneralRe: Installed Applications Pin
Heath Stewart29-Dec-03 11:16
protectorHeath Stewart29-Dec-03 11:16 
GeneralModeless Dialog Box Pin
JL_32729-Dec-03 9:52
JL_32729-Dec-03 9:52 
GeneralRe: Modeless Dialog Box Pin
Heath Stewart29-Dec-03 11:11
protectorHeath Stewart29-Dec-03 11:11 
GeneralRe: Modeless Dialog Box Pin
je_gonzalez29-Dec-03 11:37
je_gonzalez29-Dec-03 11:37 
QuestionNumericUpDown with XP/System theme, possible? Pin
Roriok29-Dec-03 9:05
Roriok29-Dec-03 9:05 
AnswerRe: NumericUpDown with XP/System theme, possible? Pin
Roger Alsing29-Dec-03 9:11
Roger Alsing29-Dec-03 9:11 
GeneralRe: NumericUpDown with XP/System theme, possible? Pin
Heath Stewart29-Dec-03 9:39
protectorHeath Stewart29-Dec-03 9:39 
GeneralRe: NumericUpDown with XP/System theme, possible? Pin
Roriok29-Dec-03 9:42
Roriok29-Dec-03 9:42 
Generaltaskbar Pin
hebzzz29-Dec-03 7:54
hebzzz29-Dec-03 7:54 
GeneralRe: taskbar Pin
Heath Stewart29-Dec-03 8:52
protectorHeath Stewart29-Dec-03 8:52 
Generaldrag/drop to Windows Explorer Pin
elena1234529-Dec-03 6:26
elena1234529-Dec-03 6:26 
GeneralRe: drag/drop to Windows Explorer Pin
Tristan Rhodes29-Dec-03 7:57
Tristan Rhodes29-Dec-03 7:57 
GeneralRe: drag/drop to Windows Explorer Pin
Heath Stewart29-Dec-03 8:55
protectorHeath Stewart29-Dec-03 8:55 
GeneralMulti Page / Frame TIFF File Pin
ttnetworks29-Dec-03 4:16
ttnetworks29-Dec-03 4:16 
GeneralRe: Multi Page / Frame TIFF File Pin
Heath Stewart29-Dec-03 5:38
protectorHeath Stewart29-Dec-03 5:38 

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.