|
hi
you can register com objects with regsvr32.exe. pass the full filename as parameter.
after registering, add a reference to your project selecting the com object registered before.
visual studio create a wrapper for the com object and add this wrapper as refernece to the project.
regards
|
|
|
|
|
Dear All,
Sorry i dont where to post these kind of questions.its related to COM and also .net so
i posted in all the forums.
Dear Jeo,
Thanks for your help.When iam registring the COM component using the method which specified.
Iam getting the following errors.
c:\xyz\xyz\COMcomponent.exe was loaded,but the DLLRegisterServer entry point was not found.
c:\xyz\xyz\COMcomponent.exe does not apperas to be a .DLL or .OCX file
Please help me on this.
Thanks and Regards
Veeresh
i want to join this group
|
|
|
|
|
in this case your exe ist not a com object. all com object must contain
DLLRegisterServer and DLLUnregisterServer methods. this methods register/unregister
the com object.
|
|
|
|
|
Hi Jeo,
Thanks a lot for help.I will get COM component and i will register.
Thanks and Regards
Veeresh
i want to join this group
|
|
|
|
|
|
DO NOT CROSSPOST the same question in multiple forums. You spammed about half the forums on the site...
|
|
|
|
|
Dear all,
I would like to know does anyone know how to do it?My idea is create a chart OCX by using GDI+ (c#.net) and use in VB6.
Any help or resources are welcome.
Thanks in advance
cocoonwls
|
|
|
|
|
|
Check out the InterOp toolkit, part of the VB.NET powerpacks. You can easily port this to C#, various examples can be found both here and on Google.
Good luck
|
|
|
|
|
Hi all
I have a project in which I have to communicate with a serial port on a piece of hardware. The hardware connects to a router via a standard Ethernet cable and is assigned an IP address and the serial port has a port number of 49510.
What I am hoping to do is send a string such as "ZOOM;1;0;FF,30,30,00,A2,32,EF;;;" from a remote computer on the network, to the serial port and then to listen for a response. I think this needs to be in TCP/IP format however I'm just new to C# socket programming and not sure how to achieve the end result.
Any help would be greatly appreciated.
|
|
|
|
|
i want to customize the shape of the form , how can i change the shape of the form?
|
|
|
|
|
|
I am using following code to verify whter enterd char is an alphabet.
theAddress.Substring(i,1).ToLower < "a"
The code runs perfectly in vb.net if I use Lcase but fails in c#.net.
The error is:
Error 1 Operator '<' cannot be applied to operands of type 'method group' and 'string'
How else can I do that.The code is in a for loop.
Plz help.I'd be obliged.
|
|
|
|
|
Well the error you are getting is because you missed the () from after the ToLower . It's a method call so you need the brackets. C# isn't like VB, you can't miss out the brackets if you don't pass any parameters.
But your next problem is you can't use '<' to compare two strings. '<' only works on Char data types, not Strings. You could call .ToCharArray() on your string to get it as a character array and pick out the character from the array you want to look at, and then if you use single quotes (') rather than double quotes (") for the 'a' then that will be treated as a character too. But that would be a rather painful way of doing it.
There are built in functions to do this kind of thing. Just do this:
Char.IsLetter(yourString, i);
Simon
|
|
|
|
|
Hi Simon,
I don't have VS in front of me but I think String has a Compare method. String.Compare , right? If so, He can use this method to compare his string instead of converting that into char array.
HisString.Substring(i, 1).ToLower().Compare("a");
I'm not sure if there's any Compare method in String. If there isn't, My apologize
[Edit]
Oh yes, I found that.
HisString.Substring(i, 1).ToLower().Compare("a");
String.Compare(HisString.Substring(i, 1).ToLower(), "a");
Look here[^]
[/Edit]
Life is 5: 3 me, 1 you.
modified on Tuesday, November 18, 2008 4:34 AM
|
|
|
|
|
Simon Stevens wrote: But your next problem is you can't use '<' to compare two strings.
Of course you can. As the string contains a single character, it will even work as expected, but it's not optimal.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
It doesn't work for me. Try this:
class Program
{
static void Main(string[] args)
{
String s1 = "test1";
String s2 = "test2";
if (s1 < s2)
{
}
}
}
I get:
Error: Operator '<' cannot be applied to operands of type 'string' and 'string'
Simon
|
|
|
|
|
My apologies, you are correct.
The string class overloads the == and != operators, but for some reason it does not overload the <, >, <= and >= operators.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
No worries. I probably would have guessed the same as you. I only spotted it because I tried out his code.
Simon
|
|
|
|
|
As Simon pointed out, the error comes from the missing parenthesis.
However, you should not compare strings at all, as you only want to compare a single character at a time. Use the indexer of the string to get the character, use a static method in the char class to make it lower case, and compare it to a char literal:
char.ToLower(theAddress[i]) < 'a'
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello Guffa. Sorry for asking but is it faster than String.Compare(theAddress.Substring(i, 1).ToLower(), "a"); ?
Thanks
Life is 5: 3 me, 1 you.
|
|
|
|
|
Yes, it's faster.
A character value is just a 16 bit value type, much more light-weight than creating string objects.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
I am currently working on a web application (which written in ASP.NET) that requires to submit a message to AS400 system via MQ.
I managed to establish the MQ connection and able to send the message to the MQ request Queue. All the submission I have done so far is submitting a message which containing only english character (alphabets) and it works successfully. But I want also to submit a message which is combination of Traditional Chinese and English characters. How do I passing this message over to MQ and what is the necessary settings that need to be done at my code in order to make sure my message can be interpreted correctly when it received by the other end. Do I need to set codepage at my code? If yes, where do I set it?
Anyone experience in message passing between dot net application and IBM WebSphere MQ and appreciate your help. Thanks.
Regards
|
|
|
|
|
Hello
I'm using the Fill-Method of the SqlDataAdapter. If i'm having two or more columns with the same name, the Adapter adds a numeric suffix to the name. I can't change the SQL's. I know it's not nice...
If i'm having more than one column with the same name, i want to access the last column with the original name.
Here a sample:
string connectionString = string.Format("Data Source={0};Initial Catalog={1};Persist Security Info={2};User ID={3};Password={4};",
"Server", "DB", false, "DBUser", "DBPassword");
SqlConnection conn = new SqlConnection(connectionString);
conn.Open();
SqlCommand sqlCommand = conn.CreateCommand();
sqlCommand.CommandType = CommandType.Text;
sqlCommand.CommandText = @"SELECT 'asd' AS strName, 'asdasd' AS strName, 'asdasdasd' AS strName";
SqlDataAdapter da = new SqlDataAdapter(sqlCommand);
DataTable test = new DataTable();
da.Fill(test);
foreach (DataColumn col in test.Columns)
{
Console.WriteLine(col.ColumnName);
}
Is there any property or something, i can access to get the original name?
Thanks
|
|
|
|
|