Click here to Skip to main content
15,911,848 members
Home / Discussions / C#
   

C#

 
GeneralRe: WM_NCLBUTTONUP Pin
Guinness4Strength30-Jul-04 3:29
Guinness4Strength30-Jul-04 3:29 
GeneralRe: WM_NCLBUTTONUP Pin
Heath Stewart30-Jul-04 4:37
protectorHeath Stewart30-Jul-04 4:37 
GeneralArrayList Help Needed for Newbie... Pin
gman4429-Jul-04 11:32
gman4429-Jul-04 11:32 
GeneralRe: ArrayList Help Needed for Newbie... Pin
Christian Graus29-Jul-04 11:52
protectorChristian Graus29-Jul-04 11:52 
GeneralRe: ArrayList Help Needed for Newbie... Pin
leppie29-Jul-04 21:41
leppie29-Jul-04 21:41 
GeneralWildcard filename pattern matching for c# Pin
RobC.29-Jul-04 11:29
RobC.29-Jul-04 11:29 
GeneralRe: Wildcard filename pattern matching for c# Pin
Nick Parker29-Jul-04 12:37
protectorNick Parker29-Jul-04 12:37 
GeneralSetting default button in a user control Pin
Member 117376029-Jul-04 11:18
Member 117376029-Jul-04 11:18 
Hi all. Making my first "big" C# WinForms app. Basically, I have a WinForm (called MainForm) that has a menu, and a tab control docked to take up the full area. Eventually the number of tabs will be dynamic based on how many "workspaces" a user has open but for now is static. Within the first tab page, I am inserting a custom control -- called TypeAContentControl. There may be several of these on different tab pages (depending if the user called for multiple instances). That control actually contains, you guessed it, yet another control, and also contains a treeview and a panel which will house a future control. The control that is housed within TypeAContentControl is called SearchControl. It's pretty basic, contains a radio set, a text box, and a single button (which is at the heart of my question).

I can't seem to figure out how to make this the "default" button. I only need it default while the focus is within other fields of the SearchControl (ie, I want to type in my textbox, or be on my radio buttons and hit Enter to perform an action). The only time I seem to hit the code behind the button is if I tab enough times so that the button has the focus, and then hit spacebar or enter. If I'm on another field within SearchControl, I have to use the keyboard accelerator to hit my button.

I know on a standard WinForm with buttons, I can just set that Form's AcceptButton accordingly, but I do not see that as the solution for this problem.

Anyone have any clues as to what might help me out here? I've been Googling and searching the MSDN for a while now trying to figure this out and just not finding anything helpful. Any help would be appreciated.

Thanks,
-John
GeneralRe: Setting default button in a user control Pin
Member 117376030-Jul-04 2:20
Member 117376030-Jul-04 2:20 
GeneralRe: Setting default button in a user control Pin
Heath Stewart30-Jul-04 4:33
protectorHeath Stewart30-Jul-04 4:33 
GeneralRe: Setting default button in a user control Pin
Member 117376030-Jul-04 4:50
Member 117376030-Jul-04 4:50 
Generalmp3 player Pin
Member 80940929-Jul-04 11:04
Member 80940929-Jul-04 11:04 
GeneralRe: mp3 player Pin
Nick Parker29-Jul-04 11:36
protectorNick Parker29-Jul-04 11:36 
GeneralRe: mp3 player Pin
crushinghellhammer29-Jul-04 12:17
crushinghellhammer29-Jul-04 12:17 
QuestionDrawing twice causes exception? Pin
Pain_Elemental29-Jul-04 9:34
Pain_Elemental29-Jul-04 9:34 
AnswerRe: Drawing twice causes exception? Pin
Heath Stewart29-Jul-04 9:42
protectorHeath Stewart29-Jul-04 9:42 
GeneralRe: Drawing twice causes exception? Pin
Pain_Elemental29-Jul-04 20:26
Pain_Elemental29-Jul-04 20:26 
GeneralRe: Drawing twice causes exception? Pin
Heath Stewart30-Jul-04 3:13
protectorHeath Stewart30-Jul-04 3:13 
GeneralRe: Drawing twice causes exception? Pin
Pain_Elemental30-Jul-04 3:34
Pain_Elemental30-Jul-04 3:34 
GeneralRe: Drawing twice causes exception? Pin
Pain_Elemental30-Jul-04 10:37
Pain_Elemental30-Jul-04 10:37 
GeneralDifferent behavior on different machines Pin
DougW4829-Jul-04 9:22
DougW4829-Jul-04 9:22 
GeneralRe: Different behavior on different machines Pin
Heath Stewart29-Jul-04 9:36
protectorHeath Stewart29-Jul-04 9:36 
GeneralRe: Different behavior on different machines Pin
DougW4829-Jul-04 9:59
DougW4829-Jul-04 9:59 
GeneralCryptography Pin
Wender Oliveira29-Jul-04 9:14
Wender Oliveira29-Jul-04 9:14 
GeneralRe: Cryptography Pin
Heath Stewart29-Jul-04 9:22
protectorHeath Stewart29-Jul-04 9:22 

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.