Click here to Skip to main content
15,917,174 members
Home / Discussions / C#
   

C#

 
AnswerRe: wav to mp3 without lame Pin
Dan Neely21-Mar-07 4:07
Dan Neely21-Mar-07 4:07 
QuestionRelate webcontrol to sister control in page Pin
Matglas21-Mar-07 3:45
Matglas21-Mar-07 3:45 
QuestionEvent,Click Pin
abalfazl21-Mar-07 3:43
abalfazl21-Mar-07 3:43 
AnswerRe: Event,Click Pin
joon vh.21-Mar-07 4:51
joon vh.21-Mar-07 4:51 
AnswerRe: Event,Click Pin
abalfazl21-Mar-07 9:27
abalfazl21-Mar-07 9:27 
QuestionHow to use Multicoloms In ListBox Pin
pashitech21-Mar-07 3:29
pashitech21-Mar-07 3:29 
AnswerRe: How to use Multicoloms In ListBox Pin
Laxman Auti21-Mar-07 4:27
Laxman Auti21-Mar-07 4:27 
QuestionSPI_SETWORKAREA Problems Pin
AndyBob21-Mar-07 3:26
AndyBob21-Mar-07 3:26 
Hi everyone. I'm trying to use SPI_SETWORKAREA to reserve some space down the side of the screen for my application.

Everything works fine as far as other applications go (the space is reserved so that a maximised window doesn't cover the area, for example) but the desktop itself isn't affected. That is to say, icons on the traditional Windows desktop don't obey the new work area, meaning half of them end up underneath my window.

The code I'm using is as follows:
{
        RECT R;

        R.Left = 300;
        R.Top = 0;
        R.Right = Screen.PrimaryScreen.WorkingArea.Right;
        R.Bottom = Screen.PrimaryScreen.WorkingArea.Bottom;

        IntPtr p;
        p = Marshal.AllocHGlobal(Marshal.SizeOf(R));
        Marshal.StructureToPtr(R, p, false);

        SystemParametersInfo(SPI_SETWORKAREA, 0, p, 0);
        int ret = Marshal.GetLastWin32Error();
}


    RECT OriginalScreen;
    public struct RECT
    {
        public int Left;
        public int Top;
        public int Right;
        public int Bottom;
    }

I know I can achieve all of this (including resizing the desktop icon area) by creating an AppBar, but would rather use the SETWORKAREA if possible. Has anyone got any suggestions? I'm running this on Vista if that makes any difference. Thanks in advance!
GeneralLayout Pin
V.21-Mar-07 2:52
professionalV.21-Mar-07 2:52 
GeneralRe: Layout Pin
Laxman Auti21-Mar-07 3:18
Laxman Auti21-Mar-07 3:18 
GeneralRe: Layout Pin
V.21-Mar-07 4:35
professionalV.21-Mar-07 4:35 
GeneralRe: Layout Pin
Laxman Auti21-Mar-07 5:01
Laxman Auti21-Mar-07 5:01 
Question++x + x and x + ++x [modified] Pin
Varibrus21-Mar-07 2:44
Varibrus21-Mar-07 2:44 
AnswerRe: ++x + x and x + ++x Pin
Stefan Troschuetz21-Mar-07 3:04
Stefan Troschuetz21-Mar-07 3:04 
AnswerRe: ++x + x and x + ++x Pin
Pete O'Hanlon21-Mar-07 3:08
mvePete O'Hanlon21-Mar-07 3:08 
AnswerRe: ++x + x and x + ++x [modified] Pin
Jimmanuel21-Mar-07 3:08
Jimmanuel21-Mar-07 3:08 
AnswerRe: ++x + x and x + ++x Pin
Laxman Auti21-Mar-07 3:32
Laxman Auti21-Mar-07 3:32 
QuestionMain form with always-on-top flag + dialog Pin
Dominik Reichl21-Mar-07 2:36
Dominik Reichl21-Mar-07 2:36 
AnswerRe: Main form with always-on-top flag + dialog Pin
Stefan Troschuetz21-Mar-07 2:45
Stefan Troschuetz21-Mar-07 2:45 
GeneralRe: Main form with always-on-top flag + dialog Pin
Dominik Reichl21-Mar-07 4:13
Dominik Reichl21-Mar-07 4:13 
GeneralRe: Main form with always-on-top flag + dialog Pin
Stefan Troschuetz21-Mar-07 4:31
Stefan Troschuetz21-Mar-07 4:31 
QuestionProgressive Disclosure Control in windows form using c# Pin
Kumar Subramanian21-Mar-07 2:03
Kumar Subramanian21-Mar-07 2:03 
AnswerRe: Progressive Disclosure Control in windows form using c# Pin
joon vh.21-Mar-07 5:11
joon vh.21-Mar-07 5:11 
QuestionConstructor is instance method? Pin
Russell Jones21-Mar-07 2:00
Russell Jones21-Mar-07 2:00 
AnswerRe: Constructor is instance method? Pin
Pete O'Hanlon21-Mar-07 3:09
mvePete O'Hanlon21-Mar-07 3:09 

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.