|
Thanx Sir,
i have already study that page completly but not satisfactory answer there.
i searh the google alot but proper use of the functions has not been explained anywhere...
actually i want the threads for copying large file..
i find a dll which is performing the task but author copy the data to the specified location not on mine....
now i am thinking to create a dll file using C# and then use that dll in the VB 6.0
so hopes for the best!
thanx for communicating me....
Bye
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
There are many reasons why you won't find any answers for VB6, but the most common reason is because you can't debug the code you write. If you start a new thread while your application is running under the IDE debugger, you'll crash the IDE immediately. It wasn't written to handle multi-threaded code.
Now, if you have access to Visual Studio.NET and C#, why are you even wasting your time with VB6 in the first place? C# and VB.NET both make launching new threads and debugging them a trivial process.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanx for responding me sir,
you are right that i should use the C# except the VB6.
but my whole application is in VB6.
i am planning to make a DLL in C# and use that in VB6 after converting it into VB6 compatible.
can you tell me how can a C# DLL converted to VB6 compatible.
thanx again...
bye..
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
It's not exactly an easy thing to do and understand if you don't already know the in's and out's of COM. You'll have to read up on COM Interop to find out, it's just way too much information to post here. You can start by looking at this[^] page. You've got a bunch of reading to do...
But, keep in mind that your C# .DLL won't work without the .NET Framework installed on the machines that are going to be running your application, even if it's written in VB6.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
sir, there is some command in the C# which converts the C# code to the VB6 compatible code. there is no need of .net framework for that. i am not dead sure about that but whenever i implement that then i will let you know.
we can convert the VB code to C# compatible and vice versa also. then it is totally become the VB6 code after converting it from C#.
command is related to tlbimp. this is just like that or need some R&D for that.
thanx for responsing me...
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
Here we go again...
Gagan Deep Singla wrote:
there is some command in the C# which converts the C# code to the VB6 compatible code.
If your talking about NGen, you have a problem. NGen will generate a processor specific native version of the code. But, it will generate a version that only works on that processor. If you NGen an assembly on a Pentium 4, the code it can generate will NOT work on a Pentium III. There are even issues with the same processor, but different steppings (versions) of it! You can't tell it to generate code for a specific processor either. It's either the one that it's running on, or you don't run it.
Gagan Deep Singla wrote:
there is no need of .net framework for that. i am not dead sure about that but whenever i implement that then i will let you know.
If you write the thing in C#, you will need the .NET Framework to run it, period. End of story.
Gagan Deep Singla wrote:
we can convert the VB code to C# compatible and vice versa also. then it is totally become the VB6 code after converting it from C#.
No you're not. When you use a VB6 .DLL in a C# app, you're not converting the code to C#. You're actually creating a Runtime Callable Wrapper around the .DLL. This wrapper is an interface between the .NET world and the COM world that the .DLL runs in. It marshals calls and data back and forth between the two. It does NOT convert the code!
When you write a .NET Framework .DLL, the same thing happens when you need to run it in a COM application. This time, it's a COM Callable Wrapper that you have to generate for the .DLL to do the marshalling.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Is there a way to read only the last 3 lines of a text file. Everything before the last 3 lines is not needed. The last 3 lines do change for each text file.
If any could help it would be great.
|
|
|
|
|
Try this:
OpenFile(1,filename,openmode.input)
Do until EOF(1)
i=+1
loop
For j=i-3 to i
read lines of text
next
FileClose(1)
There's just one thing I gotta say.."It's better to burn out than to fade away"
|
|
|
|
|
thanks for your help. how do i output this to a list box.
|
|
|
|
|
with a list box named data
lstdata.items.add("text")
There's just one thing I gotta say.."It's better to burn out than to fade away"
|
|
|
|
|
sorry, to make it more understandable just do:
listbox.items.add("text")
There's just one thing I gotta say.."It's better to burn out than to fade away"
|
|
|
|
|
hi guys,,
i'm working on an application which recieves a string value (in english or arabic), and i need to convert it into it hexadecimal value..!!
do any body knows how to do this in VB.Net..!??!
please help me in this as soon as possible..
any simple code will be helpfull..
thx for ur coorprate guys..
regards
Hani Aql
|
|
|
|
|
|
thx man for ur reply, i'v already seen and used this link, but this 1 always gives the same hexadecimal value for any string..!!! especially the arabic strings..!!! (
thx again..
|
|
|
|
|
Does it need to be in hex. You could calculate the crc32 of the string which is in hex format. I came across the code on the net before. If you can't find it you could use the MD5 hash of a string using the system.cryptography namespace. If I come across the crc32 code I will send it to you.
|
|
|
|
|
it seems that i need to encode the string using UCS2..!!
do u have any idea abt this..?!
sorry for my many queations, but i'm new to the encoding techniques and its my first time to need them in my application..!!!
any idea guys..??
|
|
|
|
|
Hello,
I have a string with many numbers and I need to get the 4 fist number in that string and then convert it to a int! How can I do that?
|
|
|
|
|
use the split function if u are having any seprator in the string.
otherwise use mid function to get the first 4 numbers and convert it using cint function. if any problem then explain in detail about string.
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
Ok,
Well I use it in a excell.
I have a cell with numbers, but you can enter how many numbers you wish but I only need the fist 4.
So that I want to do is to get that value with the 4 fist numbers and make it in to a int. That is what I need to do.
So how can I do that?
|
|
|
|
|
save the value of string of cell in a variable.
suppose i choose mystr variable.
i choose myint variable for the int value.
use the mid function as
mystr = mid(mystr,1,4)
where 1 is start and 4 is length of the required string. then use cint function as:
myint = cint(mystr)
thats all!
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
Ok!
And how can I make a int to a string?
|
|
|
|
|
use the cstr function for converting int to string
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
Thanks for all the help.
|
|
|
|
|
my pleasure!
Gagan Deep Singla
Chandigarh - INDIA
|
|
|
|
|
Hi Folks
Wrote a vba set of macros about 2 years ago to manage the leave and holiday needs of 62 employees. Have recentley started to revamp it with custom user forms and made it more secure with a security log in page etc. At the moment i have a routine (62routines in total) for each employee that selects the leave sheet that corresponds to them, the routine then moves the data to a calculation sheet works out the new totals then copies the new total and a line of cells with date info total used etc. back on to their leave sheet sheet. I am now trying to simplify by using one routine but totally stuck. What i need to do is search cell A1 on sheets 4 to 66 and if the name is the same as the one held on the calculation sheet(Derived from the user form) activate this sheet to copy the accrued hours across to the calculation sheet. The calculation routines work ok when the accrued hours are taken from the individuals sheet. I then have to re select the individuals leave sheet and copy a line of coresponding cells to the leave sheet and the new leave total. Been trying to write a Loop keep geting type mismatch errors. We may be expanding in the near future with up to 30 more drivers being employed so do not fancy writing another 30 routines.
|
|
|
|