Click here to Skip to main content
15,883,887 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
General.net CF Pin
monn6-Apr-04 17:04
monn6-Apr-04 17:04 
QuestionHow to create Help files in windows Pin
Sreepathi6-Apr-04 16:13
Sreepathi6-Apr-04 16:13 
GeneralIDE Pin
monn6-Apr-04 6:07
monn6-Apr-04 6:07 
GeneralRe: IDE Pin
Colin Angus Mackay6-Apr-04 6:45
Colin Angus Mackay6-Apr-04 6:45 
GeneralRe: IDE Pin
Charlie Williams6-Apr-04 10:47
Charlie Williams6-Apr-04 10:47 
GeneralRe: DateTimePicker ruins my graph! Pin
Colin Angus Mackay6-Apr-04 0:37
Colin Angus Mackay6-Apr-04 0:37 
QuestionHow to know the focused control Pin
Sreepathi4-Apr-04 14:26
Sreepathi4-Apr-04 14:26 
AnswerRe: How to know the focused control Pin
Roman Rodov5-Apr-04 16:17
Roman Rodov5-Apr-04 16:17 
This will return a currently focused control on a form IF the form does not have any container controls on it.

<br />
public Control GetFocused()<br />
{<br />
   foreach(Control ctrl in this.Controls)<br />
   {<br />
     if (ctrl.Focused)<br />
     {<br />
       return ctrl;<br />
     }<br />
   }<br />
   return null;<br />
}<br />


This is a universal way of getting the currently focused control:
<br />
public class MyForm : Form <br />
 <br />
{ <br />
 <br />
          [DllImport("user32.dll", CharSet=CharSet.Auto, CallingConvention=CallingConvention.Winapi)] <br />
 <br />
          internal static extern IntPtr GetFocus(); <br />
 <br />
<br />
 <br />
          private Control GetFocusedControl() <br />
 <br />
          { <br />
 <br />
               Control focusedControl = null; <br />
 <br />
               // To get hold of the focused control: <br />
 <br />
               IntPtr focusedHandle = GetFocus(); <br />
 <br />
               if(focusedHandle != IntPtr.Zero) <br />
 <br />
                    // Note that if the focused Control is not a .Net control, then this will return null. <br />
 <br />
                    focusedControl = Control.FromHandle(focusedHandle); <br />
 <br />
               return focusedControl; <br />
 <br />
          } <br />
 <br />
} <br />

GeneralMultimodule assembly Pin
sieben4-Apr-04 9:32
sieben4-Apr-04 9:32 
GeneralRe: Multimodule assembly Pin
Mike Dimmick5-Apr-04 2:20
Mike Dimmick5-Apr-04 2:20 
GeneralRe: Multimodule assembly Pin
sieben5-Apr-04 2:37
sieben5-Apr-04 2:37 
Generalcompiling MSIL to Native code using ngen.exe tool Pin
Marco M.4-Apr-04 0:50
Marco M.4-Apr-04 0:50 
GeneralRe: compiling MSIL to Native code using ngen.exe tool Pin
leppie4-Apr-04 1:13
leppie4-Apr-04 1:13 
GeneralConcurrent Assembly versions Pin
ProffK2-Apr-04 1:50
ProffK2-Apr-04 1:50 
GeneralFramework Version Pin
JM_FL1-Apr-04 22:55
JM_FL1-Apr-04 22:55 
GeneralRe: Framework Version Pin
Stefan Troschuetz12-Apr-04 22:52
Stefan Troschuetz12-Apr-04 22:52 
GeneralTransfers to the client an amount of the expected result Pin
s_habibi1-Apr-04 19:35
s_habibi1-Apr-04 19:35 
QuestionHow to override non-virtual method in .NET (not a joke) Pin
Eugene Mayeski1-Apr-04 12:34
professionalEugene Mayeski1-Apr-04 12:34 
AnswerRe: How to override non-virtual method in .NET (not a joke) Pin
Colin Angus Mackay1-Apr-04 13:21
Colin Angus Mackay1-Apr-04 13:21 
GeneralRe: How to override non-virtual method in .NET (not a joke) Pin
Eugene Mayeski1-Apr-04 13:30
professionalEugene Mayeski1-Apr-04 13:30 
GeneralRe: How to override non-virtual method in .NET (not a joke) Pin
Colin Angus Mackay1-Apr-04 14:01
Colin Angus Mackay1-Apr-04 14:01 
GeneralDeployment of already installed Appllication in .NET. Pin
Mahesh Dara31-Mar-04 18:22
Mahesh Dara31-Mar-04 18:22 
GeneralRe: Deployment of already installed Appllication in .NET. Pin
John Kuhn31-Mar-04 18:44
John Kuhn31-Mar-04 18:44 
GeneralRe: Deployment of already installed Appllication in .NET. Pin
je_gonzalez1-Apr-04 14:28
je_gonzalez1-Apr-04 14:28 
GeneralRe: Deployment of already installed Appllication in .NET. Pin
Mahesh Dara1-Apr-04 20:21
Mahesh Dara1-Apr-04 20:21 

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.