|
Colin Angus Mackay wrote: And if you try it for yourself you'll have the answer. If you don't have access to visual studio right now then I don't see what advantage you have in knowing the answer right now.
So what you are saying is that there is never an advantage/use to know anything about anything unless when you need to apply that knowledge in practice?
|
|
|
|
|
akkram wrote: So what you are saying is that there is never an advantage/use to know anything about anything unless when you need to apply that knowledge in practice?
No, I'm saying that the urgency in which you seem to be attempting to gain this current piece of information isn't immediately necessary.
|
|
|
|
|
No, what they're all saying is that if you don't have the skillset to wip up a small test app and test whether this is possible or not and do the research yourself, your career as a developer is over before it even begins.
Being able to do your own research, learn new technologies, testing your hypothesis, ..., are essential skills to surviving in the world of software development.
|
|
|
|
|
akkram wrote: Then I assume that you don't know the answer either and wonder why you even bothered to answer my post.
That doesn't necessarily follow. If you spend sometime round the boards, you will find that people often post questions before they have tried to find the answer for themselves. Something like this is so simple to prove that it is reasonable to assume that you will have to try it for yourself. The forums aren't here for us to do your work for you, or to do your thinking either.
The advice to try it for yourself is good advice. It gets you into the habit of trying things and only coming back once you've run out of things to try or got stuck.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
If, as you admit, you haven't tried to find the answer out for yourself, I'm not sure why you should expect others to give up their time to solve the problem for you.
Paul
|
|
|
|
|
akkram wrote: I would if i could, but at the moment im at work and have no way of testing it.
Use Snippet Compiler[^]
|
|
|
|
|
|
Oh, Mac, there's your problem.
|
|
|
|
|
Nice. This is a new one for me.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
You can't really blame this guy for not wanting to try anything out for himself, it's an extremely easy route to try in life.
I blame it on the parents.
|
|
|
|
|
althamda wrote: I blame it on the parents.
You think they should have exercised some self-restraint?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
One of the greatest things about "software engineering" is that you can try out all sorts of strange things and no matter how bad the result is, you're unlikely to do any real damage to anything.
Never be afraid to just try; we learn more from our mistakes than from getting it right the first time.
|
|
|
|
|
hello
i have a form in c#.net windows application.
in this form a dataset and a table adapter is used.so is a grid.
this form shows a grid that contains the records that are retrieved from a table in my database
how can I change the color of a row in a grid ???????
plz help me
|
|
|
|
|
Try the following code
dgView.Rows[1].DefaultCellStyle.BackColor = Color.Yellow;<br />
dgView.Rows[1].DefaultCellStyle.ForeColor = Color.Black;
Regards,
|
|
|
|
|
|
|
Now if I can only figure out why, and see if there is a method of controlling it.
I bet it has something to do with the byte[] array, since there is always 4 numbers. Either that or its the buffer that comes from said length. If its possible to record either one, and then store that instead in memory then I think I might have a workeable solution.
|
|
|
|
|
Jeremy - please don't start new threads off that detail solutions to recent threads. You've posted multiple times today, so it would seem reasonable that you continue these ideas on the old threads. You may know what this all relates to, but the casual browser doesn't.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi, if anyone could point me in the right direction on how to obtain the actual text from within an editor control of an external application. I'm currently looping through the classes until i find the VSTextEditPane handle, but what now.. How do I read the text. Is there some kind of text buffer one uses and how do i accomplish this? The objective is to read queries from within SQL management studio. Your expertise and suggestions would be appreciated.
Thank you Guru SIR
Izak
|
|
|
|
|
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!
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
|
|
|
|
|
Thx buddy,
I've done all of that already.. The problem lies within me not knowing how to obtain the text or the actual queries that resides withink SQL mng Studio.. I've obtained the handle of the app, then enum through the lot until I struct the VsTextEditPane that is used by Mgnmt studio.. Now what??
There must be some kind of way to use p-invoke to then extract either all text via a sendmessage or the line at which the carret is focussed?? dunno.. A low-level keyboard hook is not my ideal as i'm interrested in the text.. at any point i want to read queries..
Thanks mate
|
|
|
|
|
Hi,
I don't know about database stuff; getting text from a window is what GetWindowText does.
Hope that helps.
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
|
|
|
|
|
I am trying to create a win app that will get UK lottery results from the web and store them in the application. Via regular checking the application will than always be up to date with the results.
What would be the best approach to achieving this?
My first thoughts were to access a rss feed, but ive had no success.
Any ideas welcome.
|
|
|
|
|
You could always read the page and parse it. There is an SGML parser on Code Project I used a while back.
The problem with this approach is that the web page is designed to be human readable so the structure of the HTML may change at the whim of some marketing department somewhere.
|
|
|
|
|
hi.
every time i build the solution, a command prompt window appears (black window). How do i go about not making the window appear. I only want the form to show not the black window too ???
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|