Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
AnswerRe: send variable across webpages without using session Pin
thatraja21-Jan-14 0:22
professionalthatraja21-Jan-14 0:22 
GeneralRe: send variable across webpages without using session Pin
Sharath Surendran21-Jan-14 22:54
Sharath Surendran21-Jan-14 22:54 
QuestionNeed help for perform some operation parallely Pin
superselector20-Jan-14 17:31
superselector20-Jan-14 17:31 
AnswerRe: Need help for perform some operation parallely Pin
Ron Beyer20-Jan-14 17:38
professionalRon Beyer20-Jan-14 17:38 
GeneralRe: Need help for perform some operation parallely Pin
superselector20-Jan-14 20:39
superselector20-Jan-14 20:39 
GeneralRe: Need help for perform some operation parallely Pin
OriginalGriff20-Jan-14 22:52
mveOriginalGriff20-Jan-14 22:52 
AnswerRe: Need help for perform some operation parallely Pin
GuyThiebaut20-Jan-14 21:55
professionalGuyThiebaut20-Jan-14 21:55 
GeneralRe: Need help for perform some operation parallely Pin
Ron Beyer21-Jan-14 2:26
professionalRon Beyer21-Jan-14 2:26 
GeneralRe: Need help for perform some operation parallely Pin
GuyThiebaut21-Jan-14 5:41
professionalGuyThiebaut21-Jan-14 5:41 
GeneralRe: Need help for perform some operation parallely Pin
GuyThiebaut21-Jan-14 6:27
professionalGuyThiebaut21-Jan-14 6:27 
GeneralRe: Need help for perform some operation parallely Pin
Ron Beyer21-Jan-14 7:01
professionalRon Beyer21-Jan-14 7:01 
QuestionHelp writing a program which adds up values in a 2D array to determine if it is a magic square Pin
Member 1052812320-Jan-14 3:43
Member 1052812320-Jan-14 3:43 
AnswerRe: Help writing a program which adds up values in a 2D array to determine if it is a magic square Pin
Peter Leow20-Jan-14 4:20
professionalPeter Leow20-Jan-14 4:20 
AnswerRe: Help writing a program which adds up values in a 2D array to determine if it is a magic square Pin
OriginalGriff20-Jan-14 5:50
mveOriginalGriff20-Jan-14 5:50 
AnswerRe: Help writing a program which adds up values in a 2D array to determine if it is a magic square Pin
BillWoodruff20-Jan-14 9:08
professionalBillWoodruff20-Jan-14 9:08 
QuestionCustom Data Types Pin
sunsilk1020-Jan-14 3:04
sunsilk1020-Jan-14 3:04 
AnswerRe: Custom Data Types Pin
Manfred Rudolf Bihy20-Jan-14 3:25
professionalManfred Rudolf Bihy20-Jan-14 3:25 
AnswerRe: Custom Data Types Pin
BillWoodruff20-Jan-14 5:13
professionalBillWoodruff20-Jan-14 5:13 
AnswerRe: Custom Data Types Pin
Freak3020-Jan-14 23:30
Freak3020-Jan-14 23:30 
QuestionC# with Oraclei Pin
Nightbird.14319-Jan-14 21:00
Nightbird.14319-Jan-14 21:00 
AnswerRe: C# with Oraclei Pin
V.19-Jan-14 21:49
professionalV.19-Jan-14 21:49 
QuestionMulti Desktop app, Need to take Screen short of a given desktop using handle. Pin
ptr_Electron19-Jan-14 19:23
ptr_Electron19-Jan-14 19:23 
I was been working on multiple desktop app. and would like to Screen shot of a desktop using the handle of the specific desktop.. I was using the blow code, but this always makes the the screenshort of current desktop.. as the Handle of "MyNewDesktop" was not supplyed. could you please tell me how to make use of hdesk to capture the screen short of the "MyNewDesktop". The below code is of utility app which captures desk top

C#
hwinsta = OpenWindowStation("WinSta0", false, WINDOWS_STATION_ACCESS_MASK.WINSTA_ALL_ACCESS);
           hwinsta2 = SetProcessWindowStation(hwinsta);
           hdesk = OpenDesktop("MyNewDesktop", 0, false, DESKTOP_ACCESS_MASK.GENERIC_ALL);//0x0001L | SetThreadDesktop);
           bool thset = SetThreadDesktop(hdesk);

           EnumDelegate delEnumfunc = new EnumDelegate(EnumWindowsProc);
           IntPtr DesktopWindow = GetDesktopWindow();
           bool bSuccessful = EnumDesktopWindows(hdesk, delEnumfunc, DesktopWindow);
           if (bSuccessful) // this was sucessfull control enters this block
           {
               string filename = string.Format("ScreenCap-{0:yyyy-MM-dd_hh-mm-ss-tt}", DateTime.Now);
               var bounds = Screen.GetBounds(Point.Empty);
               using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
               {
                   using (Graphics g = Graphics.FromImage(bitmap))
                   {
                       g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);
                   }
                   bitmap.Save(@"C:\" + filename + ".jpg", ImageFormat.Jpeg);
               }
            }
            else
            {
            // Get the last Win32 error code
                int nErrorCode = Marshal.GetLastWin32Error();
                string strErrMsg = String.Format("EnumDesktopWindows failed with code {0}.", nErrorCode);
                throw new Exception(strErrMsg);
           }


thanks
AnswerRe: Multi Desktop app, Need to take Screen short of a given desktop using handle. Pin
Mycroft Holmes19-Jan-14 21:02
professionalMycroft Holmes19-Jan-14 21:02 
GeneralRe: Multi Desktop app, Need to take Screen short of a given desktop using handle. Pin
ptr_Electron20-Jan-14 0:40
ptr_Electron20-Jan-14 0:40 
AnswerRe: Multi Desktop app, Need to take Screen short of a given desktop using handle. Pin
Bernhard Hiller20-Jan-14 3:47
Bernhard Hiller20-Jan-14 3:47 

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.