|
It should be in your references?
"a fool will not learn from a wise man, but a wise man will learn from a fool"
"It is hard to fail, but it is worse never to have tried to succeed." - Theodore Roosevelt
"Success is going from failure to failure without losing your enthusiasm." - Winston Churchill
My Website || My Blog
|
|
|
|
|
Here's how ours is set up:
We have a Solution file, with a number of VB.Net projects in it, and one CS project, which I think was supplied by a vendor as a hotfix.
One of the VB projects has a reference to the CS project, and creates an instance of the component in it.
The project is obviously visible in the Solution Explorer, and also in ObjectBrowser.
Both versions of the component in the CS project show up under the same Namespace in the ObjectBrowser, however one of them has [Runtime = v2.0.50727] annotated after it.
(This may have no bearing on your solution.)
So it looks like you need a solution file, with the CS project added to it, and a reference set to it in the calling VB project.
Hope this helps.
Dave
|
|
|
|
|
charchabil03 wrote: ADD REFERENCE,the DLL was added but i couldnt see the Dll in the Solution Exploere
Adding a reference to the DLL does not make it part of your project/solution. It allows you to import and use the objects in that DLL as COM objects. It's not added to your project.
charchabil03 wrote: thus I coulndt call the DLL
You've made an incorrect assumption. Once you add a reference to the DLL, you either have to Import the namespace(s) that DLL exports or specify the fully qualified name of the object you want to use in your code. For instanceif you added a reference to a COM-based HPortalLib.dll file, and it exported a namespace called HPortalLib, you add an Imports statement to the top of file you want to use it in like this:
Imports System.IO
Imports System.Drawing
Imports System.Text
Imports AxHPortalLib
You would add an Imports statement for the Ax version of the namespace because that would be the .NET Runtime Callable Wrapper around the non-.NET component that you're using.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i AM WRITNG A MULTICAST CHAT APP IN LAN USING TCP IP .
IALSO WANT TO ADD A FILE TRANSFER PART IN WHICH WE CAN TRANFER VIDEO AND AUDIO FILES .I TRIED BUT CUD NOT DO . CUD DO WITH SOME HELP FROM U GUYS
|
|
|
|
|
how are you sending each message over?
i wrote one that uses a class that is serialized sending it to a central "hub" (nt server) that then sends it to the appropriate number of users that belong to the room. otherwise how do you specify who the message is for (which PC does it goto), who it came from, which room does it belong to, etc.
if you use a similar method, then you can specify the name of the file, who sent it to the person, etc. so convert the file into a byte array and send it over with the information in the class and the convert it back to a file on the PCs end.
|
|
|
|
|
Give Me some Code for compressing and saving the image
|
|
|
|
|
In the image box you have sub that saving file. Image.Save(...)
Image compression is big topic that people trying to find ways to do it. The GIF, JPEG, PNG are common formats that developed specially for picture compression.
|
|
|
|
|
I am trying to convert all text in a Rich Text Box to Rot-13. But the code I am using doesn't work. By not working I mean it doesn't convert.
<br />
Dim AllText As String<br />
AllText = RichTextBox.Text<br />
Dim Part As Integer<br />
Part = AllText.IndexOf("a")<br />
Dim FileName As String<br />
FileName = AllText.Replace(Part, "Z")<br />
Dim Part2 As Integer<br />
Part = AllText.LastIndexOf("b")<br />
FileName = AllText.Replace(Part2, "Y")<br />
Any suggestions would be appreciated. Thank you!
|
|
|
|
|
Please define your need.
Do you want to change A to Z, a to z, B to Y, b to y and so on for all the ABC ?
|
|
|
|
|
Yes, I want to convert "A to Z" and "B to Y".
|
|
|
|
|
Try this:
<br />
Dim S As String = RichTextBox.Text<br />
Dim I As Integer<br />
<br />
For I=0 To S2Rot13.Length - 1<br />
If Asc(S(I)) >= Asc("a") AndAlso Asc(S(I)) <= Asc("z") Then <br />
S(I) = Chr(Asc(S(I)) - 32) ' TO UPPER CASE<br />
ElseIf Asc(S(I)) >= Asc("A") AndAlso Asc(S(I)) <= Asc("Z") Then<br />
S(I) = Chr(Asc(S(I)) + 32) ' to lower case<br />
End If<br />
Next I<br />
Instead of going on every letter of the ABC and the abc, we going on the string and check the Ascii code.
This saving time if its string that smaller the 46 characters - instead of running 46 times every call we run as long as the string.
|
|
|
|
|
UltraCoder wrote: Dim Part2 As Integer
Part = AllText.LastIndexOf("b")
FileName = AllText.Replace(Part2, "Y")
Are you sure the code is right? Shouldn't it be
Part2 = AllText.LastIndexOf("b")
Chandra
|
|
|
|
|
Yes, thank you for pointing that out, but it still doesn't work.
Thanks anyway though!
|
|
|
|
|
UltraCoder wrote: Dim AllText As String
AllText = RichTextBox.Text
Dim Part As Integer
Part = AllText.IndexOf("a")
Dim FileName As String
FileName = AllText.Replace(Part, "Z")
Dim Part2 As Integer
Part = AllText.LastIndexOf("b")
FileName = AllText.Replace(Part2, "Y")
Maybe you can try this?
Dim s as String<br />
Dim s1 as String<br />
Dim i as Integer<br />
<br />
s = RichTextBox.Text<br />
For i = Asc("a") To Asc("z")<br />
s = Replace(s, Chr(i), Chr(i - 32)) ' - 32 gives upper case<br />
Next i<br />
s1 = ""<br />
For i = 1 To Len(s)<br />
s1 = s1 & Chr(Asc(Mid(s, i, 1)) + (25 - 2 * (Asc(Mid(s, i, 1)) - 65)))<br />
Next i
Hope this helps
Chandra
|
|
|
|
|
I am using AxWebBrowser in a VB.Net project, the program may run a few days without browser closing. I found serious memory leak, one night the memory usage could be increaced from 500 M to over 2 G. I tested with ANTS Profiler, it shows the class (Namespace SYSTEM, Class name INT32, Module name mscorlib.dll) does not release memory (live count: 40, total number of object created 3,562,977). I tried to use dispose, but it looks do not work.
I really apprecite if someone could help.
Frank
|
|
|
|
|
You'll have to do some more digging into your code. There's something else that your creating, but not Disposing when you're done with it. These include any Graphics objects, Brushes, Pens, anything that holds onto an unmanaged resource, like a Handle, any form that you show using ShowDialog() needs to be Dispose when you done with it, ...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dear all
I would like to have your favor to explaint me how to create a command in VB.net to tell amount in words, for example
1,200.5 will be say as one thousand two hundreds and five cent
Thank you for your attention and your support to me in advance
|
|
|
|
|
Whoa!! Sorry dude, but that's not possible!
|
|
|
|
|
UltraCoder wrote: Whoa!! Sorry dude, but that's not possible!
Anything is possible, it's one's attitude that becomes the limiting factor.
|
|
|
|
|
UltraCoder wrote: Whoa!! Sorry dude, but that's not possible!
Of course it is possible. You just need to think about the problem for a while because the solution is actually quite simple.
|
|
|
|
|
deja vu[^]
are you in the same class as this guy?
PS nobody upset 'UltraCoder' by pointing out that the thread contains a solution of sorts
|
|
|
|
|
Alex@UEA wrote: PS nobody upset 'UltraCoder' by pointing out that the thread contains a solution of sorts
Oops! Sorry, I already told him he was wrong. But I didn't know the solution was already here.
|
|
|
|
|
All you have to do is Google for "convert number to words" and you'll find, literally, thousands of examples of this ubiquitous homework assignment.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello
I am setting a key value in the system registry. However, I would like this removed when the user uninstalls the program.
The method I am using to set it is below:
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\CodeRedInstalled", "ITSolution", "Is Installed")
I have used window installer to install the program. However, when the uninstalls from the add remove program, I would like this key value to be deleted.
Is there anyway to do this?
Many thanks,
Steve
|
|
|
|
|
I need to find the right code for saving some data ont a text file. I need this in my Alarm Clock application. There is an object, Exit buttin, where after clicking on it, all the itmes in a lick box control will be saved onto a text file called AlarmClock.txt. The items in the list box are times entered by a user in the list box. The format of the time is like this in each items of list box: "12:12 PM" or "01:24 AM".
Here are the codes I wrote, but they do not work:
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
FileOpen(1, "..\AlarmClock.txt", OpenMode.Output)
While Not EOF(1)
FileOpen(1, "..\AlarmClock.txt", OpenMode.Output)
For iX = 0 To (Me.lstTime.Items.Count - 1)
PrintLine(1, Me.lstTime.Items(iX))
Next
End While
FileClose(1)
Me.Hide()
End Sub
Thank you,
Vahdat
|
|
|
|