Click here to Skip to main content
14,266,113 members

Comments by Nish Nishant (Top 200 by date)

Nish Nishant 19-Feb-18 10:22am View
   
Oops, you are right. I'll edit it :-)
Nish Nishant 4-Dec-17 13:09pm View
   
Wow, that comment was from 2010 :-)
Nish Nishant 17-Aug-12 11:23am View
   
No problem.
Nish Nishant 17-Aug-12 10:42am View
   
See http://www.codeproject.com/Articles/62934/Many-to-One-Local-IPC-using-WCF-and-NetNamedPipeBi
Nish Nishant 14-Aug-12 13:46pm View
   
I just verified that it works as expected in Windows 7 64 bit using VC++ 2010.
Nish Nishant 14-Aug-12 13:36pm View
   
--- It's called a loop.

Come now, Richard. Poor comment given the OP's requirement.
Nish Nishant 14-Aug-12 9:01am View
   
No problem, you are welcome.
Nish Nishant 13-Aug-12 16:18pm View
   
Hey SA, he means a form (Winforms project). And as far as I can tell, I've told him what he needed below.
Nish Nishant 13-Aug-12 16:17pm View
   
Baskaran, your question has been answered, right?
Nish Nishant 13-Aug-12 13:55pm View
   
No problem.
Nish Nishant 13-Aug-12 13:49pm View
   
I guess it should be the same approach. Your 2 top-level forms should both be marked as mdi forms. That allows them to contain child forms.
Nish Nishant 18-Nov-11 14:11pm View
   
VS 2010 has a drop down to set this. Can also be done from the properties dialog.
Nish Nishant 18-Nov-11 12:47pm View
   
Compile the app explicitly as 32 bit (or 64 bit as the case might be) to match the targe OS.
Nish Nishant 18-Nov-11 11:21am View
   
You are releasing a debug-mode binary. You need to make a release-mode build and then distribute those files (/bin/release). The debug mode binaries are only meant for dev/debug/test work.
Nish Nishant 18-Nov-11 11:10am View
   
That's possible. I'd not have installed a dev preview on a regular dev machine (I usually use a VM for that).
Nish Nishant 18-Nov-11 11:07am View
   
Ok, good luck then. It may be a corrupt installation.
Nish Nishant 17-Nov-11 19:01pm View
   
I agree. Based on the curent version of the question, whether data is not found or whether data exists, he wants to show an error message box. So he might as well skip the DB query and just show a messagebox.
Nish Nishant 17-Nov-11 15:49pm View
   
Use a free email client, set it up to use your mail server, and try to send a few emails out. This will tell you if the problem is with your mail server/config.
Nish Nishant 17-Nov-11 13:46pm View
   
Good detailed response. My 5.

Needs a bit of formatting though.
Nish Nishant 17-Nov-11 11:45am View
   
Since that's a new question/topic, I'd suggest that you start a new thread for that. Keeping track of opened files in your application.
Nish Nishant 17-Nov-11 10:54am View
   
Yes it can handle non-empty folders. The call will fail if a file is in use (same as when you delete from Explorer)
Nish Nishant 17-Nov-11 10:51am View
   
The form that contains the PictureBox control. I don't have any sample code right now.
Nish Nishant 17-Nov-11 10:37am View
   
Good answer. My 5!
Nish Nishant 16-Nov-11 14:28pm View
   
Thanks SA!
Nish Nishant 15-Nov-11 18:17pm View
   
SA, he says he is using Winforms.
Nish Nishant 10-Nov-11 10:34am View
   
LOL :-)
Nish Nishant 6-Nov-11 16:52pm View
   
I reckon he's already Googled and thinks that we can't give him any Google search keywords that he has not already tried.
Nish Nishant 3-Nov-11 7:48am View
   
You'll need to step through the code that fires the events and see what's causing it to not fire.
Nish Nishant 3-Nov-11 7:47am View
   
Wow, sweet!
Nish Nishant 2-Nov-11 16:37pm View
   
