Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Programm3r

@Programm3r
About
Posts
1.7k
Topics
430
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WPF - Why was it formed?
    P Programm3r

    Well I think most of the other members already said why is was formed, but I would like to add the following. Please go and have a look at some of the articles drafted by Sacha Barber[^], which makes use of xaml (wpf, silverlight, metro), then I would like you to ask yourself one simple question; how easy / difficult / impossible would that have been in WinForms... Kind regards,

    The Lounge csharp question asp-net wpf winforms

  • CP Bookmarks
    P Programm3r

    Ahhh.... must better! :jig: Many thanks for the information!

    The Lounge question

  • CP Bookmarks
    P Programm3r

    Hi all, Okay, so I might be a total n00b with the Code Project bookmarks, but isn't there some functionality that allows you to search or even export the bookmarks? It's just because, I have over eleven pages of bookmarks and going through them one by one is a very tedious process! Am I missing something? Thanks

    The Lounge question

  • EWOTD
    P Programm3r

    LMAO!!! :laugh: :laugh:

    The Lounge com question

  • Snow!
    P Programm3r

    Great!! :jig: Grab the snowboard and hit some fresh powder!!

    The Lounge com question learning

  • What a life
    P Programm3r

    _Josh_ wrote:

    What a crappy, unsatisfying and boring life, I hope I never end up like him.

    Amen to that!!

    The Lounge

  • Lingerie publicity stunt in Paris' Musee d'Orsay
    P Programm3r

    super wrote:

    Based on the percentage of covered ?

    LMAO!! :jig:

    The Lounge html com question announcement learning

  • All I Want For Christmas - HMS OCEAN
    P Programm3r

    LMAO :laugh: :laugh:

    The Lounge com question learning

  • Divide width of row datagrid in C# with screen specification ????
    P Programm3r

    Hi, Okay, I read your question a couple of times, and I have no idea what you just said / asked? :confused::confused: Could you please try and be more specific about the problem? Kind regards,

    C# question csharp help

  • how to find out installed MS-office is 64-bit or 32-bit via registry?
    P Programm3r

    Hmm.... What type of OS are you using? You can always check in your program files. If Outlook was installed in the 'Program Files (x86)', when it should be 32-bit otherwise it's a 64-bit installation?

    C# windows-admin tutorial question

  • Start application at specific time
    P Programm3r

    Busted ... :jig:

    C# csharp

  • how to find out installed MS-office is 64-bit or 32-bit via registry?
    P Programm3r

    Hi, Have a look at the following key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Outlook] -> Bitness=x86 Kind regards,

    C# windows-admin tutorial question

  • JOTD - Your best Australian accent is required [old]
    P Programm3r

    Thanks, My bad ... :)

    The Lounge

  • JOTD - Your best Australian accent is required [old]
    P Programm3r

    Life in the Australian Army... Text of a letter from a kid from Eromanga to Mum and Dad. (For Those of you not in the know, Eromanga is a small town, west of Quilpie in the far south west of Queensland ) Dear Mum & Dad, I am well. Hope youse are too. Tell me big brothers Doug and Phil that the Army is better than workin' on the station - tell them to get in bloody quick smart before the jobs are all gone! I wuz a bit slow in settling down at first, because ya don't hafta get outta bed until 6am. But I like sleeping in now, cuz all ya gotta do before brekky is make ya bed and shine ya boots and clean ya uniform. No bloody horses to get in, no calves to feed, no troughs to clean - nothin'!! Ya haz gotta shower though, but its not so bad, coz there's lotsa hot water and even a light to see what ya doing! At brekky ya get cereal, fruit and eggs but there's no kangaroo steaks or goanna stew like wot Mum makes. You don't get fed again until noon and by that time all the city boys are buggered because we've been on a 'route march' - geez its only just like walking to the windmill in the bullock paddock!! This one will kill me brothers Doug and Phil with laughter. I keep getting medals for shootin' - dunno why. The bullseye is as big as a bloody dingo's arse and it don't move and it's not firing back at ya like the Johnsons did when our big scrubber bull got into their prize cows before the Ekka last year! All ya gotta do is make yourself comfortable and hit the target - it's a piece of piss!! You don't even load your own cartridges, they comes in little boxes, and ya don't have to steady yourself against the rollbar of the roo shooting truck when you reload! Sometimes ya gotta wrestle with the city boys and I gotta be real careful coz they break easy - it's not like fighting with Doug and Phil and Jack and Boori and Steve and Muzza all at once like we do at home after the muster. Turns out I'm not a bad boxer either and it looks like I'm the best the platoon's got, and I've only been beaten by this one bloke from the Engineers - he's 6 foot 5 and 15 stone and three pick handles across the shoulders and as ya know I'm only 5 foot 7 and eight stone wringin' wet, but I fought him till the other blokes carried me off to the boozer. I can't complain about the Army - tell the boys to get in quick before word gets around how bloody good it is. Your loving daughter, Mary.

    modified on Frida

    The Lounge

  • Use event from C++ library in C# application
    P Programm3r

    Thanks again Luc. P.s the demo application link does not work. Kind regards,

    C# csharp c++ question

  • Use event from C++ library in C# application
    P Programm3r

    Hi Karsten, Could you please elaborate on your answer? Many thanks. Kind regards,

    C# csharp c++ question

  • Use event from C++ library in C# application
    P Programm3r

    Hi Luc, After some testing, I found myself back at square one, reason being that the example does not illustrate what happens within the c++ section of the code. The author makes use of standard windows methods and I have no idea what they are doing in the method. More specifically, the EnumWindows method. I must create my own method so that I can receive the X and Y coordinates (and that is what the CALLBACK is for ... i guess), thus what parameters must I send to the c++ method? I apologize for my ignorance but I'm in the dark here :doh: :confused: C++ SectionBOOL EnumWindows( WNDENUMPROC lpEnumFunc, LPARAM lParam ); BOOL CALLBACK EnumWindowsProc( HWND hwnd, LPARAM lParam ); BOOL IsWindowVisible( HWND hWnd );
    C# Sectionclass DelegateExample { private List<IntPtr> windowList; public List<IntPtr> GetVisibleWindowHandles() { windowList=new List<IntPtr>(); EnumWindows(new EnumWindowsProc(CollectVisibleWindows), IntPtr.Zero); Console.WriteLine("There are {0} visible windows", windowList.Count); return windowList; } private bool CollectVisibleWindows(IntPtr hWnd, IntPtr lParam) { if(IsWindowVisible(hWnd)) windowList.Add(hWnd); return true; // please continue enumeration ! } [DllImport("user32.dll")] private static extern int EnumWindows(LP_EnumWindowsProc ewp, IntPtr lParam); private delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam); [DllImport("user32.dll")] private static extern bool IsWindowVisible(IntPtr hWnd); }
    Many thanks in advance. Kind regards,

    C# csharp c++ question

  • Use event from C++ library in C# application
    P Programm3r

    Hi Luc, Thanks for the reply. I have heard about P/Invoke, but wasn't sure about how to go about using it. But many thanks for the link, I think the delegate section is what I needed. Kind regards,

    C# csharp c++ question

  • Use event from C++ library in C# application
    P Programm3r

    Hi all, I have written a C++ library which communicates with an external device. The device sends back certain X and Y coordinates. I am trying to send back these X and Y coordinates to a calling c# application, but I don't want to poll the library with a thread or a loop. Is there a way I can create an event in the C++ library and register to it from the c# application, so that when the X and Y coordinates have values, the event will be fired in the c# application? Many thanks in advance. Kind regards,

    C# csharp c++ question

  • Get output from console window (which is a different process)
    P Programm3r

    Just remeber to set the UseShellExecute property to false.

                Process start = null;
                start = Process.Start(new ProcessStartInfo()
                {
                    FileName = @"C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet\_regiis.exe",
                    Arguments = string.Format("-pef connectionStrings {0}", webConfiguraitonFilePath),
                    CreateNoWindow = true,
                    UseShellExecute = false,
                    WindowStyle = ProcessWindowStyle.Hidden,
                    RedirectStandardError = true,
                    RedirectStandardOutput = true
                });
                start.Start();
                StreamReader outputReader = process.StandardOutput;
                StreamReader errorReader = process.StandardError;
    

    Thanks again. Kind regards,

    C# csharp asp-net tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups