I have written and currently maintain a VB6 legacy app for a client. There are thousands of copies running successfully all over the world... with one exception. One of my client's customers installed the software on a WIN7 system and gets the RTE 339 - tabctl32.
The weird part is that if he boots in safe mode, it works perfectly. I have told my client to use regsrv32 in admin mode to un-register and re-register the ocx. He gets a successful completion when doing so but still gets the RTE 339 error.
I have had the client run "Handle.exe" to see if any process that loads during a normal startup might have a lock on the ocx but the results show nothing.
Anyone have any ideas as to why this would work in safe mode but not on a normal boot?
Search the system for tabctl32. Chances are really good you have multiple versions on the machine. Your app might not work with the one that's currently registered on the machine. You'll have to dig through the registry to find which one that is.
When it works in safe mode, it's using the one that Windows 7 came with because the control registration is reverted back to defaults.
If RadioButton5.Checked = TrueAnd RadioButton9.Checked = TrueThen
Label6.Text = sum + Diabetes.Label3.Text + HDL.Label3.Text + muka1.Label23.Text
Label6.Text = sum + muka1.Label23.Text
* this is my coding that have been highlighted. The problem is it's say label23 is not valid to convert from string to double..actually.i have already declared that label 23 Integer at the muka1. This code is at the muka2, form 2. May i get help here pleasee??
AFAIK and assuming sum is numeric (probably of type double) rather than string, VB/VB.NET will try and evaluate the + operators as numeric addition, not string concatenation. So either use sum.ToString() or use the & operator for string concatenation.
I assume "sum" is a double. You are trying to add the .Text property (which is a string) to a double ("sum"). The compiler tries to convert the string to a double, which there is no implicit conversion. You can use double.Parse(muka1.Label23.Text) if you are SURE that Label23 ALWAYS contains a double, otherwise convert it to a double first using the double.TryParse() function.
This is pankaj vishwakarma a vb.net developer, I am currently working on the printing project.
Here I am creating a custom paper on the printer via code and then trying to print the text on a specified location . It does not
print After trying many time i found that printable area is not changed but it is changing height and width as custom paper still it's printable area remains the same as previous paper
I'm trying to read the contents of a file into an array, but for some reason the values are showing up in the array as nothing? The contents of the file look like this (the file length is about 5,690 lines long)
This is the section of code I have written to attempt to do this
'Read the stock symbols to be copied to a new folder into an arrayDim stocksymbolarrayLong(25000) AsStringDim filecount AsIntegerDim counter AsInteger'Count the lines in the file you are reviewing.Dim LongFile As System.IO.StreamReader
LongFile = System.IO.File.OpenText("C:\Users\George Desktop\Documents\Stock System\Stock Programs\Stock Program Data\LongStockTesting.txt")
filecount = 0Do Until LongFile.Peek = -1
filecount = filecount + 1LoopFor counter = 0To (filecount - 1)
stocksymbolarrayLong(counter) = Val(LongFile.ReadLine)
ReDim Preserve stocksymbolarrayLong(filecount - 1)
' Sort the array's
This should be very simple to do and solve, but i've been looking at it for a couple hours and don't know what I'm doing wrong?
is this VB6 or VB.NET?
how many times can you "read to the end"?
why do you read the file twice? you could extract and store the required data and find out the number of lines in one go (and your problem would suddenly disappear).
if VB.NET, why don't you use a List of Something rather than an array (whose dimension is an implicit limitation to your program)? And are you familiar with File.ReadAllText? File.ReadAllLines?
Luc, thanks for your prompt reply. Below are my replies to your questions.
I'm using VB.NET
I'm not sure I understand what you mean "read to end"?
I read the file twice. Once to get the length and once to read the data. I'm aware I could do it all at once, but I guess it's just poor form on my part. Not sure how this would make the "problem disappear".
The reason I don't use a list is I'm not familiar with lists and how they work. I am also not familiar with file.readalltext and fileradalllines. I'll look them up.
Please keep in mind I'm not someone who writes a lot of programs and has a lot of experience. I know there are better ways to accomplish what I am looking to do, but I'm curious as to why what I'm doing isn't working?
Eddy, I didn't get an error result and no message about my reader. Yes I did look up lists and file.readalllines(). Learned a lot today from some very kind people. I'll probably end up rewriting a few other programs using what I learned.
Yes, I am sorry -it looks like I replied under wrong heading. My post is intended for OP, and not you in any way. Your resolution is what I would have done too, btw .Thanks for letting me clear this up.
have a Great Day Luc!
Well, who I was meaning to refer to regarding readALLLines method-was the poster that offered up the ReadALlLines method of the File class.
Still, you offered a great help explaining why OP code was failing.
That was a good response.
I'm afraid you still haven't figured out why it failed the way you did it. You opened a file, then had a loop reading all its contents (till Peek fails), en then another loop supposed to read all content again. However you never told the file it should restart at the beginning (the again was in your mind, not in your code), so your second loop starts at the end of the file (where it had left off when the first loop ended) and then obviously finds nothing more. To restart a file, either close and open it again, or simply set its Position to zero.
So either do it yourself (as you tried) but do it correctly, or use what is available to tackle the most popular situations, such as File.ReadAllLines(). Quite often, less code also means fewer bugs.
Thank you for explaining what my error was because (as you mention) I never did understand why it didn't work. I actually rewrote my program using file.readalllines() and used a list instead of an array.
Thanks again for helping out. Not only did I get an answer to my original question, but I actually learned a better way to get my desired result.
Hey I'd uses a streamreader. so store your csv file in a variable and read it in a using statement using streamreader and set your array = reader.split(',') or ('/t') depending on what format your csv file is in.
Last Visit: 31-Dec-99 18:00 Last Update: 1-Oct-23 13:24