|
Member 3057887 wrote: I am completely new to vb 6.0
Great! Stop while you still can and be completely new to VB.NET before VB6 teaches you a ton of bad habits you have to unlearn to move up to VB.NET!
|
|
|
|
|
But the current project is in vb6 and we have an urgent demo. So there is only one option(continue working on this till the demo is complete).So if any one knows the solution kindly let me know
Thanks in advance
|
|
|
|
|
I couldn't tell you - I haven't used VB6 in 8 years.
I'll warn you now - VB6 has been unsupported by Microsoft for quite a long time now, and its runtime will not be supported under Windows Seven. Your app will work under XP, may or may not work under Vista, and won't work at all under Windows Seven.
|
|
|
|
|
Hi,
I am not shure, but in VB 6 you have two Tab-controls (I do not remember witch is witch). There is one, that only shows you a tabbed layout on top, and not hide any controls, it you click a tab. Then it has one (in a external ocx, I think) that does what it is supposed to do. Hope this helps.
By the way, it is a good idea to change to VB.NET, you need to have some time to learn it properly, but it's worth it.
Regards: Didi
|
|
|
|
|
|
programmer1.a wrote: Please I need to help me
That's right, self help is the best way.
No-one here will code for you.
programmer1.a wrote: a simple example on a To Do List application
1 x Pencil
1 x Piece of Paper
Ta da!
A To do List.
Top of that list...
Learn to write some very basic code
------------------------------------
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC
|
|
|
|
|
OK..Thank you for reply
And iam sorry for the bad writing in English because I speak Arabic.
|
|
|
|
|
You language is not a problem, many here do not have English as first tongue, but never ask for code, write some code, then if there is a problem copy it here and ask for help, many people will be pleased to help or offer advice.
They might even RE-WRITE part of the code for you, but they will not just give it to you for nothing.
They need to see you have done some work.
------------------------------------
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC
|
|
|
|
|
hi ..
modified 28-Nov-12 8:17am.
|
|
|
|
|
Try changing
For fileCount As Integer = 0 To theFiles.Length() - 1
to
For fileCount As Integer = 0 To theFiles.GetUpperBound(0)
I'm assuming the error is an index out of bounds one.
If not, what is the error?
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
Then either the input line is not as expected (e.g. blank line somewhere in the file) or p(1) has not been set correctly.
I suggest setting a breakpoint on the line, pressing f5 and looking at the values of s and p(1) in the locals window.
That should tell you which it is.
I did have a problem in GetColumnPostions because of the accent in "Nom du Modèle" not matching the text in a test file - it set p(1) to -1.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
I have solved this problem but not the previous one...
|
|
|
|
|
hi ,
i am new to this programming world...
i have been asked to create a simple VB application which uses a COM application written in vc++..
For eg., addition program..
VB gets two input. COM processes them and returns the answer to the VB and VB displays the answer.
does anyone know how to write code for that?? some tutorials or sample applications will be more helpful.
rakesh
|
|
|
|
|
You have to create an instance of the COM class in your code, then you can call the methods and properties of the object. Add a reference to the COM library, under My Project, References tab.
Then you import the namespace at the top of your code. Once you have that, it's as easy as creating any other object:
Dim s As New MyComObject
|
|
|
|
|
Hello all:
I am hoping someone might be able to shed some light on this!
I wanted to pass the following string as a sql query in VB6 (it is not by choice I am doing this in vb6, it is an old app)
sql = "Select enteredvalue from Eln_property_values where property_key = 2381 and section_key IN (select primary_key from eln_sections where Name = 'Version Overview Page' and section_set_key IN (select Target_key from eln_references where Collection_key = 25))"
the strange thing is when the string is created it becomes: (the issue is at the end)
sql = "Select enteredvalue from Eln_property_values where property_key = 2381 and section_key IN (select primary_key from eln_sections where Name = 'Version Overview Page' and section_set_key IN (select Target_key from eln_references where Collection_key = "
It seems to drop the value and the two parentheses. Strange??
Even stranger is if I replace "...Collection_key=25))" with ...Collection_key XYZ))" it becomes ...Collection_key XYy". I have no idea what is happening (I do not have alot of experience with VB6).
I am pretty sure I could break up the nested sql and run each select separately, but that does not seem like a great fix as there will be some unnecessary code and three recordsets opening and closing. Any help or thoughts would be most welcome,
Thank you
|
|
|
|
|
My guess is that strings are limited to 255 chars.
But it's quite a while since I did VB6 that I can't remember.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
riced-
Thank you for the response, I think you may be right. I thought this might be a possibility but was not sure with my limited vb6 exposure. I guess it is time to break this string up,
Thanks again
|
|
|
|
|
I don't think that is correct... limitation on string length certainly does not explain why the last "Z" became a "y"!
IIRC, VB6 strings are 64k in length. Text fields in MS Access (not sure about the version...) are limited to 255 char.
HTH
|
|
|
|
|
ChandraRam-
Agreed. But the 255 limit did get me on the correct path. I did some further digging within the application and found that the string itself is preserved during the pass, but in fact the Watch window itself only displays 255 characters and will mutate a string that is longer than that.
Thank you for all the replies...
|
|
|
|
|
@ChandraRam: No, There is no 64 K limit. If you like, try in a new, empty project, the following code snippet in "Form1"
Option Explicit
Private Sub Form_Load()
Dim str As String
Dim i As Integer
str = "x"
For i = 1 To 30
str = str & str
Debug.Print Len(str)
Next i
End Sub
my string grewed was 130 million characters in size, before an error occured.
|
|
|
|
|
hi ..
modified 28-Nov-12 8:21am.
|
|
|
|
|
Your code makes two assumptions:.
1. The file is sorted so that similar records follow one another and are in date order.
2. There will only be two similar records in the file.
The first is obviously incorrect given the sample input. The second might be incorrect, not enough information to tell.
There is also a problem with your date comparison. It is actually comparing two string variables (dateTime and dateTime1). This means that 01/06/2009 comes before 30/05/2009, so you will get the wrong date (assuming that not all creation days are the same).
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|