If the event is not firing when it should, it may be because you are using the component incorrectly or perhaps even a bug in the library. Either way you should probably ask the guys who wrote/sold this component. They'd know best how to resolve this.
Nish Nishant 2-Nov-11 16:25pm View
   
You're welcome.
Nish Nishant 2-Nov-11 12:07pm View
   
Put a breakpoint and trace through the code.
Nish Nishant 2-Nov-11 12:04pm View
   
No, the HTTP headers.
Nish Nishant 2-Nov-11 12:02pm View
   
As an examaple, if computer-A is called MachineA and the user is say John, then on computer-B, you would need to add MachineA\John as an allowed user and set rights accordingly.
Nish Nishant 2-Nov-11 12:02pm View
   
Add the user from computer-A as an user on computer-B. How you do this depends on the OS you are on.
Nish Nishant 1-Nov-11 9:39am View
   
You're welcome.
Nish Nishant 31-Oct-11 16:01pm View
   
No, it will not. Since those are not HWND-controls. The OP must have been mistaken.
Nish Nishant 31-Oct-11 15:51pm View
   
Voted 5. Good alternate technique (Ctrl-A/C).
Nish Nishant 31-Oct-11 15:41pm View
   
Thank you, Espen!
Nish Nishant 31-Oct-11 15:33pm View
   
Voted 5 as well. We posted at the same time I guess.
Nish Nishant 31-Oct-11 15:32pm View
   
Yeah, MSDN is not easy to search huh? :-)
Nish Nishant 31-Oct-11 15:32pm View
   
Interesting link - had not heard of that before. Voted 5!
Nish Nishant 31-Oct-11 15:31pm View
   
Thanks.
Nish Nishant 31-Oct-11 15:11pm View
   
There is no portable approach to these things, since C++ is agnostic of the file system (mostly).
Nish Nishant 31-Oct-11 14:58pm View
   
Check my updated answer.
Nish Nishant 31-Oct-11 14:52pm View
   
It's an out param, so null is fine here.
Nish Nishant 31-Oct-11 14:51pm View
   
Verify that you are passing in the right HWND.
Nish Nishant 31-Oct-11 13:56pm View
   
Interesting!
Nish Nishant 31-Oct-11 13:53pm View
   
You are welcome. Hopefully you got something out of this discussion. I was a little disappointed that I could not help you pinpoint your exact error. Oh well.
Nish Nishant 31-Oct-11 13:51pm View
   
Try opening the log file in a different editor. It may just be a case of Notepad misinterpreting the text as Unicode.
Nish Nishant 31-Oct-11 13:50pm View
   
And since it's a u_long, that'd be 0xffffffff which is 4,294,967,295 (maximum value). So 6-9 digits seem okay to me.
Nish Nishant 31-Oct-11 13:48pm View
   
Based on the TCP header from http://en.wikipedia.org/wiki/Transmission_Control_Protocol, 32 bits.
Nish Nishant 31-Oct-11 13:44pm View
   
Good alternatives. My vote of 5.
Nish Nishant 31-Oct-11 13:44pm View
   
I would consider source code to be a "tool" of sorts too when I refer to it as 3rd party, but you may be right SA :-)
Nish Nishant 31-Oct-11 13:43pm View
   
Yes but my point was that the u_long returned may be corresponding to some arbitrary Unicode character and thus the text file interprets it incorrectly as a character (when it is not).
Nish Nishant 31-Oct-11 13:38pm View
   
It is possible that tcp_header->seq_number is returning an invalid value. And thus ntohl will return some random value too.
Nish Nishant 31-Oct-11 13:34pm View
   
I meant your response was certainly valid. The OP was quite vague in his description.
Nish Nishant 31-Oct-11 13:32pm View
   
Yes it certainly was. I am just better than most people at figuring out what people are trying to say :-)
Nish Nishant 31-Oct-11 13:19pm View
   
Thanks SA!
Nish Nishant 31-Oct-11 13:15pm View
   
