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

C#

 
Questionhow to change a row color in a data grid view in c# win application project? Pin
yasi222218-Sep-07 1:22
yasi222218-Sep-07 1:22 
AnswerRe: how to change a row color in a data grid view in c# win application project? Pin
Diana Fernandez18-Sep-07 1:59
Diana Fernandez18-Sep-07 1:59 
AnswerRe: how to change a row color in a data grid view in c# win application project? Pin
ss.mmm18-Sep-07 4:11
ss.mmm18-Sep-07 4:11 
Question[Message Deleted] Pin
jblouir18-Sep-07 0:57
jblouir18-Sep-07 0:57 
AnswerRe: Using Collections in Struct and Raw Serialization DOES work! Pin
jblouir18-Sep-07 1:06
jblouir18-Sep-07 1:06 
AnswerRe: Using Collections in Struct and Raw Serialization DOES work! Pin
Pete O'Hanlon18-Sep-07 1:26
mvePete O'Hanlon18-Sep-07 1:26 
QuestionP-Invoke Gurus Pin
izakfick17-Sep-07 23:57
izakfick17-Sep-07 23:57 
AnswerRe: P-Invoke Gurus Pin
Luc Pattyn18-Sep-07 6:17
sitebuilderLuc Pattyn18-Sep-07 6:17 
Hi,

you will need a couple of P/Invoke operations to call some Win32 functions.
First you need to somehow find the right Window, maybe based on its title;
then ask for the text it contains (give the StringBuilder sufficient initial capacity!).

The following may help you:
[DllImport("user32.dll", CallingConvention=CallingConvention.StdCall)]
public  static extern int EnumWindows(LP_EnumWindowsProc ewp, object lParam); 

public delegate bool LP_EnumWindowsProc(IntPtr hWnd, int lParam);

[DllImport("user32.dll", CallingConvention=CallingConvention.StdCall)]
public  static extern int EnumChildWindows(IntPtr hParent,LP_EnumWindowsProc ewp, int lParam); 

[DllImport("user32.dll", CallingConvention=CallingConvention.StdCall)]
public static extern void GetWindowText(IntPtr hWnd, StringBuilder sb, int capacity);

[DllImport("kernel32.dll", CallingConvention=CallingConvention.StdCall)] 
public static extern int GetLastError();


Good luck!

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


GeneralRe: P-Invoke Gurus Pin
izakfick18-Sep-07 11:27
izakfick18-Sep-07 11:27 
GeneralRe: P-Invoke Gurus Pin
Luc Pattyn18-Sep-07 13:48
sitebuilderLuc Pattyn18-Sep-07 13:48 
QuestionGetting data from the web Pin
ceejeeb17-Sep-07 23:56
ceejeeb17-Sep-07 23:56 
AnswerRe: Getting data from the web Pin
Colin Angus Mackay18-Sep-07 0:51
Colin Angus Mackay18-Sep-07 0:51 
QuestionCommand prompt window is showing every time i build Pin
Support12317-Sep-07 23:54
Support12317-Sep-07 23:54 
AnswerRe: Command prompt window is showing every time i build Pin
Support12318-Sep-07 0:03
Support12318-Sep-07 0:03 
QuestionSimple Question to using a object instance Pin
MarkPhB17-Sep-07 23:37
MarkPhB17-Sep-07 23:37 
GeneralRe: Simple Question to using a object instance Pin
Martin#17-Sep-07 23:48
Martin#17-Sep-07 23:48 
GeneralRe: Simple Question to using a object instance Pin
MarkPhB18-Sep-07 0:19
MarkPhB18-Sep-07 0:19 
GeneralRe: Simple Question to using a object instance Pin
Luc Pattyn18-Sep-07 1:12
sitebuilderLuc Pattyn18-Sep-07 1:12 
GeneralRe: Simple Question to using a object instance Pin
Martin#18-Sep-07 1:25
Martin#18-Sep-07 1:25 
Question[IE Addon] How to create the build-in Javascript object for IE7 Pin
Michael Sync17-Sep-07 23:14
Michael Sync17-Sep-07 23:14 
AnswerRe: [IE Addon] How to create the build-in Javascript object for IE7 Pin
girm18-Sep-07 0:11
girm18-Sep-07 0:11 
GeneralRe: [IE Addon] How to create the build-in Javascript object for IE7 Pin
Michael Sync18-Sep-07 1:22
Michael Sync18-Sep-07 1:22 
GeneralRe: [IE Addon] How to create the build-in Javascript object for IE7 Pin
Pete O'Hanlon18-Sep-07 1:47
mvePete O'Hanlon18-Sep-07 1:47 
GeneralRe: [IE Addon] How to create the build-in Javascript object for IE7 Pin
Michael Sync18-Sep-07 20:16
Michael Sync18-Sep-07 20:16 
GeneralRe: [IE Addon] How to create the build-in Javascript object for IE7 Pin
Pete O'Hanlon18-Sep-07 21:57
mvePete O'Hanlon18-Sep-07 21:57 

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.