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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

alanteigne

@alanteigne
About
Posts
18
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Advise - How to make C++ Windows Form App without .NET framework
    A alanteigne

    Overwhelming indeed. I've decided to forget the GUI for now until I get my C++ logic and syntax down. So far I've successfully made a custom class that performs a WMI query to some info I need. I'm now working on figuring out some datatyping issues I'm running into that I never ran into in C#. Thanks for the advice, I'll certainly put it to use when I get to adding a GUI.

    C / C++ / MFC csharp question c++ dotnet visual-studio

  • Advise - How to make C++ Windows Form App without .NET framework
    A alanteigne

    Ah! It's called a dialog here. I've added a Dialog and can design willy nilly. Sweet.

    C / C++ / MFC csharp question c++ dotnet visual-studio

  • Advise - How to make C++ Windows Form App without .NET framework
    A alanteigne

    Could you elaborate on how to do so? When I try to add a form, it wants to add support for CLR, which means .NET framework, if I'm not mistaken..

    C / C++ / MFC csharp question c++ dotnet visual-studio

  • Advise - How to make C++ Windows Form App without .NET framework
    A alanteigne

    (now my ignorance will become evident) I've just created an MFC solution in VS05, but wasn't sure what to choose for the project settings so I used the defaults. I'm not seeing how to interact with the main form. Can I use the graphical form designer with this type of project?

    C / C++ / MFC csharp question c++ dotnet visual-studio

  • Advise - How to make C++ Windows Form App without .NET framework
    A alanteigne

    I have a rookie question for you guys. I need to write a GUI based application (not too complex) for a windows platform that cannot have the .NET framework installed. The .NET Framework is absolutely out of the question. I've attempted to create a Windows Form application for C++ under Visual Studio 05, but when I compile it runs on my machine but not the remote machine. All it is is a blank form, so it's not a code bug. How should I go about creating a Form based GUI app for my circumstances? Thanks...

    C / C++ / MFC csharp question c++ dotnet visual-studio

  • Handler for all unhandled exceptions in a class?
    A alanteigne

    Thanks for all of the suggestions. I ended up using pretty much all of them in some form or another. I've isolated this custom class to run as a Windows service, and handle all UI and non UI unhandled exceptions with global handlers under Main(). Alan

    C# question help tutorial

  • Handler for all unhandled exceptions in a class?
    A alanteigne

    eggs, thanks for the suggestion! i believe that code will catch any unhandled exceptions generated by my entire app (parent form, and my custom child form). i'm trying to just catch errors in the child form. the child form is being added something like this: frmCustomForm = new MyCustomForm(); this.Controls.Add(frmCustomForm); i would like any unhandled exception that occurs within that custom form to cause it to trigger an event. alan

    C# question help tutorial

  • Handler for all unhandled exceptions in a class?
    A alanteigne

    Hello, this may be a stupid question but I'm curious. I have a class I've created (that extends the FORM class) that runs as a child form of my main application. The purpose and nature of the form is such that it doesn't matter if it closes...the parent form monitors and will reopen it if necessary. I am handling several types of exceptions and closing the child form when they occur. However, I occasionally get an unhandled exception (in the child form) that causes it to crash. I'm looking for a way to catch all unhandled exceptions in my custom class and run an event accordingly. Is there a way to do this? I see a method for any unhandled exceptions for the whole app, but I don't want that. I also see how to handle all exceptions when my child form is initialized, but that doesn't help if it's already initialized and running. All I want now is to handle all exceptions in my custom class. Is this possible? Thanks, Alan

    C# question help tutorial

  • Datagridview: got the row value now need the string value
    A alanteigne

    no problem!

    C# help question csharp database visual-studio

  • EventHandler for Child Form Closed Event?
    A alanteigne

    FormClosed. You've gotta be kidding me, that makes too much sense! Thanks!

    C# question help

  • Datagridview: got the row value now need the string value
    A alanteigne

    if you know row# = i, and column# = n, try: adObjectDataGridView.Rows[i].Cells[n].Value.ToString()

    C# help question csharp database visual-studio

  • How to get system information
    A alanteigne

    Here's a little bit of help, pulling code from something I wrote a while back: add this reference... using System.Diagnostics; create a perf counter... private PerformanceCounter cpuCounter; define it cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total", true); get the value: cpuCurrValue = Convert.ToInt32(cpuCounter.NextValue()); I created a myPerfMon class that uses the perf counters to get and return the values, and another class that tells it to do so on a timer.

    C# question csharp performance tutorial

  • EventHandler for Child Form Closed Event?
    A alanteigne

    In my project I've created an instance of a custom form class. In my form class, I have error detection that simply closes the form if an un-handleable error occurs. Due to the nature of the app, this is the desired behavior. However, I would like an event on the main form to fire off whenever this happens. How can I do this? I initialize my custom for like this: frm_myForm myForm = new frm_myForm(); For any other control I want to add a handler for, I would do something like this: btnShowForm.Click += new System.EventHandler(btnShowForm_Click); ... and create the corresponding function. I applied similar logic to my form instance but it doesn't seem to work that way. (myForm.Closed += new blah blah). Am I missing a key concept here? It seems like this would be functionality used all the time so I fear I'm being dense and not seeing the big picture. Any advice is appreciated... Alan

    C# question help

  • DataGridView DoubleClick Event handler fails when CTRL key is held while DoubleClicking
    A alanteigne

    Ok, figured it out. When I doubleclick on a row while holding CTRL, the dialog selects the row on the first click, but deselects it on the second. The DoubleClick eventhandler fires, references the selected row, and fails as none are selected.

    C# database help question

  • DataGridView DoubleClick Event handler fails when CTRL key is held while DoubleClicking
    A alanteigne

    I think it may have something to do with the index being cell based rather than row based if I hold CTRL. CTRL modifies selection in Windows (as in selecting multiple files at once, or multiple listbox lines at once).

    C# database help question

  • DataGridView DoubleClick Event handler fails when CTRL key is held while DoubleClicking
    A alanteigne

    Hello, I have a DataGridView that is dynamically populated and configured for row select, multiselect = no. When a row is double clicked, an event handler is fired which runs a function based on the Row index. The row index is referenced as follows: myDgv.SelectedRows[0].Cells[2].Value.ToString() This works great, until the user is holding the CTRL key while double clicking. I get an "index out of range error", making me think holding the CTRL key changes the value the above code returns. Has anyone ran into this before? I'm not sure what to do, other than catch the error and fail the event. Any ideas are appreciated! Thanks, Alan

    C# database help question

  • Store a pointer in a DataGridView cell? (or other method of referencing a pointer) [modified]
    A alanteigne

    Holy cow man! _hWnd = new IntPtr(int.Parse(dgvTaskList.SelectedRows[0].Cells[2].Value.ToString())); ..worked. Thanks!

    C# css help question

  • Store a pointer in a DataGridView cell? (or other method of referencing a pointer) [modified]
    A alanteigne

    Hello, I'm writing a ALT+TAB-ish app that pops up due to a hotkey. It currently displays a list of currently running applications (using EnumWindows & GetWindowText) as a row in a DataGridView and I've created a event handler to run when a row is double clicked on. I'm hoping to use SetForeGroundWindow from User32.dll to bring the selected app to the front. This requires a pointer (IntPtr) to be passed, which I have available when populating my grid, but I can't see to keep around in IntPtr format. When I assign the IntPtr to a cell value, and then try to recast it as a pointer again, it bombs: _hWnd = (IntPtr)dgvTaskList.SelectedRows[0].Cells[2].Value; SetForegroundWindow(_hWnd); I need to either A) store a raw IntPtr in a cell (not as a string) B) be able to convert the string back to a ptr C) something else entirely that I'm not thinking of I'm open to any help or suggestions from my code project peers... Thanks! -- modified at 12:13 Tuesday 27th November, 2007

    C# css help 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