The get-method in the property.
Nish Nishant 31-Oct-11 13:11pm View
   
Edited your question so it's easier to understand.
Nish Nishant 31-Oct-11 12:48pm View
   
Unlikely that you can do all of it in C#. You'd need to write a low-level keyboard driver in C. You could then manage that driver from C#.
Nish Nishant 31-Oct-11 12:33pm View
   
I approve and endorse this reply! :-)
Nish Nishant 31-Oct-11 11:58am View
   
Or just edit your OP.
Nish Nishant 31-Oct-11 11:58am View
   
Good idea!
Nish Nishant 31-Oct-11 11:58am View
   
Heh :-)
Nish Nishant 31-Oct-11 11:53am View
   
Voted 5. I endorse and recommend this answer. [I am going to use this as my approval template text from now on]
Nish Nishant 31-Oct-11 11:52am View
   
Ok, this is getting to be like one of those Friday night thriller movies now. No one knows what's going on :-)
Nish Nishant 31-Oct-11 11:51am View
   
I agree, specially if he just has plain text data.
Nish Nishant 31-Oct-11 11:49am View
   
Voted 5. I endorse and recommend this answer. ;-)
Nish Nishant 31-Oct-11 11:47am View
   
I don't get what this has to do with ini files at all.

But see the example code from : http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx
Nish Nishant 31-Oct-11 11:41am View
   
:-) Had some free time while waiting for a big download to finish (images for a project).
Nish Nishant 31-Oct-11 7:36am View
   
Good link, hopefully it will resolve the OP's issue. My vote of 5.
Nish Nishant 31-Oct-11 7:33am View
   
Thanks.
Nish Nishant 31-Oct-11 7:33am View
   
Thanks.
Nish Nishant 29-Oct-11 17:55pm View
   
Not to my knowledge. Try that forum I linked to - that's your best shot.
Nish Nishant 29-Oct-11 17:29pm View
   
If you mean this -> http://www.erain.com/products/zam3d/DefaultPDC.asp

It's a commercial lib, not free. They may have a trial available though - so you may want to check with them directly.
Nish Nishant 29-Oct-11 17:21pm View
   
Try this link : http://windowsclient.net/learn/video.aspx?v=294834
It's a video tutorial that may help you.
Nish Nishant 29-Oct-11 16:49pm View
   
Post about that error in a separate question. I am sure someone here will help you out.
Nish Nishant 29-Oct-11 16:46pm View
   
Thank you!
Nish Nishant 29-Oct-11 10:10am View
   
Comment to OP : You have thanked everyione for their input, but sadly you have not considered following any of the advice. You absolutely need to get a good C++ book and learn some fundamentals before you write any more code. [this is in response to your latest answer which a mod may delete soon]
Nish Nishant 29-Oct-11 10:09am View
   
You have thanked everyione for their input, but sadly you have not considered following any of the advice. You absolutely need to get a good C++ book and learn some fundamentals before you write any more code.
Nish Nishant 28-Oct-11 20:10pm View
   
What I meant is that it's better to rely on data binding here. Because here I've made several assumptions about the Xaml. If you ever change the Xaml in future that code will break. But if you bind to a proeprty then it will continue to work.
Nish Nishant 28-Oct-11 19:20pm View
   
No problem. I should have seen it as an obvious typo, so I need some coffee too I guess :-)
Nish Nishant 28-Oct-11 19:16pm View
   
I assume it was a typo for WebForms. If so, ignore my previous comment.
Nish Nishant 28-Oct-11 19:15pm View
   
Ok you have tagged the question as ASP.NET. Now you state that it's WinForms.
Nish Nishant 27-Oct-11 12:31pm View
   
gcc supports it too. But do check the docs for compatibility:
http://gcc.gnu.org/onlinedocs/gcc/Structure_002dPacking-Pragmas.html
Nish Nishant 27-Oct-11 11:44am View
   
And no. 4! :-)
Nish Nishant 27-Oct-11 11:43am View
   
