|
hello friends,
i have created a DLL using C# on .net plateform.
i want to use that DLL file in the VB6.0.
how can i do this?
how would i register that DLL without .net plateform, so that i can use that DLL in my project of VB6.0.
Please reply soon...
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
If you created the dll on .NET platform, you will still need to have .net framework installed on the target machine. Here is a sample class that's exposed to COM. You will also need to register the dll with regasm.exe utility found in %windir%\microsoft.net\framework\v1.1.*.
You can use this library in vbscript or vb6 (or any other COM client) simply with:
Set demo = CreateObject("Demo.demo") 'notice the ProgId below
Here is a link with some more explanation: http://www.codeproject.com/dotnet/nettocom.asp?df=100&forumid=14076&exp=0&select=1028513[^]
Imports System.Runtime.InteropServices
Imports System.Text
<guid("e3928d8b-4eca-42c1-81cf-482f1c18b5f7"), interfacetype(cominterfacetype.interfaceisidispatch)=""> _
Public Interface _demo
<dispid(1)> Function GetString(ByVal strString As String) As String
End Interface
<guid("e601fd54-fa5b-4b62-a7ae-abbe701b8626"), _
classinterface(classinterfacetype.none),="" _
progid("demo.demo")=""> Public Class demo
Implements _demo
Public Function GetString(ByVal strString as String) As String Implements _demo.GetString
Return "COM Sample"
End Function
End Class
Enes M
|
|
|
|
|
Some parts of the class got stripped off when i submitted it (because of the < tag), so it won't work. But look at the link above, it has more in depth information.
|
|
|
|
|
Hi
When you want to write your class in C#, try adding a ComClass rather than a simple class. (the ComClass should be availabe in Project>AddNewItem if I remember correctly.
Then make your dll file, C# would register the class for you and then you can simply use your class on your machine using CreateObject.
(to use the class on an other machine, you must first use regasm.exe as told to you.)
Hope it was helpful.
|
|
|
|
|
I have been able to configure IIS thorugh VB.Net. But the problem is :
When I create a virtual directory it creates under "Default Web Site". How can i create a new virtual directory not under "Default Web Site".
I am not been able to assign the Application Name. The Aplication Name is blank. How can i set the application name
And
Not been able to set permission on the web site, only the default permission are set. How can i set permission on the web site
I am using System.DirectoryServices
I've been able to assign the Application Name
but when i try to set permission
VirDir.Properties("AccessWrite").Value = True
It gives me error
|
|
|
|
|
formula=Sum ({@DebitBalance})
Why above function cause error "This field cannot be summarized"
Actually @DebitBalance has value of number. Any ways that i can sum up @debitbalance?
|
|
|
|
|
Is {@DebitBalance} a formula too?
<italic>Work hard, Work effectively.
|
|
|
|
|
yes, inside that is :
if Sum ({Entries.Debit}, {Entries.AccountName})>Sum ({Entries.Credit}, {Entries.AccountName}) then
formula= Sum ({Entries.Debit}, {Entries.AccountName})-Sum ({Entries.Credit}, {Entries.AccountName})
end if
|
|
|
|
|
Although the formula always returns number, I don't think you can sum it. The Crystal Report couldn't recognize it as number. You have to look for another solution.
<italic>Work hard, Work effectively.
|
|
|
|
|
hi all,
i am currently developing a project in which i have to display images in a crystal report from a database . when i am storing the image in bmp format in the database then it works fine but when i am storing it as jpeg format then no image is displayed in the crystal report.
i am using crystal report 7.5 and vb6. i am using stream object to store image data in the database table .
if anyone have any idea please help me to solve this problem.
from
arnab
|
|
|
|
|
hi
i want make a program that must run in LAN, and i programming in vb and do not know if by VB, i can run it in LAN.
if yes,how i can conect it to SQL server data base
Please help me
|
|
|
|
|
daneshmand wrote:
how i can conect it to SQL server data base
using connection string
|
|
|
|
|
Set the the server name or the server ip as the data Source.
<italic>Work hard, Work effectively.
|
|
|
|
|
thanks
please introduction me a website about VB and VB.net and benefits them
|
|
|
|
|
Use google.
<italic>Work hard, Work effectively.
|
|
|
|
|
Better yet, Amazon and get yourself a couple of good books on VB or VB.NET, whichever your using.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If my datagrid is readonly = true.
Then it cannot be modified from inside datagrid but i want to allow deletion of row if 1 or more rows are selected and this is event raised after a button is pressed.
How to code this?
|
|
|
|
|
Is there any free tool that can convert my vb.net forms to asp.net
smita
|
|
|
|
|
|
If your code is well written, you should be able to just write an ASP.NET presentation layer, but as has been said, it's a totally different model, and the way you code it is way too different for a wizard to deal with.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a windows apllication which has flexgrid.This application works fine when it is run from the local hard disk.But when this application is accessed from another computerin the network it gives.System.security.securityexception
Using try catch i found the error was Request failed
What i actually want is deploy my application on one machine and acces it from other machines without deploying on each and every machine
smita
|
|
|
|
|
Why does the flexgrid give a security exception ? Is the error message wrong, and you just need to deploy the grid ? ( Flexgrid isn't a WinForms control, it's an old one, isn't it ? )
smita_roy@insuranceassist.co.in wrote:
What i actually want is deploy my application on one machine and acces it from other machines without deploying on each and every machine
You really can't do that with the presentation part of the code, although you can do it with your data stuff, if you can configure all instances of the app to look to your machine. This means you need to code for concurrency issues, obviously.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all,
I have given an option of deleting a row of a grid by pressing Ctrl-F6
But this key is not working
The same function is getting called by other keys like Ctrl-F7
Since Ctrl-F6 is a windows shortcut key to toggle through windows,so how to disable this key of windows.
Please get me a solution
Thanks in advance
|
|
|
|
|
I am trying to use the ms internet transfer control to download binary files from the internet using the execute statement. I am only using a very basic piece of code as a test, however by using the debugging tools, and stepping through the code one line at a time, the Inet controls statechanged event is not called. The execute statement is
Inet1.Execute URLname, "GET"
I have tried setting the other properties of the inet control to no avail. In addition I thought about adding a piece of code either before or after the code to make sure the inet control is not currently executing, something like
If Inet1.StillExecuting = True then
DoEvents
End If
If anyone has any thoughts on what is going on I would be very appreciative,
Cheers,
Mark
|
|
|
|
|
hello everybody,
can anybody tell me is it possible to implement a peer to peer network between two pocket pc via Wi-Fi?
my meaning is can both of the pocket pc communicate with each other using Wi-Fi? such as IrDA or bluetooth, both pocket pc can send message to and receive message from another pocket pc..
if can, how to implementing it? is it need a server or access point?
|
|
|
|