|
"did you try to add the reference in vb.net..."
didn't know you were talking about VB6
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
you missed two words from my quoted sentence "As well" let me put the complete sentence again
did you try to add the reference in vb.net as all
I guess you need a forum for English Grammer as well.
note::: dont miss as well in the above line
Search for that..
|
|
|
|
|
well tried
(ps: if you spoke english better first, there would be no problem of understanding you b****)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
If you do not call a DLL directly in VB6 you do not need to reference the DLL in VB6. If your main DLL requires a second DLL that you never call explicitly, this is not a VB6 problem. Either the DLL is not registered properly if it is a COM DLL, or it is either corrupt, not the correct version, or not installed to the correct location if it is a standard DLL. The first step in solving your problem is to determine if the "missing" DLL is a COM component. If it is, make sure it is registered properly. Beyond that, your information is too vague to be of much use. If it is a third party package, try contacting the people who created it.
Robert
|
|
|
|
|
Thanks for that guys. I guess my vagueness is attributed to the fact that vb6 is not my strong point. Its not a COM DLL. From my understanding there are 2 steps required for using a dll. (1) The declare statement passing arguments byVal and (2) Calling the DLL procedure.
Now Ive done the Declare statement correctly but when I actually call the dll in the code it comes up with a run time error "53": File not found (ss12.dll)
Now what Im assuming is that there must be a way to map a path to this dll? Am I right in assuming this? Once again I thank you all for assisting me with this.
Nic
|
|
|
|
|
Unfortunately calling non-COM dlls is not that simple. ByVal is not a general rule by any means, many if not even most parameters must be passed ByRef. Also, you have to translate some C/C++ types into VB-friendly data types. Many types commonly used in C/C++ can be translated into VB types but not all. There is no guarantee that you can call all functions exposed by a non-COM DLL. Writing proper Declare statements is part experience, part trial and error. Save your work frequently - improperly declared DLL calls can often cause your application to crash.
There are rules that Windows uses to locate DLLs. Generally if you put the DLL in either the application folder or the WinSys folder, it will be found.
Robert
|
|
|
|
|
Hi Robert,
Thank you for your reply. I tried putting the dll in question into the application folder (I assume this is the folder in which the vb project resides in?) - Unfortunately again it says that the dll could not be found.
Now when you say WinSys folder do you mean the system/system32 folder in the windows directory? I tried putting them in both folders but unfortunately again no go - File not found: Run time error 53
Any other thoughts?
|
|
|
|
|
Post the exact name of your DLL, and an example of your declare statement in VB and I will look at it. If you wish you can e-mail me the DLL itself too - rwest_graham@yahoo.com
Robert
|
|
|
|
|
Hi Robert,
Thanks for your help but I actually worked it out. It couldnt find the dll cause the system path did not have the dir to the dll location at all. I put it in and it worked like a treat.
By system path I mean if you go into the properties of my computer and then onto environment variables you can specify the path where dll's are stored and if you do this it works.
Once again I thank you and all who posted for your help. Great help -> Great Forum
Nic
|
|
|
|
|
I am not been able to remove items from the collection
a.Add("s")
a.Add("s")
a.Add("s")
a.Add("s")
a.Add("s")
a.Add("s")
For inti As Integer = 1 To a.Count
a.Remove(inti)
Next
when inti=4 then it gives the error
"collection index must be in the range of 1 to the size of the collection"
why is this happening and how to clear collection. Urgent!!!!!
|
|
|
|
|
When you remove an item from a collection, everything above that index number moves down one. So, in your example, when you removed index 1, the items at 2 and above moved down.
Instead of removing every index, count them and remove the first one every time:
a.Add("s")
a.Add("s")
a.Add("s")
a.Add("s")
a.Add("s")
a.Add("s")
For i As Integer = 1 To a.Count
a.Remove(0)
Next
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
The easiest way to clear a collection is to put a.Clear(). You should always hit the dot and look through the intellisense if you're not sure if a method is supported. Assuming you were actually stepping through trying to remove specific items, step backwards like this ( sorry C# code, I dunno the VB syntax ):
for(int i = a.Count-1;i>=0;--i)
{
if (a[i] == "ThevalueIwanttoREmove")
{
a.RemoveAt(i);
}
}
That way, the indexes that change are all in the range I've already stepped through.
Note also that your loop cannot work, arrays are 0 indexed, not 1 indexed. a(0) is the first element, a(1) is the second.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
sorry C# code, I dunno the VB syntax
you mean this ?
For i As Integer To a.Count - 1 Step -1
If a(i) = "TheValueIwantToRemove" Then
a.RemoveAt(i)
End If
End For
another much apreciated VB code would be :
For each Ob As Abject In a
a.Remove(Ob)
End For
or even better :
a.clear()
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
you mean this ?
Yeah - the step was the part I was not sure of, and I'd prefer to say so than give code that turns out to be syntactically wrong.
toxcct wrote:
a.clear()
Yeah, I did actually point that out as well
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi 2 all
Actually i am developing an Online application, in which I have different users with different user names. Now when they sign in there is no problem to me, but the main problem is that I want to know what would be the code behind the sign out button.
Thanx in advance for helping me.
Bye
Arfan Qadir
|
|
|
|
|
What is the code for signing in?
When sign in, status=1
when sign out, status=0
<italic>Work hard, Work effectively.
|
|
|
|
|
status variable is used for what?
Please try to help me. Please give the idea who i must sign out, so that nobody without login must access that page where i can go only by using my password?
Arfan Qadir
|
|
|
|
|
It's impossible fo us to tell you anything about how to do this because we know nothing of how your authenticating these people and tracking their login/logout.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
can anyone suggest a good and great email component for .net...
currently im using active up trial version...
i can't view the attachments and embedded objects...
please help me... tnx...
|
|
|
|
|
I'm doing my thesis now, I try to make a "Remote Client's Activity with VB" but I have some trouble and I hope anyone can help me, please give me an example of VB program to CONTROL MY CLIENT'S DESKTOP. Thanks for the help.
Help Me Please, I need It Quickly
|
|
|
|
|
Why do you need to do it in VB ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi, I am trying to do the same thing for a local school. I am searching for information now and have a call in to Microsoft. If I find out anything I will let you know. If you find out anything, please let me know.
Thanks
Doug Davis
ddavis@xenotg.net
|
|
|
|
|
Hi all i want a small help in changing the exe icon of the program after i run it
i was writing all my programs with visual c++ 6 and .net and i was able to change the icon of the exe file which is generated after compiling the porgram
i want to know how to make it in the visual basic .net
hope anyone could help me
thanks in advance
byebye for now
Gego
|
|
|
|
|
The Form properties has an "Icon" property that you can use to specify a file with an icon image. You can also compile an image if you use ImageList object which is available from the Toolbar. Following is an example to get image at index 0 from imagelist and set it as an icon:
<br />
Dim bm as Bitmap = New Bitmap(myImageListObject.Images(0))<br />
Me.Icon = Icon.FromHandle(bm.GetHicon())<br />
|
|
|
|