|
And don't cross post in multiple forums. It's rude and makes it very difficult for multiple people to collaborate on a solution.
|
|
|
|
|
hi ,
im currently working on a project (C#) that demends to have a minimal support of updating the current currency rates and give a minimal ability to convert from diferent curency for example
the dolar today worth 4.13 israel new shekel conversion was USD -> ILS
so i thought to my self theres probably tons of free web services which support that kind of action , but after i was googling and searching thecodeproject i found that there are only a few webservices for that matter that are free and all the servers that i have found which support these web services seems to be down ex: http://www.xmethods.com , also i found some articles in thecodeproject which present nice solutions for this problem
but none of them had currency rates for Israeli new shekel which is the main currency i need to work with or they were too complex for such a small thing
(a solution that involves registering to a daily email list of a certain site
which provide you updated currency rates , then use POP3 track the email , analize its content.....)
so im asking for your advice, which technique should i use to get updated currency rates into my program? is there any code out there for that?
are there any reliable servers that support these webservices free that you know of?
any other information regard this problem is more than welcome!
thanks
Net
|
|
|
|
|
udikantz wrote: is there any code out there for that?
Absolutely! See this[^] article.
/ravi
|
|
|
|
|
thanks for the article ,
i will play with your source and samples.
although i was thinking about something that is more specific about currencies cause i realy didnt want to spend time on coding convertors and ect....
but looks like i'll have to do something about it :P
so thanks man
"'1=1--
|
|
|
|
|
The WebResourceProvider framework is pretty powerful (and easy to use), imho. Here are a couple of real world examples that are very popular:/ravi
|
|
|
|
|
I have a table in sql that is have to be filled from a text box how it could be done
SAS
|
|
|
|
|
Use a funnel.
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
whats this i need the code
sas
|
|
|
|
|
This can be done by any of about a half dozen methods. None of which we, or anyone else, will write for you.
YOu've got a bunch of research to do. Here...start reading[^].
|
|
|
|
|
I am pretty new to C#, but have done OO programming for a long time. According to the docs, the function I am calling ( IWebBrowser2.Refresh() ) includes "S_OK" as one of its return codes. This is a new one to me, as I am used to numerical or boolean return codes, but not this.
Anyway, I attempted (and failed ) at
<br />
<br />
while (webBrowser.Refresh() == S_OK )<br />
{<br />
System.Threading.Thread.Sleep(refreshInterval * 1000);<br />
<br />
}<br />
But I get the error message "The name 'S_OK' does not exist in the current context" . So, how do I get it to exist?
Thank You.
John Gooch
|
|
|
|
|
Try this:
VSConstants.S_OK
|
|
|
|
|
S_OK is a constant defined in the C++ header files in the Platform SDK. It IS a numerical return code. It's defined in the WinError.h file as:
#define S_OK ((HRESULT)0x00000000L)
which translates, in your code, to 0.
|
|
|
|
|
Alright. 0 will work, but I would think that I could include a file or reference that has all of the standard constants defined. So, using Microsoft Visual Studio 2005 Professional Edition, and knowing that I am programming in C#, how would I include the reference that contains these constants?
John Gooch
|
|
|
|
|
You don't. You rewrite them.
All of the constants in the Platform SDK are contained in about 700+ header files. In a C++ app, you start the process of importing a good chunk of them with #include <windows.h> , which has #includes for more, and those have includes, for more, ... But, those #include statements only work in a C++ compiler, not C#.
You cannot use C/C++ code in a C# app.
|
|
|
|
|
Hi,
I'm very new to C# and .NET so sorry if this question sounds really stupid, but how could I get a handle (or pointer) to a brush object in C#.
I'm trying to use gdi32.dll's FrameRgn to add a frame to an irregular borderless form. One of the parameters to the method is a brush handle. I've googled this but I could only see VB.NET examples of codes using FrameRgn.
Thanks to anyone who can help.
|
|
|
|
|
You do exactly as they do in VB.NET. The entire framework is the same, it's just the language syntax that differs.
---
single minded; short sighted; long gone;
|
|
|
|
|
Ha ha ha... I read your response before having breakfast
I should have clarified my question:
The VB example I saw has this line:
Dim hBrush As Long
hBrush = CreateHatchBrush(HS_DIAGCROSS, RGB(0, 255, 0))
I could not find CreateAnyTypeOfBrush in the VS HelpIndex nor the Object Browser. Which namespace/dll/assembly does this method belong to? Or should I use a similar/different method in C#. The website I saw the above example from tells you to buy a book to get more info on the above example.
I already inserted System.Runtime.InteropServices in my using statements (based on another website I saw).
I could not translate the above code to C#. I already have been able to import the FrameRgn method from gdi32.dll, but I'm stuck with the above line of code. Please help, anybody. Thanks very much
-- modified at 21:55 Thursday 20th September, 2007
|
|
|
|
|
CreateHatchBrush is a GDI method:
MSDN Library: CreateHatchBrush[^]
A search on pinvoke.net[^] gave this declaration:
static extern IntPtr CreateHatchBrush(int fnStyle, uint clrref);
A search for "C# CreateHatchBrush"[^] gave a page as the first hit containing this code:
[DllImport("gdi32")]<br />
public static extern int CreateHatchBrush(int nIndex, int crColor)
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks Guffa.
I should have known the method is from the same dll.
But when I added the methods and passed the value returned by CreateSolidBrush to FrameRgn, it still wasn't drawing the border. I'm passing the right values to CreateSolidBrush but I think I'm passing some wrong info to FrameRgn.
I didn't want to spend anymore time on it. So I decided to just draw the border myself using the same graphicspath I'm using to clip the region. I just used a slightly thick pen so it still shows after the clipping. Simpler and less hassle.
Cheers.
|
|
|
|
|
hi,
It would be quite an important thing for the user to get the data back in the order as it appears in the datagridview. rows of data are got from other gridviews (user clicks on other grids' rows and rows are copied to the gridview in question)
so... no problem until user adds rows from the beginning(0 rows), and then saves his data, but:
if user add rows the deletes rows then adds the same row again and save, the newly added row appears the first, however it was added the last. (BindingSource.Endedit is called each operation)
any idea?? I also tried the BindingSource.ResetBindings() method, but that didn't helped.
for saving tableadapter.update() is called.
thx, g
|
|
|
|
|
Did you know that databases do not care about the order of records in a table?? Unless told otherwise with a ORDER BY clause, a SELECT statement can return records in any order.
About the only way to accomplish this would be to give each record in the table an index number specifying which row in the view it is in. When you write the data back out to the database, you'd have to include this view order number with the data and store it in it's own column in the table. When you retrieve the data again, you'd have to specify and ORDER BY clause on that view order column in the SELECT statement, thereby guaranteeing that you get a table sorted in the order the user last saw it.
|
|
|
|
|
thx that gives me the idea....
now only 1 question left.for the accomplish of the above is it OK to have an [int-increment 1 ] identity (primary key)column for this?
|
|
|
|
|
Each record is going to need it's own identity, yes, but it's useless in the row order because your users can rearrange the rows. You'd actually need BOTH colums, one for an ID key and the other for the row position in the view.
|
|
|
|
|
Thanks Dave
problem solved
|
|
|
|
|