Dude, 3rd guy to post the same thing :-)
Nish Nishant 27-Oct-11 11:43am View
   
My 5. Nice to have people back your answer up *grin*
Nish Nishant 27-Oct-11 11:43am View
   
Sorry :-)
Nish Nishant 27-Oct-11 10:59am View
   
Thanks.
Nish Nishant 26-Oct-11 12:56pm View
   
Yes, that's exactly how most common password implementations work.
Nish Nishant 26-Oct-11 12:25pm View
   
Password verification is done by hash comparison.
Nish Nishant 26-Oct-11 11:36am View
   
Excellent answer. 5!
Nish Nishant 25-Oct-11 14:36pm View
   
Should not be stored at all except as a hash of some form.
Nish Nishant 25-Oct-11 14:36pm View
   
Thanks SA.
Nish Nishant 25-Oct-11 7:46am View
   
Good alternate solution (what the OP originally wanted). Got my 5!
Nish Nishant 25-Oct-11 7:45am View
   
Thanks SA.
Nish Nishant 10-May-11 12:10pm View
   
Not sure I understand this. If you let the user pick a folder, surely you know the full path for it (including the drive).
Nish Nishant 10-May-11 11:34am View
   
Well, that makes it crazier huh? Although you could do it after the move. See my alternate way.
Nish Nishant 10-May-11 11:33am View
   
There's an alternate way which I'll post as an alternate solution.
Nish Nishant 10-May-11 11:11am View
   
Yeah, check my updated answer.
Nish Nishant 10-May-11 8:22am View
   
Good answer. Voted 5!
Nish Nishant 1-May-11 10:03am View
   
:-)
Nish Nishant 1-May-11 10:00am View
   
Sorry. Corrected! Check again.
Nish Nishant 1-May-11 9:56am View
   
My vote of 5!
Nish Nishant 1-May-11 9:56am View
   
Thanks Tarun!
Nish Nishant 1-May-11 9:27am View
   
Thanks SA!
Nish Nishant 30-Apr-11 17:48pm View
   
Thank you, SA!
Nish Nishant 30-Apr-11 15:58pm View
   
Excellent response. My vote of 5!
Nish Nishant 30-Apr-11 15:42pm View
   
My vote of 5!
Nish Nishant 30-Apr-11 15:42pm View
   
My vote of 5!
Nish Nishant 30-Apr-11 12:54pm View
   
No, not you. I meant Albin. And Krishna is not omnipresent, if so he'd have been there for the WC finals and he clearly wasn't! *grin*
Nish Nishant 30-Apr-11 12:37pm View
   
Dude, you are everywhere huh? SO, CP, and MSDN? :-)
Nish Nishant 30-Apr-11 12:36pm View
   
Good answer, my vote of 5!
Nish Nishant 30-Apr-11 12:36pm View
   
Good answer, my vote of 5!
Nish Nishant 30-Apr-11 12:36pm View
   
Good answer, my vote of 5!
Nish Nishant 30-Apr-11 12:36pm View
   
Good answer, my vote of 5!
Nish Nishant 30-Apr-11 12:35pm View
   
Good answer, my vote of 5!
Nish Nishant 30-Apr-11 12:28pm View
   
My vote of 5, good answer.
Nish Nishant 30-Apr-11 11:03am View
   
No problem.
Nish Nishant 29-Apr-11 22:42pm View
   
My vote of 5.
Nish Nishant 29-Apr-11 9:12am View
   
Thanks!
Nish Nishant 28-Apr-11 17:03pm View
   
Already saw it, voted 5 too. Up to the OP to think of these approaches though.
Nish Nishant 28-Apr-11 17:02pm View
   
:-)
Nish Nishant 28-Apr-11 17:00pm View
   
Voted 5!
Nish Nishant 28-Apr-11 16:30pm View
   
My vote of 5!
Nish Nishant 28-Apr-11 16:25pm View
   
Yeah, and a good book will really help a lot. That said, feel free to ask questions here. It's good to see someone trying stuff out on their own.
Nish Nishant 28-Apr-11 16:24pm View
   
