Click here to Skip to main content
16,004,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: Working with Active Directory Pin
Justin Perez15-Oct-07 12:53
Justin Perez15-Oct-07 12:53 
QuestionHow to disable minimization. Pin
Y@rpen15-Oct-07 11:20
Y@rpen15-Oct-07 11:20 
AnswerRe: How to disable minimization. Pin
Anthony Mushrow15-Oct-07 11:38
professionalAnthony Mushrow15-Oct-07 11:38 
GeneralRe: How to disable minimization. Pin
Y@rpen15-Oct-07 11:45
Y@rpen15-Oct-07 11:45 
AnswerRe: How to disable minimization. Pin
Anthony Mushrow15-Oct-07 11:51
professionalAnthony Mushrow15-Oct-07 11:51 
GeneralRe: How to disable minimization. [modified] Pin
Y@rpen16-Oct-07 5:01
Y@rpen16-Oct-07 5:01 
GeneralRe: How to disable minimization. Pin
sushicw16-Oct-07 7:32
sushicw16-Oct-07 7:32 
GeneralRe: How to disable minimization. Pin
sushicw13-Nov-07 6:24
sushicw13-Nov-07 6:24 
Found it! This will disable minimization and "hiding" for a form by attaching it to the desktop (or progman, technically). Here's the code in C# (should be easy to adapt)

<br />
[DllImport("User32", SetLastError = true)]<br />
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);<br />
<br />
[DllImport("User32", SetLastError = true)]<br />
private static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);<br />
<br />
public static void AttachFormToDesktop(Form frmToAttach)<br />
{<br />
    IntPtr desktopHandle = FindWindow("Progman", null);<br />
    IntPtr result = SetParent(frmToAttach.Handle, desktopHandle);<br />
}<br />


One problem I've encountered so far, though, is that I can no longer set the TransparencyKey property on a form that's been attached to the desktop.

Hope this helps someone!
Questionhow can get a file path when user double click on it such as word files? Pin
B.A15-Oct-07 10:01
B.A15-Oct-07 10:01 
AnswerRe: how can get a file path when user double click on it such as word files? Pin
pmarfleet15-Oct-07 10:48
pmarfleet15-Oct-07 10:48 
GeneralRe: how can get a file path when user double click on it such as word files? Pin
B.A15-Oct-07 11:04
B.A15-Oct-07 11:04 
QuestionCreating items for CheckedListBox Pin
s3rro15-Oct-07 9:45
s3rro15-Oct-07 9:45 
AnswerRe: Creating items for CheckedListBox Pin
Justin Perez15-Oct-07 10:08
Justin Perez15-Oct-07 10:08 
QuestionProject Resource Pin
mihksoft15-Oct-07 8:00
mihksoft15-Oct-07 8:00 
AnswerRe: Project Resource Pin
Justin Perez15-Oct-07 8:26
Justin Perez15-Oct-07 8:26 
GeneralRe: Project Resource Pin
mihksoft15-Oct-07 8:31
mihksoft15-Oct-07 8:31 
GeneralRe: Project Resource [modified] Pin
Kristian Sixhøj15-Oct-07 9:19
Kristian Sixhøj15-Oct-07 9:19 
QuestionConfiguration settings - Howto? [modified] Pin
Phrone15-Oct-07 7:01
Phrone15-Oct-07 7:01 
AnswerRe: Configuration settings - Howto? Pin
Skippums15-Oct-07 7:16
Skippums15-Oct-07 7:16 
AnswerRe: Configuration settings - Howto? Pin
Justin Perez15-Oct-07 7:30
Justin Perez15-Oct-07 7:30 
QuestionRichTextBox.SelectionBackColor property Pin
Skippums15-Oct-07 6:55
Skippums15-Oct-07 6:55 
AnswerRe: RichTextBox.SelectionBackColor property Pin
mav.northwind15-Oct-07 19:23
mav.northwind15-Oct-07 19:23 
GeneralRe: RichTextBox.SelectionBackColor property Pin
Skippums16-Oct-07 4:18
Skippums16-Oct-07 4:18 
QuestionCatch C++ exception in C# Pin
Not Knuth15-Oct-07 6:35
Not Knuth15-Oct-07 6:35 
AnswerRe: Catch C++ exception in C# Pin
led mike15-Oct-07 6:52
led mike15-Oct-07 6:52 

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.