|
|
Thank you Vasudevan Deepak Kumar, I would like to create a website using EuroCv. Can you help me to start it?
The web service is here: http://api.eurocv.eu/euroserver.php
contact me by email if you are interested in it.
Best Regards
M.T.
|
|
|
|
|
Before I start, can I just say ARRRRRRRRRGHHHHHHHHHHHH!
Sorry about that, this has been doing my head in.....
I'm using a 3rd party COM object which they tell me returns "a DWORD defined as an unsigned long of four bytes".
According to MSDN, the correct way to represent a DWORD under .Net is as a Unit32 which is not CLS-compliant.
See this: http://msdn2.microsoft.com/en-us/library/ac7ay120.aspx
In one part of thier API, this value is split into 2 values. I am told that...
"The first 16 bits of the long becomes the first short, and the remaining 16 bits become the second short."
I'm not quite sure how to achieve the above.
They have used the operators >> and & in thier sample code. Having looked at their details on MSDN I am still n the dark.
I have addapted a sample and arrived at the following:
ushort argument1 =(ushort)(returnValue & 0xffff);
ushort argument2 =(ushort)(returnValue >> 16);
I am unsure if this is doing what I need, if so perhaps somone could explain what is happenning.
The only other idea I had was to convert the value into bits and then perform the required manipulation.
Any guidance would be much appreciated.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
<br />
ushort argument1 =(ushort)(returnValue & 0xffff);<br />
Returns the lower 16 bits more easily seen when written as
<br />
ushort argument1 =(ushort)(returnValue & 0x0000ffff);<br />
The next statement shifts the bits to the right 16 bits. thus 0xffaaffgg>>16 would then become 0x0000ffaa which is then already masked for you.
File Not Found
|
|
|
|
|
Although I don't really understand it, I thank you for your reply.
From your description however, it appears that it will do just what I need.
I apologise for my ignorance, I even looked up the operator on MSDN:
http://msdn2.microsoft.com/en-us/library/sbf85k1c.aspx
It reads.....
The & operator can function as either a unary or a binary operator.
The unary & operator returns the address of its operand (requires unsafe context).
Binary & operators are predefined for the integral types and bool. For integral types, & computes the logical bitwise AND of its operands.
For bool operands, & computes the logical AND of its operands; that is, the result is true if and only if both its operands are true.
I read that before my original post and unfortunately it makes no more sense to me after reading your reply.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
and Discrete Math go into the topics at depth. Basically 0xF is the hex representation of 1111 in binary (15 in decimal). 1111b (b for binary) << 4 = 11110000b which is 0xF0 in hex. 0xF0 | 0x0F = 0xFF (bitwise or), 0xF0 & 0xF0 = 0x00 (bitwise and). Also 0x0f & 0x01 = 0x01 (bitwise and)
I really can't go into it further because it can get fairly immense.
File Not Found
|
|
|
|
|
Thats a great intro, I am familiar with hex but didn't understand how the operator worked.
I will read up on Boolean Algebra and Discrete Math as you suggest. I would like to know more but understand that this is beyond the forum.
Thanks for your guidance.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
Greetings everybody,
I have a nice challenge:
I have a gridview and an objectdatasource on a webpage and I made this gridview invisible.
I need to use this gridview multiple times on one webpage with the same objectdatasource but the values of the parameters of the stored procedure differs from case to case.
I want to use a clone technique or something else to accomplsh this.
I need to use c# code.
Does somebody have a clue how I can accomplish this?
Thanks for every clue.
Greetings Peter Bellen
bellenp@schneider.com
|
|
|
|
|
What's to stop you simply creating the GridView manually rather than using the designer. Refactor that code out into a method called CreateGridView with parameters that allow you to pass through to the stored procedure. Then (I don't know the Web Forms equivalent) you can call:
this.Controls.Add(this.CreateGridView(paramater1, parameter2, ...));
this.Controls.Add(this.CreateGridView(parameter2, parameter3, ...));
|
|
|
|
|
I got some problem about send multiple parameter to crystal report. I already create parameter field with allow multiple value option, but when I look into preview windows in crystal report program. It'll prompt me to put multiple value, which is right, but when I entered two value, it only show me for one value. Ex, I entered "test1" and "test2" values, but in preview I only can see "test1". Please give me some guide!!!! thank you
|
|
|
|
|
Hello everyone,
I am working on an Windows Application writen in C# which gets connected to a remote Database server. I am trying to get the IP address of the use once they get connected to the database.
I am using the following code for getting the IP address:
string strHostAddress = "";
IPAddress[] addresslist = Dns.GetHostAddresses(strHostAddress);
foreach (IPAddress theAddress in addresslist)
{
MessageBox.Show(theAddress.ToString());
}
It works fine but the code returns the enternal IP address since my computer is sitting behind a routher.
I was wondering if it is possible to get the external IP address?
Thank you very much and have a great day.
Khoramdin
-- modified at 18:32 Monday 19th March, 2007
|
|
|
|
|
How about using an external service such as whatsmyip.org[^] to find out the router's IP address. Not to overload those servers it isn't to difficult to create a simple script or web page that you can host yourself to return the IP address of the computer making the connection.
|
|
|
|
|
Hello Ed,
Thanx for the info. I have spent a good deal to time and trying everything and it seems your suggestion is the only way to go about this.
Just wanted to say thank you and have a great day, mate.
Khoramdin
|
|
|
|
|
I would like to know what the recommended max length for a filename/path for Windows XP is...if there is one?
-- Thanks!
|
|
|
|
|
|
Thanks for the link. I am at work and did not have the time to research that. Once again thank you and "yes" that is the information I was looking for.
--cheers
|
|
|
|
|
Hi,
I have a main form.
I then want to have a second form which only asks me for a URL.
I call the second form within the main form in the following way:
<br />
URL u = new URL();<br />
u.ShowDialog();<br />
Once i done everything i have to do in the second form i want to click ok and return:
<br />
private void btnOk_Click(object sender, EventArgs e)<br />
{<br />
bool valid = true;<br />
try<br />
{<br />
Uri url = new Uri(tbAddress.Text);<br />
valid = true;<br />
}<br />
catch (Exception error)<br />
{<br />
MessageBox.Show(error.Message);<br />
valid = false;<br />
}<br />
<br />
if (valid)<br />
{<br />
MessageBox.Show("URL is valid!");<br />
this.host.Valid<br />
}<br />
<br />
}<br />
How can i retrieve the value of the second form in the sequence of its call?
Thx,
Nuno
|
|
|
|
|
You can make a public property in the URL form that exposes the Uri
Like:
1- add private variable:
Uri url = null;
2- property accessor:
public Uri SelectedUri
{
get
{
return this._url;
}
}
and change this line:
Uri url = new Uri(tbAddress.Text);
to:
this._url=new Uri(tbAddress.Text);
in the parent form, read the property:
URL u = new URL();
u.ShowDialog();
Uri url=u.SelectedUri
|
|
|
|
|
Expose a Property on this second form that holds the Uri that you saved, but let fall out of scope in this code:
bool valid = true;
try
{
Uri url = new Uri(tbAddress.Text);
valid = true;
}
All of these variables get created and set, then drop out of scope before your main form gets a chance to pick this data up. Create a Property on your form when when the user clicks OK, you set the property to the Uri, then set the DialogResult to OK and dismiss your form. Then the main form can check the DialogResult of your second form and, if OK, can pick up the value of that property.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
The easiest way is by making the textbox or whatever data you want to retrieve from this form public. After the ShowDialog method, the values will still be present, and you can just access them (because you made them public). For UI controls you can use the 'modifiers' in the properties window.
-edit: sorry, didn't see the other replies. They're more detailed.
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
One simple question:
How can i tell to a button which is meant to be a OK button, to be pressed when I hit enter?
Thx,
Nuno
|
|
|
|
|
by making it the forms' AcceptButton.
Go to your form, and change the AcceptButton property to your OK button. The function does more than just close your window, so look it up before you start using it fully.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Thx people!
Your replies were very usefull!
Thx,
Nuno
|
|
|
|
|
Sorry for my bad English!
I don't know how to communicate between forms and classes.
At start i have a form form1. From here i create an instance of a class for networking und communication with a server. After couple of hours i found out how i can change elements of form1 from the network class (with referencing). But, what is when i go back to form1 and create with a button a new class of (for example) database. How can I communicate with previously created network class AND change propertys in form1?
In Visual Basic it is very easy, but c++ and c#...
Thank you very much!
waldi
|
|
|
|
|
I did not understand the question
If you believe that it's easier in vb, Please post the vb code that makes the same functionality (or a similar one) and let us convert it to C#.
|
|
|
|