Ok, I am really confused here. That page I linked to clearly shows the function signature as int CALLBACK WinMain( __in HINSTANCE hInstance, __in HINSTANCE hPrevInstance, __in LPSTR lpCmdLine, __in int nCmdShow); but you are using a different signature. Surely you get what I mean here!
Nish Nishant 28-Apr-11 16:23pm View
   
Thanks (comment threading is all messed up)
Nish Nishant 28-Apr-11 16:23pm View
   
Thank you, Albin.
Nish Nishant 28-Apr-11 16:09pm View
   
You're welcome.
Nish Nishant 28-Apr-11 16:07pm View
   
My 5 too.
Nish Nishant 28-Apr-11 16:03pm View
   
Just a dummy function I used in the example. You can declare these globally too, no need to make them locals if you prefer them to be globals.
Nish Nishant 28-Apr-11 15:56pm View
   
Manfred has updated the code to make it more obvious.
Nish Nishant 28-Apr-11 15:55pm View
   
The int z was just an example. You would need to define members based on your scenario.
Nish Nishant 28-Apr-11 15:54pm View
   
In C (not C++) a struct must have at least 1 member.
Nish Nishant 28-Apr-11 15:54pm View
   
My vote of 5!
Nish Nishant 28-Apr-11 15:53pm View
   
My vote of 5!
Nish Nishant 28-Apr-11 15:52pm View
   
My vote of 5!
Nish Nishant 28-Apr-11 15:48pm View
   
My vote of 5!
Nish Nishant 28-Apr-11 15:46pm View
   
My vote of 5! Sometimes this sort of thing just needs to be said!
Nish Nishant 28-Apr-11 15:45pm View
   
My vote of 5!
Nish Nishant 28-Apr-11 15:44pm View
   
My vote of 5!
Nish Nishant 28-Apr-11 15:44pm View
   
My vote of 5!
Nish Nishant 28-Apr-11 15:42pm View
   
Good answer, AS. My vote of 5.
Nish Nishant 28-Apr-11 15:38pm View
   
Ok, I've said this many times in this thread, but your WinMain sigtnature is wrong. Please see http://msdn.microsoft.com/en-us/library/ms633559(v=vs.85).aspx
Nish Nishant 28-Apr-11 15:37pm View
   
My 5 too. Good answer.
Nish Nishant 28-Apr-11 15:36pm View
   
Thank you, SA!
Nish Nishant 28-Apr-11 15:36pm View
   
You're welcome!
Nish Nishant 28-Apr-11 14:50pm View
   
Thanks!
Nish Nishant 28-Apr-11 12:48pm View
   
Yeah, source code has the rest of it but it's probably for VC6. Wrote it a long time ago and never really updated it. Thanks SA!
Nish Nishant 28-Apr-11 12:43pm View
   
:-)
Nish Nishant 28-Apr-11 12:33pm View
   
Heh :-)

Good thing for me, my son's 3. Not old enough to wreck cars :-)
Nish Nishant 28-Apr-11 12:12pm View
   
Thanks Joan.
Nish Nishant 28-Apr-11 12:03pm View
   
Decent response. My vote of 5!
Nish Nishant 28-Apr-11 11:57am View
   
You are welcome!
Nish Nishant 28-Apr-11 11:42am View
   
Thanks SA!
Nish Nishant 28-Apr-11 11:38am View
   
I was just kidding, SA! :-)
Nish Nishant 28-Apr-11 11:35am View
   
Fixed now :-)
Nish Nishant 28-Apr-11 11:35am View
   
I meant your vote of 4 above to Abhinav but your comment was 5 :-) (btw I was just kidding you). And seems you have fixed that now.
Nish Nishant 28-Apr-11 11:24am View
   
Thanks!
Nish Nishant 28-Apr-11 11:09am View
   
I gave you a 5 (a real 5, not an SA-5 which is usually a 4) *grin*
Nish Nishant 28-Apr-11 11:02am View
   
