Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
AnswerRe: Windows form and filesystem watcher threading issue Pin
Vikram A Punathambekar27-Nov-07 4:41
Vikram A Punathambekar27-Nov-07 4:41 
GeneralRe: Windows form and filesystem watcher threading issue Pin
tsiv27-Nov-07 5:55
tsiv27-Nov-07 5:55 
GeneralRe: Windows form and filesystem watcher threading issue Pin
led mike27-Nov-07 6:02
led mike27-Nov-07 6:02 
GeneralRe: Windows form and filesystem watcher threading issue Pin
tsiv28-Nov-07 0:22
tsiv28-Nov-07 0:22 
GeneralRe: Windows form and filesystem watcher threading issue Pin
led mike28-Nov-07 5:51
led mike28-Nov-07 5:51 
AnswerRe: Windows form and filesystem watcher threading issue Pin
Vikram A Punathambekar27-Nov-07 4:42
Vikram A Punathambekar27-Nov-07 4:42 
AnswerRe: Windows form and filesystem watcher threading issue Pin
Obaid ur Rehman27-Nov-07 4:44
Obaid ur Rehman27-Nov-07 4:44 
QuestionStore a pointer in a DataGridView cell? (or other method of referencing a pointer) [modified] Pin
alanteigne27-Nov-07 4:26
alanteigne27-Nov-07 4:26 
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
AnswerRe: Store a pointer in a DataGridView cell? (or other method of referencing a pointer) Pin
Skippums27-Nov-07 6:38
Skippums27-Nov-07 6:38 
GeneralRe: Store a pointer in a DataGridView cell? (or other method of referencing a pointer) Pin
alanteigne27-Nov-07 7:22
alanteigne27-Nov-07 7:22 
Questionmaybe someone here knows Pin
damianrda27-Nov-07 3:51
damianrda27-Nov-07 3:51 
AnswerRe: maybe someone here knows Pin
leppie27-Nov-07 4:13
leppie27-Nov-07 4:13 
GeneralRe: maybe someone here knows Pin
Vasudevan Deepak Kumar27-Nov-07 4:31
Vasudevan Deepak Kumar27-Nov-07 4:31 
AnswerRe: maybe someone here knows Pin
Vasudevan Deepak Kumar27-Nov-07 4:31
Vasudevan Deepak Kumar27-Nov-07 4:31 
AnswerRe: maybe someone here knows Pin
Obaid ur Rehman27-Nov-07 4:46
Obaid ur Rehman27-Nov-07 4:46 
GeneralRe: maybe someone here knows Pin
damianrda27-Nov-07 5:01
damianrda27-Nov-07 5:01 
Questionhow to know which procces['s] have access to a file Pin
combo_ci27-Nov-07 3:46
combo_ci27-Nov-07 3:46 
AnswerRe: how to know which procces['s] have access to a file Pin
Vasudevan Deepak Kumar27-Nov-07 3:48
Vasudevan Deepak Kumar27-Nov-07 3:48 
GeneralRe: how to know which procces['s] have access to a file Pin
combo_ci27-Nov-07 4:52
combo_ci27-Nov-07 4:52 
GeneralRe: how to know which procces['s] have access to a file Pin
mav.northwind27-Nov-07 8:11
mav.northwind27-Nov-07 8:11 
QuestionUndescriptive "Parameter is not valid." error Pin
Lauulauu27-Nov-07 3:11
Lauulauu27-Nov-07 3:11 
AnswerRe: Undescriptive "Parameter is not valid." error Pin
m@u27-Nov-07 3:43
m@u27-Nov-07 3:43 
GeneralRe: Undescriptive "Parameter is not valid." error Pin
Lauulauu27-Nov-07 3:46
Lauulauu27-Nov-07 3:46 
GeneralRe: Undescriptive "Parameter is not valid." error Pin
m@u27-Nov-07 3:59
m@u27-Nov-07 3:59 
GeneralRe: Undescriptive "Parameter is not valid." error Pin
Lauulauu27-Nov-07 4:09
Lauulauu27-Nov-07 4: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.