15,799,491 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Python questions
View PHP questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Ravi Bhavnani (Top 200 by date)
Ravi Bhavnani
13-Jul-23 19:58pm
View
Me too. It's now part of my team's coding guidelines.
Ravi Bhavnani
8-Nov-22 19:21pm
View
I'm willing to bet step B.3 is incorrect (or incorrectly copied by you). Read it and see if it makes sense to you.
Ravi Bhavnani
17-Nov-21 13:10pm
View
...or write your own. :)
http://frasergreenroyd.com/mouse-jiggle-tool-create-your-own-in-c/
/ravi
Ravi Bhavnani
13-Sep-21 1:36am
View
Brilliant! +5
/ravi
Ravi Bhavnani
10-Feb-21 17:12pm
View
Ha ha, me too! :)
/ravi
Ravi Bhavnani
10-Feb-21 15:40pm
View
Thanks for this, Rick! I remember old-school drooling over these years ago. :)
/ravi
Ravi Bhavnani
29-Oct-20 12:22pm
View
Does this SO answer help?
https://stackoverflow.com/questions/21829442/set-cookies-to-webview-control
--Ravi
Ravi Bhavnani
25-Oct-20 10:57am
View
Thanks for the clarification. I guess the app would become backgrounded only when the activity's state is "stopped".
/ravi
Ravi Bhavnani
24-Oct-20 10:46am
View
I thought a BGW that was initiated by the app's UI won't execute when the app is backgrounded, although a Service would continue to execute. Perhaps I'm mistaken?
/ravi
Ravi Bhavnani
23-Oct-20 18:43pm
View
I think the OP wants code to run when the app is backgrounded, which I believe is different from BackgroundWorker (which runs code in a thread other than the main UI thread).
/ravi
Ravi Bhavnani
13-Oct-20 20:05pm
View
See http://voicerss.org/. You may want to ask them to add a Farsi voice - the quality of their service is excellent (IMHO).
/ravi
Ravi Bhavnani
12-Jul-20 23:40pm
View
> any like-minded developers that want to collaborate on a project I am working on
> I am trying not too give too much away as I don't want other people stealing my idea
Then you're not looking for someone to collaborate on a project. You're looking for someone to implement your idea. And this is both the wrong forum and the wrong site to ask that question.
/ravi
Ravi Bhavnani
5-May-20 18:21pm
View
> I am programming for few months.
Wait until you've been programming for 35 years. You'll eventually learn that in this field you have to figure out things for yourself. Software engineering isn't an activity like painting fences or making toast (with no offense to fence painters and makers of toast). It's not something you pick up in short order by watching a video or reading a few articles on a website.
/ravi
Ravi Bhavnani
14-Apr-20 13:26pm
View
Mark, by "print" do you mean "output to the console"? If so, see Console.WriteLine().
/ravi
Ravi Bhavnani
22-Jul-19 16:44pm
View
John's code works amazingly well. He's also very quick to respond to questions.
/ravi
Ravi Bhavnani
5-Jun-19 22:12pm
View
Yes, I just realized my error! Thx!
/ravi
Ravi Bhavnani
5-Jun-19 22:11pm
View
Oh, I see what you mean. Yes, my assumption is wrong. It seems (by your experiment) that the value returned from Bar() is cached by the CLR for the purpose of executing the multiple assignment. Thanks for pointing that out.
/ravi
Ravi Bhavnani
5-Jun-19 22:10pm
View
My point was that in the case of the OP's question, it's cheaper to initialize the Text property of the 2 controls to string.Empty rather than getting the Text property of the first one in order to use as the value of the 2nd control. Unless I'm mistaken, the Text accessor calls SendMessage (hWnd, WM_GETTEXT) under the covers. It would be cheaper to instead use the constant string.Empty.
/ravi
Ravi Bhavnani
4-Jun-19 16:11pm
View
Actually there is a difference in performance when it comes to non-primitive types. Chaining assignments is not recommended when the value accessor performs an expensive (or non-zero effort) operation. For this reason (in the case of what the OP asked), it's better to do:
TextBox2.Text = string.Empty;
TextBox3.Text = string.Empty;
rather than TextBox2.Text = TextBox3.Text = string.Empty;
/ravi
Ravi Bhavnani
28-Apr-19 13:20pm
View
Use Fiddler to see if other headers need to be sent.
/ravi
Ravi Bhavnani
10-Apr-19 17:20pm
View
> is there any datastructure in c# that can store multiple values as valuetypes?
Yes. See Tuple to store 1-8 values.
https://www.tutorialsteacher.com/csharp/csharp-tuple
/ravi
Ravi Bhavnani
6-Apr-19 18:33pm
View
Are you able to download this resource by browsing the NSE website?
/ravi
Ravi Bhavnani
20-Mar-19 16:08pm
View
>"I begin to choose the diseases"
Stop! You choose nothing. Instead, you write a backward chaining inference engine and feed it a collection of rules (data) that you can modify/tweak to improve the accuracy of the system's reasoning.
/ravi
Ravi Bhavnani
19-Mar-19 12:54pm
View
You're welcome! If you find it useful, please accept the solution as an answer, but more importantly, write a CP article on how you used it! :)
/ravi
Ravi Bhavnani
4-Feb-19 13:27pm
View
OK, then go ahead and use a dialog.
My point is, the purpose of the dialog is to indicate the user's choice to the calling form. The calling form should use that information to do whatever it needs to do to its own UI. The dialog shouldn't alter the contents of the calling form.
/ravi
Ravi Bhavnani
15-Nov-18 22:00pm
View
See the answer to this SO question: https://stackoverflow.com/questions/5053501/put-wpf-control-into-a-windows-forms-form
/ravi
Ravi Bhavnani
14-Oct-18 20:44pm
View
Sorry, but what does your question have to do with programming? You *are* aware this is a programming forum, right?
/ravi
Ravi Bhavnani
24-Aug-18 16:36pm
View
All good now? Were you able to get the rename working?
/ravi
Ravi Bhavnani
23-Aug-18 22:51pm
View
Are you specifying correct parameters to File.Move()? IOW, are the old and new filenames fully qualified and valid?
/ravi
Ravi Bhavnani
1-Aug-18 11:59am
View
Please "accept" my solution if it worked for you. This makes it easier for others to find answers to similar questions. Thanks.
/ravi
Ravi Bhavnani
27-Jul-18 13:17pm
View
> I do subscribe to the practice of one class per file, in any language.
Me too. Except for inner classes (where it makes sense to define them in the same file as the parent).
/ravi
Ravi Bhavnani
27-Jul-18 8:54am
View
> It doesn't matter if they are public or not.
Actually it does. :)
/ravi
Ravi Bhavnani
30-Jun-18 14:51pm
View
This doesn't work for Severity.
/ravi
Ravi Bhavnani
16-May-18 18:20pm
View
So you're getting a null ref exception. That should be pretty easy to track down by stepping through the code using the debugger.
/ravi
Ravi Bhavnani
9-May-18 9:48am
View
BTW, @"E:\\Folder1" is not a valid directory name.
/ravi
Ravi Bhavnani
16-Apr-18 12:02pm
View
Sorry, we're not here to do your work. If you have specific question, feel free to ask and we'll do our best to try and help.
/ravi
Ravi Bhavnani
12-Mar-18 15:01pm
View
What have you tried? Where are you having problems? If you're expecting us to write your code for you, you're out of luck. That's not how CodeProject works. If you have a specific question, ask and we'll try to help.
/ravi
Ravi Bhavnani
24-Feb-18 2:29am
View
Re-read my solution.
/ravi
Ravi Bhavnani
23-Dec-17 11:28am
View
"I did not try anything". At least he's honest. :)
/ravi
Ravi Bhavnani
9-Nov-17 23:55pm
View
I was referring to the upcasing requirement.
/ravi
Ravi Bhavnani
9-Nov-17 8:02am
View
You also overlooked the fact that this won't work if the input string is "stephen ricard". :)
/ravi
Ravi Bhavnani
19-Oct-17 6:57am
View
The URL http://api.apixu.com/v1/forecast.xml?key=[KEY]&q=Paris&days=7 returns 7 days for me.
/ravi
Ravi Bhavnani
7-Oct-17 12:55pm
View
Minor typo: missing ")" in "if" condition.
/ravi
Ravi Bhavnani
4-Oct-17 13:04pm
View
See https://www.codeproject.com/Articles/381673/Using-the-RawInput-API-to-Process-MultiTouch-Digit.
/ravi
Ravi Bhavnani
2-Oct-17 21:41pm
View
Your code has (at least) 2 errors. The fix is simple. Try stepping through your code in the debugger and you'll figure out what's wrong.
Hints: (1) Do you ever enter the "body" of the while loop? (2) After you fix error #1, what happens when you arrive at the target node?
/ravi
Ravi Bhavnani
29-Sep-17 23:31pm
View
I think what he wants to do is write a WndProc that will process messages sent to the desktop window. Methinks the only way to do that is by creating a hook.
/ravi
Ravi Bhavnani
11-Sep-17 16:19pm
View
So did you try the sample I uploaded for you?
/ravi
Ravi Bhavnani
9-Sep-17 12:38pm
View
OK, I think I found the problem. Performance tracking of network utilization (a measure of upload and download rates) is specific to a network adapter, not an application (at least I don't know how to obtain the value for a specific app.
I was able to write a small console app that tracks network utilization for all network adapters installed on the system. The app is based on code I founs on SO. You can download the source code from:
http://ravib.com/download/armin.zip
/ravi
Ravi Bhavnani
7-Sep-17 21:56pm
View
You said you didn't modify the code at all, right? Well, of course it won't work - it's looking for an app called CUPC.exe. Did you even take the trouble to read and UNDERSTAND the code? I think not.
/ravi
Ravi Bhavnani
7-Sep-17 18:40pm
View
> i didn't do any changes to get errors
That's good - I understand.
My point is, we can't debug this problem for you. You have debugger and the MSDN docs at your disposal, so please use both. It will be easier for us to help you if you narrow down the issue to a specific problem. But don't expect us to drop everything and test this code for you. Have you browsed Stack Overflow for similar questions? Simply saying "I did what you suggested and it didn't work" is not fair to those who volunteer their time to help you.
/ravi
/ravi
Ravi Bhavnani
7-Sep-17 18:20pm
View
So debug it and determine what's causing the problem. Blind copying and pasting is not the way to write code. If you have a specific question, we'll try to help you. But we're not here to do your work for you. CP is a volunteer site and we all have real jobs that occupy our time.
/ravi
Ravi Bhavnani
7-Sep-17 17:55pm
View
Yes. See this SO post for an example:
https://stackoverflow.com/questions/27396786/how-to-monitor-the-network-bandwidth-usage-of-a-specific-application
/ravi
Ravi Bhavnani
5-Jul-17 9:00am
View
Clearly you're brain damaged, Carlo!
/ravi
Ravi Bhavnani
3-Jul-17 6:00am
View
Try the suggestions at this page and let us know if they helped.
https://stackoverflow.com/questions/704636/sending-email-through-gmail-smtp-server-with-c-sharp
/ravi
Ravi Bhavnani
22-Jun-17 21:54pm
View
From what the Quora thread says, you can't do what you're trying to do.
/ravi
Ravi Bhavnani
22-Jun-17 21:44pm
View
Yes, that's what I thought. See my response 2 comments up.
/ravi
Ravi Bhavnani
22-Jun-17 21:34pm
View
Can you try sleeping the thread for a longer time (e.g. 1 second instead of 100mSec)?
/ravi
Ravi Bhavnani
22-Jun-17 21:27pm
View
Is the Chrome driver displaying a modal window that prevents you from accessing your form? According to this thread, you can't use the Selenium Chrome driver to test a WinForms app.
https://www.quora.com/How-do-I-use-Selenium-Webdriver-inside-Windows-Forms-application
/ravi
Ravi Bhavnani
22-Jun-17 21:21pm
View
Apart from the incorrect loop condition (should be i < 100, not i <= 100), your code seems OK to me. Are you able to cancel the background worker if you comment out the Chrome driver stuff?
/ravi
Ravi Bhavnani
22-Jun-17 20:58pm
View
Deleted
(Replying out of thread because CP is broken)
Have you set the worker's WorkerReportsProgress and WorkerSupportsCancellation properties to true?
/ravi
Ravi Bhavnani
22-Jun-17 20:56pm
View
Have you set the worker's WorkerReportsProgress and WorkerSupportsCancellation properties to true?
/ravi
Ravi Bhavnani
22-Jun-17 20:42pm
View
Please show you construct and setup the background worker.
/ravi
Ravi Bhavnani
18-Jun-17 17:19pm
View
"If I understand the question right"
What question? Screenshot #1 can't be displayed and screenshot #2 is a class hierarchy.
/ravi
Ravi Bhavnani
18-Jun-17 11:45am
View
See my updated answer.
/ravi
Ravi Bhavnani
9-Jun-17 11:37am
View
"I want the source code for the problem described below."
And I want to be rich and famous. Will you help me? No. Nor will we. Life doesn't work that way. If you haven't yet realized that, I hope you soon will.
/ravi
Ravi Bhavnani
17-May-17 12:08pm
View
Nice.
If you're looking for nostalgia, check out my MS-DOS port of CCA at http://ravib.com/adv/
/ravi
Ravi Bhavnani
17-May-17 11:58am
View
Is this an original game or are you writing Collosal Cave Adventure using Unity?
/ravi
Ravi Bhavnani
5-May-17 13:56pm
View
You may find this article interesting: https://www.codeproject.com/Articles/1182854/D-FaceViewer
It shows the complexity of tasks related to image processing.
/ravi
Ravi Bhavnani
5-May-17 13:14pm
View
Minhaj, what you're trying to do is pretty complex and unfortunately can't be explained in a single post. At the very least, you'd need to identify what part of the image represents hair and the hairline, and modify the pixels in that region. If you want to do anything more than change the hair color (e.g. change a hair style, make the hair longer, etc.) it would be a lot harder.
One app that amazes me is the one that simulates aging a face. The logic and techniques behind that blow my mind.
Good luck in your quest. If you find something and are able to build a sample app that does what you want, it would be great if you posted it as a CP article.
/ravi
Ravi Bhavnani
24-Apr-17 21:07pm
View
Wouldn't it have been faster (and easier) to Google that instead of signing up at CodeProject and posting this question?
/ravi
Ravi Bhavnani
24-Apr-17 17:34pm
View
Did you even take a minute to read the stack trace? The error is you're trying to trying to cast an PWR_UI.MediaButton instance to a Windows Forms Button. We don't have enough information to know why you're doing that.
/ravi
Ravi Bhavnani
15-Apr-17 21:21pm
View
> But what if there were no spaces in my textbox
You have to first establish your program's requirements. I assumed you want to identify duplicate WORDS, where a WORD is text separated by one or more spaces. Searching for duplicate segments in an unbroken string is a (much) more complex problem.
So the question I have is, what kind of data is your program supposed to consume?
/ravi
Ravi Bhavnani
15-Apr-17 20:15pm
View
Does your program work correctly with this text: BAND AND BAND? I would expect your program to identify "BAND" as the only duplicate word.
/ravi
Ravi Bhavnani
13-Apr-17 16:31pm
View
Yep, that's what I meant by the handle reference.
/ravi
Ravi Bhavnani
13-Apr-17 13:49pm
View
Are confusing Pascal syntax with C/C++? Did you mean to use * or do you really mean to use a handle reference?
/ravi
Ravi Bhavnani
2-Apr-17 13:30pm
View
(1) How to assign a value to a variable by using expression? in C language
If you truly have no idea how to do this, you need to re-read your programming textbook.
(2) Find average of the two nos without division or ternary operator
One way to do this would be to successively increment(decrement) the smaller(larger) of the two numbers until you converge at a common value, which is the average.
/ravi
Ravi Bhavnani
25-Feb-17 19:46pm
View
I think you can achieve your goal by modelling your logic on the code in this article:
https://www.codeproject.com/Articles/19714/Auto-close-message-box
/ravi
Ravi Bhavnani
25-Feb-17 19:42pm
View
I apologize - I misread OnSetCursor() for SetCursor().
But I'm confused by your desire to show/hide a tooltip window. I thought you wanted to automatically end the dialog when the mouse has been stationary over the dialog for 5 seconds or more?
/ravi
Ravi Bhavnani
25-Feb-17 16:40pm
View
Please don't expect me (or any other CP volunteer) to do your work for you. And if you expect us to send you a custom solution via WhatsApp, you're smoking some really good s---.
Why are you using SetCursor()? The purpose of that method is to set the visual cursor and has nothing to do with determining the position of the cursor. Instead, override CWnd::OnMouseMove() to determine whether the mouse is within the bounds of your dialog. You will need to write additional logic to compute how long the mouse has remained stationary over the dialog in order to determine whether the dialog should be automatically closed.
/ravi
Ravi Bhavnani
21-Feb-17 16:08pm
View
> inherited forms.
Ouch, ouch, ouch. That will rely on your inherited form to have labels with the same name as the parent form. Inheriting UI functionality is fine but inheriting the raw UI is awful due to the restrictions it places on naming. If you want to inherit the form, have your inherited method be generic - i.e. let it accept a Label control as an argument (vs. assuming the child form has a label named "lblFoo").
/ravi
Ravi Bhavnani
16-Feb-17 16:02pm
View
IMHO, your friend is on drugs. Using a goto to go anywhere except to the END of a block is highly not recommended, because that makes it almost impossible to mathematically verify the correctness of the algorithm. I recommend reading this paper: http://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf.
Ravi Bhavnani
14-Oct-16 13:42pm
View
May I ask why you want the text to be different?
/ravi
Ravi Bhavnani
14-Oct-16 12:39pm
View
Does this SO answer help?
http://stackoverflow.com/questions/14213090/compare-two-sound-in-android
/ravi
Ravi Bhavnani
30-Sep-16 16:45pm
View
> I used simple file storage method but it dint help too.
What do you mean by "it didn't help"? What happened? What exactly did you try?
/ravi
Ravi Bhavnani
21-Aug-16 17:21pm
View
See this link: http://www.codeproject.com/Messages/1278604/How-to-get-an-answer-to-your-question.aspx
/ravi
Ravi Bhavnani
11-Aug-16 17:02pm
View
Does the answer at this page help?
http://stackoverflow.com/questions/33556927/design-view-in-aspx-doesnt-load
/ravi
Ravi Bhavnani
23-Jul-16 21:43pm
View
Are you passing your api key? It's required by the track.search API.
/ravi
Ravi Bhavnani
23-Jul-16 16:12pm
View
Of course it's not common, but some apps (like screenshot takers and Task Manager) have a valid reason to always be on top. Note, if 2 apps both have TopMost set, the one that is most recently clicked will be on top of the other one. Of course, a dev could abuse this feature by setting TopMost in a timer event which (unless they have a very good reason) isn't recommended.
> it does not make sense to have a singleton to a modal dialog.
I agree.
/ravi
Ravi Bhavnani
23-Jul-16 16:12pm
View
Deleted
Of course it's not common, but some apps (like screenshot takers and Task Manager) have a valid reason to always be on top. Note, if 2 apps both have TopMost set, the one that is most recently clicked will be on top of the other one. Of course, a dev could abuse this feature by setting TopMost in a timer event which (unless they have a very good reason) isn't recommended.
> it does not make sense to have a singleton to a modal dialog.
I agree.
/ravi
Ravi Bhavnani
23-Jul-16 14:54pm
View
The OP's code seems to imply there's a singleton dialog that is shown when an event occurs in another thread, hence the check for InvokeRequired. The dialog seems to auto-dismiss after a timeout. For this reason, I suggested making the form TopMost (after making it visible) when it needs to be shown.
The TopMost property is the easiest way to ensure an app is "always" visible on the desktop.
/ravi
Ravi Bhavnani
23-Jul-16 12:02pm
View
Try DataFormDlg.Instance.TopMost = true;
/ravi
Ravi Bhavnani
3-May-16 0:16am
View
What you want to do is draw the image in a clipped region. This article and Googling for "win32 draw image" should be more than enough to help you meet your goal:
A Guide to WIN32 Clipping Regions
http://www.codeproject.com/Articles/2095/A-Guide-to-WIN32-Clipping-Regions
/ravi
Ravi Bhavnani
27-Mar-16 10:14am
View
Yes, I know. I was offering a syntactically simpler approach to starting an .exe from your app.
Ravi Bhavnani
26-Mar-16 10:51am
View
I assume you meant "without use of a Windows API". If so, you can use the system() function, but note it's not as efficient as using CreateProcess (on Windows). See https://msdn.microsoft.com/en-us/library/277bwbdz.aspx.
Ravi Bhavnani
8-Feb-16 11:48am
View
Try writing to the event log (or write to a log file) when your app starts up. That will allow you to verify that your app is in fact not starting, vs. crashing right after startup.
/ravi
Ravi Bhavnani
3-Dec-15 13:51pm
View
A DVD rental costs $300!?
/ravi
Ravi Bhavnani
25-Nov-15 8:35am
View
> It is used to ensure that classes implementing the interface have the signature methods
and/or properties :)
/ravi
Ravi Bhavnani
18-Nov-15 18:37pm
View
Does this article help?
http://www.codeproject.com/Articles/4194/Packet-Capture-and-Analayzer
/ravi
Ravi Bhavnani
17-Aug-15 13:58pm
View
Odd - that works for me. :(
/ravi
Ravi Bhavnani
30-Jul-15 12:42pm
View
Agreed - the AutoSixe=False, Anchor and TextAlign=TopCenter is a much nicer way!
Ravi Bhavnani
26-May-15 11:32am
View
If you want to know the cursor position at all times (regardless of over which Control or Form the cursor may or may not be), simply check Cursor.Position in a timer tick handler. The timer can be a child of your app's main Form.
/ravi
Ravi Bhavnani
25-May-15 10:51am
View
What's your question? We're not here to do your homework.
/ravi
Ravi Bhavnani
21-May-15 10:38am
View
What is a "panel" node? What technology are you using? WPF? Silverlight? WinForms? Web?
/ravi
Ravi Bhavnani
15-May-15 14:20pm
View
System.Windows.Forms.ListView
System.Windows.Controls.ListView
System.Web.UI.WebControls.ListView
/ravi
Ravi Bhavnani
23-Apr-15 8:41am
View
> I am trying to code this in C#.Net but did't get success yet,
That's extremely vague. What do you mean by "didn't get success yet"? You need to be specific when seeking assistance. Also, show the code you've tried.
Try the accepted answer on this SO page and see if that helps:
http://stackoverflow.com/questions/5898787/creating-an-epub-file-with-a-zip-library
/ravi
Ravi Bhavnani
21-Apr-15 7:51am
View
Absolutely. My 5 was for the link to more details about the aspect of audio.
/ravi
Ravi Bhavnani
20-Apr-15 20:03pm
View
Good point - 5'd back! :)
/ravi
Ravi Bhavnani
8-Apr-15 10:33am
View
> i don't want unnecessary files.
Filter the notifications. See http://stackoverflow.com/questions/6965184/how-to-set-filter-for-filesystemwatcher-for-multiple-file-types.
/ravi
Ravi Bhavnani
6-Apr-15 14:02pm
View
Gotcha!
/ravi
Ravi Bhavnani
6-Apr-15 13:54pm
View
Hi SA,
By "C# binding" I meant Xamarin offers C# bindings to the Android SDK and allows C# code (e.g. developer defined callbacks) to be invoked by Android callable wrappers. Is this not true?
/ravi
Ravi Bhavnani
6-Apr-15 12:49pm
View
Please see this cool free book on Xamarin Forms by Petzold.
http://developer.xamarin.com/guides/cross-platform/xamarin-forms/creating-mobile-apps-xamarin-forms/
/ravi
Ravi Bhavnani
6-Apr-15 12:47pm
View
Xamarin generates IL which is packaged in the .apk (in the case of Android) and runs on top off Mono. The process of converting IL to a form consumable by Dalvik (and the newer Android VM) is transparent. For all practical purposes, the .apk generated by Xamarin is no different than one generated when building a native app.
IMHO, the nice thing about Xamarin is that it allows me to leverage my C# skills and the .NET framework. Caveat: I still need to know the Android API (which is not hard to pick up) in order to build Android apps. The same applies for iOS.
Edit: Xamarin Forms controls translate to native controls.
/ravi
Ravi Bhavnani
6-Apr-15 12:16pm
View
> Can i write once in Xamarin GUI and run on all 4 platforms including Windows desktop?
No. Windows desktop (WinForms/WPF) is not supported.
Essentially, only UI code written using Xamarin Forms is portable across iOS, Android and Windows Mobile.
/ravi
Ravi Bhavnani
6-Apr-15 12:14pm
View
1) Correct. PCLs are used to build shared business logic.
2) No, everything written in Xamarin is NOT cross platform! Xamarin.IOS is the C# binding to iOS. Xamarin.Android is the C# binding to Android. This allows you to access the standard iOS and Android APIs from C#.
/ravi
Ravi Bhavnani
27-Mar-15 8:39am
View
I use AMFI, MoneyControl and ValueResearchOnline as my sources in this app: http://www.ravib.com/takestock/2/.
/ravi
Ravi Bhavnani
7-Mar-15 20:22pm
View
Sorry, we're not mind readers. We have no idea what you mean by "this program".
And even if we did, do you seriously expect someone to make a video tutorial for you?
/ravi
Ravi Bhavnani
3-Mar-15 14:50pm
View
See this SO link:
http://stackoverflow.com/questions/10122957/iis7-413-request-entity-too-large-uploadreadaheadsize
/ravi
Ravi Bhavnani
3-Mar-15 14:49pm
View
It may be a WCF issue. Try setting "maxReceivedMessageSize" to a larger value.
/ravi
Ravi Bhavnani
2-Mar-15 10:13am
View
Yes. It works with .NET 3.5 (and possibly older versions).
/ravi
Ravi Bhavnani
25-Feb-15 12:48pm
View
Does the answer on this SO page help?
http://stackoverflow.com/questions/25644824/vb-net-invoke-cannot-be-called-on-a-control-until-the-window-handle-has-been-cre
/ravi
Ravi Bhavnani
25-Feb-15 12:12pm
View
Thanks for the correction, SA. +5d.
/ravi
Ravi Bhavnani
25-Feb-15 11:09am
View
I suspect your math may not be correct.
/ravi
Ravi Bhavnani
18-Feb-15 12:32pm
View
You're right, SA. I tagged the question appropriately to help future readers.
/ravi
Ravi Bhavnani
18-Feb-15 12:09pm
View
A ComboBox has 3 diaplay modes - one of them resembles an always open list. Maybe that would suit your needs better?
/ravi
Ravi Bhavnani
18-Feb-15 11:16am
View
> it was not taught to us
That's a terrible attitude. Google it. You won't get far developing software if you don't research and experiment.
/ravi
Ravi Bhavnani
18-Feb-15 11:06am
View
>You will never succeed sending SMS using SMTP.
Unless you use an email to SMS service. :)
/ravi
Ravi Bhavnani
18-Feb-15 10:50am
View
What platform? Web? Desktop (WinForms/WPF)? Silverlight?
/ravi
Ravi Bhavnani
13-Feb-15 23:31pm
View
> How do I write these codes
By opening a book on Java and studying it. And BTW, it's "code", not "codes".
/ravi
Ravi Bhavnani
10-Feb-15 14:11pm
View
You have several options. For starters, see
this
list of articles.
/ravi
Ravi Bhavnani
10-Feb-15 12:32pm
View
It's impossible to answer your question without more detail.
/ravi
Ravi Bhavnani
8-Feb-15 11:22am
View
Sorry, but I find that hard to believe. How would a website be able to check if an email address is indeed valid?
/ravi
Ravi Bhavnani
5-Feb-15 17:59pm
View
Check out Firebase @ https://www.firebase.com/.
/ravi
Ravi Bhavnani
5-Feb-15 17:59pm
View
SA, check out https://www.firebase.com/. (Apologies if you already know about this). I know you're not the OP but thought it might interest you. I'm planning to build a demo and maybe publish it @ CP.
Cheers,
/ravi
Ravi Bhavnani
5-Feb-15 11:38am
View
I expect the Android and Windows Forms apps will both need to communicate with a common server or at the very least, a networked file store that's accessible to both clients. The file store is an error prone and cheesy solution.
/ravi
Ravi Bhavnani
3-Feb-15 23:58pm
View
What have you tried and where exactly are you stuck?
/ravi
Ravi Bhavnani
30-Jan-15 23:07pm
View
Post your program's code so I can see where you've gone wrong.
/ravi
Ravi Bhavnani
30-Jan-15 22:20pm
View
What have you tried and where are you having a problem?
/ravi
Ravi Bhavnani
28-Jan-15 18:27pm
View
You're welcome! :)
/ravi
Ravi Bhavnani
24-Jan-15 0:40am
View
Patrick, you may want to consider using Xamarin Indie edition with Xamarin Studio (instead of VStudio). That's the path I'm likely to follow once I restart working with Xamarin. Like you, I'm interested in Android dev only.
/ravi
Ravi Bhavnani
24-Jan-15 0:36am
View
OG, why use Java when you have a more powerful and elegant language (C#) at your disposal? Use Xamarin Studio (instead of VS) with the Indie license. IMHO, that beats going through the hassle of using and configuring Android Studio or <gasp!> Eclipse and settling for an inferior language.
/ravi
Ravi Bhavnani
14-Jan-15 12:05pm
View
My point is, once an image file has been shown in a PictureBox, the file is locked until the PictureBox is garbage collected (e.g. when your app exits). If you use the suggestion in the link (the link works fine) your file will not be locked. This will allow it to be moved/deleted/renamed.
/ravi
Ravi Bhavnani
14-Jan-15 10:27am
View
The Reports table will have columns:
- ReportId (identity)
- ReportingUserId (FK to User.UserId)
- TargetUserId (FK to User.UserId)
- ReportText (not null)
- TimeCreated
This will let you query the Reports table for reports by/for a specific user and/or reports issued within a certain time frame and/or reports containing specific text.
/ravi
Ravi Bhavnani
14-Jan-15 9:08am
View
No apology needed. We're here to help (if we can).
Cheers,
/ravi
Ravi Bhavnani
6-Jan-15 20:55pm
View
Email me:
(1) a screenshot of SMSS showing the column definitions in your table (i.e. column names and their types)
(2) your C# project containing the Windows Forms app
My email address is ravib(at)ravib(dot)com.
/ravi
Ravi Bhavnani
6-Jan-15 20:20pm
View
Your INSERT statement implies the columns in your table are NAME and PICTURE, but your SELECT statement refers to the column ID. Of them seems incorrect. Fix and retry.
/ravi
Ravi Bhavnani
6-Jan-15 20:07pm
View
I apologize. I was thinking ListView, not ListBox. Sorry.
SelectedItem.ToString() will work if the items in the list box are strings and the string is the format of the picture index (e.g. an integer). It should also work if the ListBox contains integers.
Please confirm this is the case and retry.
/ravi
Ravi Bhavnani
6-Jan-15 19:51pm
View
I'm not surprised. Your query is wrong. Look at my answer again.
/ravi
Ravi Bhavnani
5-Jan-15 23:51pm
View
What have you tried?
/ravi
Ravi Bhavnani
1-Jan-15 20:32pm
View
"its not working"
That doesn't tell me anything.
What happens when you debug the app? Is the query correct? Is the item not found in the database? Is there an exception thrown?
/ravi
Ravi Bhavnani
31-Dec-14 9:54am
View
Gracias, mon ami. And a very happy New Year!
/ravi
Ravi Bhavnani
30-Dec-14 17:55pm
View
Try setting pdfWriter.CloseStream to false. It may be conflicting with the close that will occur when the FileStream fs goes out of scope.
/ravi
Ravi Bhavnani
21-Dec-14 15:58pm
View
I'm pretty sure Kornfeld is right. See this SO question: http://stackoverflow.com/questions/6716183/dllimport-unable-to-load-dll.
/ravi
Ravi Bhavnani
21-Dec-14 13:42pm
View
> How can I do this, independent of programs platform(32b or 64b) that are running?
See the 2nd answer to this SO question:
http://stackoverflow.com/questions/5497064/c-how-to-get-the-full-path-of-running-process
/ravi
Ravi Bhavnani
17-Dec-14 20:42pm
View
Can you assume (or can you require) that Excel is installed on the machine on which your app runs?
/ravi
Ravi Bhavnani
16-Dec-14 15:38pm
View
You may want to check out my DomainWalker example as a starting point - see http://www.codeproject.com/Articles/12710/Domain-Walker.
/ravi
Ravi Bhavnani
4-Dec-14 22:52pm
View
Thank you, Bill-ji!
/ravi
Ravi Bhavnani
4-Dec-14 18:23pm
View
Thanks, SA!
/ravi
Ravi Bhavnani
4-Dec-14 12:14pm
View
Thank you, sir!
/ravi
Ravi Bhavnani
2-Dec-14 13:12pm
View
Because there are 60 (not 100) minutes in an hour. So 15.15 hours is 15hr:09mins not 15hr:15 mins.
/ravi
Ravi Bhavnani
2-Dec-14 12:21pm
View
See my solution.
/ravi
Ravi Bhavnani
2-Dec-14 12:17pm
View
Wrong again. 15.35 hrs + 15.35 hrs = 30.70 hrs, or 30 hrs and 42 minutes, not 31 hrs and 10 minutes.
/ravi
Ravi Bhavnani
2-Dec-14 12:04pm
View
I don't understand your question. 198.70 hours is 198 hrs and 42 minutes, not 198 hours and 10 minutes.
/ravi
Ravi Bhavnani
28-Nov-14 13:21pm
View
I've deleted my solution that recommended setting ShowEffects to true as it didn't help. Apologies for the false lead.
/ravi
Ravi Bhavnani
20-Nov-14 16:13pm
View
+5
Ravi Bhavnani
20-Nov-14 16:13pm
View
+5
Ravi Bhavnani
20-Nov-14 16:12pm
View
+5
Ravi Bhavnani
28-Oct-14 15:03pm
View
> Your wrong assumption is that a and b are zeros.
> This is not true.
> In fact, a and b are either initialized or not.
You're correct - thanks for clearing that up.
/ravi
Ravi Bhavnani
28-Oct-14 13:36pm
View
You're right, Sergey - the code doesn't compile in its current state.
But IMHO, initializing a and b (to get the code to compile) would not really change the values of c and d, as they would "change" from zero to zero, since declaring an int initializes it to Int32.Default. The optimized version of the compileable code would (IMHO) be an empty statement.
/ravi
Ravi Bhavnani
26-Oct-14 12:16pm
View
Would you want all the tools in your toolbox to be hammers? The answer to that question is the same as the answer to your question.
/ravi
Ravi Bhavnani
24-Sep-14 7:59am
View
It's just my coding style to perform explicit initialization, but you're right - it's unnecessary.
/ravi
Ravi Bhavnani
23-Sep-14 12:11pm
View
SA, I think he wants to go in the reverse direction.
/ravi
Ravi Bhavnani
22-Sep-14 14:28pm
View
Thanks, Sergey! :)
/ravi
Ravi Bhavnani
16-Sep-14 12:34pm
View
> how is it possible to create a custom messagebox with desire requirements
See this article: http://www.codeproject.com/Articles/327212/Custom-Message-Box-in-VC
> can you help plzz..??
No. You will have to do your own work. A simple Google search (which I'm going to assume you didn't bother to do) would have revealed the above link.
/ravi
Ravi Bhavnani
16-Sep-14 12:17pm
View
Why are you asking the same question again? Did you not see the replies to your original question?
http://www.codeproject.com/Answers/819140/How-Can-I-Know-Memory-Consumption-In-My-Project?arn=0#answer1
/ravi
Ravi Bhavnani
15-Sep-14 15:10pm
View
You could use a Stopwatch to time code execution. Although the right way to instrument is to use a profiler.
/ravi
Ravi Bhavnani
12-Sep-14 15:52pm
View
Please post representative parts of your code.
/ravi
Ravi Bhavnani
10-Sep-14 11:16am
View
I second Xamarin.
/ravi
Ravi Bhavnani
6-Sep-14 14:31pm
View
Great. Please mark the solution as accepted so that it's easier for others to find.
/ravi
Ravi Bhavnani
6-Sep-14 14:03pm
View
See my 2nd solution.
/ravi
Ravi Bhavnani
6-Sep-14 13:52pm
View
Unformatted code is hard to read. Stay tuned while I post a new solution.
/ravi
Ravi Bhavnani
6-Sep-14 13:51pm
View
Stay tuned...
Ravi Bhavnani
6-Sep-14 9:33am
View
Does Form1 display Form2?
/ravi
Ravi Bhavnani
5-Sep-14 17:01pm
View
What do you mean by that?
/ravi
Ravi Bhavnani
5-Sep-14 9:55am
View
I don't recommend your approach. By creating a static
TextBox
, you're declaring a single instance for all instances of
Form1
, which is clearly incorrect. Instead, create a
TextBox
using the toolbox, and follow the instructions in my solution.
To pass a Form1 reference to Form2, do the following:
(1) Add a public Form1 property to Form2.
(2) When you create an instance of Form2 (from Form1), set the value of that property.
(3) Perform step 3 as mentioned in my solution.
If what I've said doesn't make sense, I recommend you read up on the basics of C# and Windows Forms. That will help you implement your requirements.
/ravi
Ravi Bhavnani
21-Aug-14 16:22pm
View
Oooh this brings back memories of the SCMS feature on my circa 1998 TASCAM DA-20 DAT recorder!
http://en.wikipedia.org/wiki/Serial_Copy_Management_System
/ravi
Ravi Bhavnani
21-Aug-14 16:09pm
View
"A hardcore scanner which will track viruses."
That's an extremely vague requirement.
/ravi
Ravi Bhavnani
19-Aug-14 16:42pm
View
Thanks, Khalid. If you accept the solution, please mark it accepted, making it easier for others to find.
/ravi
Ravi Bhavnani
19-Aug-14 16:28pm
View
You could just define them as constants. See http://stackoverflow.com/questions/2365014/how-to-group-windows-api-constants.
/ravi
Ravi Bhavnani
18-Aug-14 7:46am
View
No, I assumed you would define sndplayer outside the scope of my answer.
The problem is, it's very unlikely that your timer will fire when it's EXACTLY 6:00:00.000 am. For this reason, you should play the sound the first time the time (to the nearest minute only) is 6:00, and then disable the timer.
/ravi
Ravi Bhavnani
25-Jul-14 19:26pm
View
In that case, you'll need to inspect the JavaScript that's injecting the content (most likely by making an AJAX call) into the page and make that call from your webservice to get that data.
I recommend using Fiddler or Chrome's Developer Tools window (press F12 to show it, then press F5 to reload the page and watch the network traffic).
/ravi
Ravi Bhavnani
25-Jul-14 18:47pm
View
Not crazy weird. :) It's possible that's being injected into the DOM by JavaScript.
/ravi
Ravi Bhavnani
25-Jul-14 18:30pm
View
That content should definitely be present in your string, starting at the substring:
<div Style="height:250px; overflow:auto; scrollbar-face-color:blue" >
/ravi
Ravi Bhavnani
25-Jul-14 18:19pm
View
Remember, you won't be able to download content that's injected into the DOM via JavaScript or by making AJAX requests after the page has loaded, by simply making a call to WebClient.DownloadString().
/ravi
Ravi Bhavnani
24-Jul-14 8:23am
View
I've updated my solution with a link to a correct implementation.
/ravi
Ravi Bhavnani
24-Jul-14 8:16am
View
Hi Sergey, no I didn't run the sample project before recommending it as a possible solution. Thanks for the heads up.
/ravi
Ravi Bhavnani
23-Jul-14 11:09am
View
If you find it useful, please accept and rate the solution. This will make it easier for others to find it. Thanks.
/ravi
Ravi Bhavnani
3-Jul-14 12:21pm
View
Not sure 'bout that. (It seems too techy for homework). Methinks it's just a coincidence.
/ravi
Ravi Bhavnani
3-Jul-14 10:33am
View
Seems like a common question today. See http://www.codeproject.com/Answers/792826/How-to-get-the-free-disk-space-of-a-remote-machine.
/ravi
Ravi Bhavnani
8-May-14 7:49am
View
NP - please accept this solution. Thanks,
/ravi
Ravi Bhavnani
7-May-14 19:46pm
View
Does this article help?
http://www.codeproject.com/Articles/14635/Drop-dead-easy-layout-management
Perhaps if you are able to clearly specify your needs I may be able to help more.
/ravi
Show More