Thank you, Joan.
Nish Nishant 28-Apr-11 11:00am View
   
C#, it's Microsoft Sans Serif, 8.25pt
Nish Nishant 28-Apr-11 10:55am View
   
Voted 5, proposed as answer.
Nish Nishant 28-Apr-11 10:52am View
   
Voted 5 (actually a 5, and not a 4 as some people do) ;-)
Nish Nishant 28-Apr-11 10:51am View
   
>> My 5. <<

His post has a single 4. So you changed your mind? :-)
Nish Nishant 28-Apr-11 9:08am View
   
Thanks Olivier.
Nish Nishant 28-Apr-11 9:07am View
   
Well then when you round back, round back to 4 digits. You cannot get back data that you've lost.
Nish Nishant 28-Apr-11 9:02am View
   
Post your code (just WinMain).
Nish Nishant 28-Apr-11 9:00am View
   
Yeah you'll need separate assemblies that link to specific interop versions. And maybe a common assembly that can then act as the sync-ing point.
Nish Nishant 28-Apr-11 8:57am View
   
Thank you!
Nish Nishant 28-Apr-11 8:09am View
   
If you think your question has been answered, please accept one of the answers in this thread as the accepted answer.
Nish Nishant 28-Apr-11 8:07am View
   
Cool. Good to hear that!
Nish Nishant 28-Apr-11 8:07am View
   
Thanks :-)
Nish Nishant 28-Apr-11 8:06am View
   
You are welcome.
Nish Nishant 28-Apr-11 8:04am View
   
Thanks SA!
Nish Nishant 27-Apr-11 18:36pm View
   
See my alternate answer.
Nish Nishant 27-Apr-11 16:39pm View
   
Corrected again (this time to "use")!
Nish Nishant 27-Apr-11 16:34pm View
   
LOL :-)

BTW I meant "use" not "sure".
Nish Nishant 27-Apr-11 16:21pm View
   
Thanks :-)
Nish Nishant 27-Apr-11 16:06pm View
   
See my updated answer.
Nish Nishant 27-Apr-11 15:41pm View
   
A good lower level approach, but sometimes that's just what's needed. My vote of 5.
Nish Nishant 27-Apr-11 15:33pm View
   
Voted 5.
Nish Nishant 27-Apr-11 15:26pm View
   
Yeah, it would seem that there are no public libraries yet (none that are popular anyway). There are apps that do it but their authors have not revealed their methods :-)
Nish Nishant 27-Apr-11 15:24pm View
   
Good response, voted 5.
Nish Nishant 27-Apr-11 15:10pm View
   
Thank you, Espen!
Nish Nishant 27-Apr-11 8:56am View
   
Well that's wrong. I linked above to the WinMain documentation which shows the correct signature.
Nish Nishant 26-Apr-11 19:58pm View
   
What is your current WinMain signature?
Nish Nishant 26-Apr-11 19:06pm View
   
Use this signature for WinMain:
http://msdn.microsoft.com/en-us/library/ms633559(v=vs.85).aspx
Nish Nishant 26-Apr-11 19:06pm View
   
In your project Linker settings, select Advanced and set Entry Point to wWinMainCRTStartup.
Nish Nishant 26-Apr-11 18:23pm View
   
I went with the most common choice (WinForms). But yes, it's a guess on my part :-)
Nish Nishant 26-Apr-11 18:21pm View
   
Good answer, SA. Voted 5.
Nish Nishant 26-Apr-11 18:20pm View
   
Thank you, SA!
Nish Nishant 26-Apr-11 16:58pm View
   
Decent suggestion, voted 5.
Nish Nishant 26-Apr-11 16:14pm View
   
Glad to hear that, and you are most welcome.
Nish Nishant 26-Apr-11 16:03pm View
   
Thanks Espen!
Nish Nishant 26-Apr-11 15:56pm View
   
I tried that code in VC++ 2010 and compiled as "C" (not C++). Code compiles fine.