User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion

Reply
Thread Tools Display Modes
Unread 17 Dec 2004, 12:48   #1
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
text files and combo boxes in visual basic

Here's what i've got so far:
Code:
Open "filename here" For Input As #1
Input #1, combo1[1]
Input #1, combo1[2]
close #1
But a list seperator or end of statement is expected. What does it want me to do?
__________________
I think I just had an evilgasm

Last edited by vampire_lestat; 17 Dec 2004 at 13:10.
vampire_lestat is offline   Reply With Quote
Unread 17 Dec 2004, 17:03   #2
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: text files and combo boxes in visual basic

Ok, first of all, you didn't say what exactly you want to do. But it seems you want to fill Combo-Boxes from a Text-File.

Well, combo1[1] is nothing really, it only describes a combobox. You must say WHAT you want to do. I.e.

Code:
Input #1, tempString
combo1[1].addItem tempString
Or, use combo[1].List[0] or whatever. Mark a combobox on the form, press F1, and see what you can do with it...



Uh, and 2 obligatory tipps for good programming style:
Dont use "as #1". You usually go like this:
Code:
Dim FileNum as Integer
FileNum = FreeFile()

Open .... as FileNum

Input FileNum

Close FileNum

The other thing is, I personally found, that opening files for Binary usually works best, then plain-reading strings, and parsing them. But ok, you probably need to get used to it and make your own experience...
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote
Unread 17 Dec 2004, 17:13   #3
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Re: text files and combo boxes in visual basic

Square brackets in Basic? That's something I haven't seen yet.
__________________
"Yay"
Structural Integrity is offline   Reply With Quote
Unread 17 Dec 2004, 18:15   #4
Leshy
Mr. Blobby
 
Leshy's Avatar
 
Join Date: Nov 2000
Location: Belgium
Posts: 8,271
Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: text files and combo boxes in visual basic

Quote:
Originally Posted by Structural Integrity
Square brackets in Basic? That's something I haven't seen yet.
Arrays.
__________________
http://www.leshy.net
Leshy is offline   Reply With Quote
Unread 17 Dec 2004, 19:11   #5
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Re: text files and combo boxes in visual basic

Quote:
Originally Posted by Leshy
Arrays.
I index arrays with round brackets in VB. I'm not 100% sure though (I probably tried it because I'm used to C/C++) but I thought you can't index with square brackets.
__________________
"Yay"
Structural Integrity is offline   Reply With Quote
Unread 17 Dec 2004, 20:18   #6
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

arrays use square brackets.

and thanks for the help, it's working ok now.
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 17 Dec 2004, 22:34   #7
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Re: text files and combo boxes in visual basic

Quote:
Originally Posted by vampire_lestat
arrays use square brackets.

and thanks for the help, it's working ok now.
I shall change my heretic habit in VB at once.
__________________
"Yay"
Structural Integrity is offline   Reply With Quote
Unread 18 Dec 2004, 13:54   #8
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: text files and combo boxes in visual basic

Wowowo NO!!!

Sorry people, I CANNOT understand how I -- always in favour of VB -- got this wrong, after only 8 weeks of Java course (and arrays only since 1 week).

Just as SI said: IN VB, you gotta use () for arrays. [] won't do it in VB.

I tried it:
Code:
    Dim heya(1 To 100) As Integer ' DOES work
    dim heyo[1 to 100] as Integer ' does NOT work
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote
Unread 18 Dec 2004, 14:13   #9
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Re: text files and combo boxes in visual basic

Quote:
Originally Posted by JetLinus
Wowowo NO!!!

Sorry people, I CANNOT understand how I -- always in favour of VB -- got this wrong, after only 8 weeks of Java course (and arrays only since 1 week).

Just as SI said: IN VB, you gotta use () for arrays. [] won't do it in VB.

I tried it:
Code:
    Dim heya(1 To 100) As Integer ' DOES work
    dim heyo[1 to 100] as Integer ' does NOT work
"I told you so"
__________________
"Yay"
Structural Integrity is offline   Reply With Quote
Unread 18 Dec 2004, 20:49   #10
Leshy
Mr. Blobby
 
Leshy's Avatar
 
Join Date: Nov 2000
Location: Belgium
Posts: 8,271
Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: text files and combo boxes in visual basic

Fair enough. It's been ages since I've done anything in VB
__________________
http://www.leshy.net
Leshy is offline   Reply With Quote
Unread 19 Dec 2004, 11:43   #11
Caesar2
Commander
 
Caesar2's Avatar
 
Join Date: Sep 2001
Location: Netherlands
Posts: 146
Caesar2 is just really niceCaesar2 is just really niceCaesar2 is just really niceCaesar2 is just really nice
Re: text files and combo boxes in visual basic

Iirc square brackets in VB are only used for variable names that normally are not allowed:
Code:
Dim [Spaces are bad!] As String
__________________
Quote:
Originally posted by Cochese
Cathaar are not overpowered.

You were just "bashed", live with it.
Caesar2 is offline   Reply With Quote
Unread 19 Dec 2004, 19:17   #12
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: text files and combo boxes in visual basic

Quote:
Originally Posted by Caesar2
Iirc square brackets in VB are only used for variable names that normally are not allowed:
Code:
Dim [Spaces are bad!] As String
Nope. Doesn't work.
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote
Unread 21 Dec 2004, 10:07   #13
Caesar2
Commander
 
Caesar2's Avatar
 
Join Date: Sep 2001
Location: Netherlands
Posts: 146
Caesar2 is just really niceCaesar2 is just really niceCaesar2 is just really niceCaesar2 is just really nice
Re: text files and combo boxes in visual basic

Quote:
Originally Posted by JetLinus
Nope. Doesn't work.
I see now that it only seems to work in vbscript, but anyway it is pointless.
__________________
Quote:
Originally posted by Cochese
Cathaar are not overpowered.

You were just "bashed", live with it.
Caesar2 is offline   Reply With Quote
Unread 23 Dec 2004, 14:44   #14
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

just checked, you're right. Damn java and its corrupting square brackets.
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 24 Dec 2004, 15:31   #15
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

another quick combobox question: how do I use the selected value?
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 24 Dec 2004, 16:16   #16
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Re: text files and combo boxes in visual basic

combo.text I think
or was it combo.value ?
__________________
"Yay"
Structural Integrity is offline   Reply With Quote
Unread 24 Dec 2004, 16:17   #17
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

combo.text seems to work, cheers.
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 25 Dec 2004, 03:18   #18
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: text files and combo boxes in visual basic

Usually it should behave like a "normal" listbox, PLUS it's got the additional text-property for combo style.

So, you'd get the selected value like this (out of my head):
Code:
combo1.List(combo1.ListIndex)
You should really just select a combobox on a form and press F1, and then see what it can do. Or get some basic / fundamental tutorial or guideline.

I'm almost tempted to say RTFM, but I since it's Christmas and not that bad, well...
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote
Unread 29 Dec 2004, 15:36   #19
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

whilst this thread is here, can someone tell me how to hand variables across from one form to another?
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 29 Dec 2004, 18:34   #20
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Re: text files and combo boxes in visual basic

Quote:
Originally Posted by vampire_lestat
whilst this thread is here, can someone tell me how to hand variables across from one form to another?
That's an interesting question, because I have been wondering that myself (I haven't tried it yet).
My guess is that you can set the global variables that are in the form module.
Like:
Code:
' Form module frmTest
dim VARIABLE as long
Code:
' somewhere else
dim FORM1 as frmTest

FORM1.VARIABLE = 11
That would be my guess, but I could be wrong ofcourse. Let me know if you figure out how.
Also, let me know if you know how to open multiple instances of the same form (the same form, opened multiple times at the same moment).
__________________
"Yay"
Structural Integrity is offline   Reply With Quote
Unread 29 Dec 2004, 19:40   #21
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: text files and combo boxes in visual basic

Well, I'm not quite sure if SI's method would work, as I'm afraid you cannot use "dim" in a form module, but have to use "private" instead -- i.e. no public variables there.

I myself would work with modules (.bas-files) anyway. And do all the stuff from there. Have a Sub Main() where the project starts (Project, Properties, Startup Method, -> Sub Main). Then in this sub, you load and show all your forms etc.
To "pass" variables from Form to Form you'd use a global variable, declared in your module.
But all the important and non-form-specific stuff happens inside that module then anyway.


How you create multiple instances of a form I don't know, but I can guess:
Create and desing a form, let's say frmMain.

And then somewhere, call
Code:
Dim MyForms(1 to 100) as Form
Set MyForm(1) = New frmMain ' or maybe put the New in the line above...
MyForm(1).Show

'or try to this
Dim MyForms(1 to 100) as New frmMain
MyForm(1).Show
I'm sure the VB help will provide more info on this (see programming concepts).
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote
Unread 30 Dec 2004, 12:06   #22
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

SI, found this:-

Procedure-level variables are created with a Dim statement placed right in the procedure where it's going to be used. The value of a procedure level variable cannot be accessed outside it's procedure. When the procedure finishes (End Sub or End Function), the variable is destroyed and memory allocated to the variable is released.

Module-level variables are created with a Private statement in the general declarations section of a Form or code module. The value of the module level variable is available to every procedure in that module. Memory allocated to the module-level variable is not destroyed until the module is Unloaded.

Global variables are created with a Public statement in the general declarations section of a Form or code module. The value of a Global variable is available to any procedure, in any Form or code module. Memory allocated to a Global variable is not released until your program shuts down.
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 30 Dec 2004, 12:15   #23
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

also, i think that if you want to load a form many times, can't you just do

Code:
dim no_of_forms as integer
for x=1 to no_of_forms
     load FormNameHere
     FormNameHere.show
EndFor
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 30 Dec 2004, 12:24   #24
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

another question: how do i make a table, without using excel or anything else like that?
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 30 Dec 2004, 13:31   #25
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: text files and combo boxes in visual basic

Quote:
Originally Posted by vampire_lestat
also, i think that if you want to load a form many times, can't you just do

Code:
dim no_of_forms as integer
for x=1 to no_of_forms
     load FormNameHere
     FormNameHere.show
EndFor
Doesn't that just load / show the SAME form multiple times? One would have to try this and see if you really have multiple instances then....


Quote:
Global variables are created with a Public statement in the general declarations section of a Form or code module. The value of a Global variable is available to any procedure, in any Form or code module. Memory allocated to a Global variable is not released until your program shuts down.
This is just WRONG!
There can't be a "Public" statement in the code of a form. Try it. Not allowed. Only in modules...


Quote:
Originally Posted by vampire_lestat
another question: how do i make a table, without using excel or anything else like that?
Well, without using anything, you'd either have to use a textbox and insert TABs / BLANKs manually. Or program your own table :-/

I'd recommend MS GridLine Control. It's an OCX and should be installed on every system nowadays anyway. Also it come with the Visual Basic runtimes.
Just have a look around at those MS Common Controls. "Project, Components..."
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote
Unread 30 Dec 2004, 14:54   #26
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

i tried the public in a form and it seems to work ok , thanks for the table thing
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 30 Dec 2004, 17:01   #27
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: text files and combo boxes in visual basic

Ok ok I am quite sorry ^^

I tried it as well now, and public SEEMS to be allowed for varialbles and subs/functions, but NOT for constants or external functions (from dlls, using "declare", e.g. winAPI).
Also you cannot have public arrays or strings of fixed length in forms...
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote
Unread 3 Jan 2005, 15:29   #28
vampire_lestat
Mathamagician
 
vampire_lestat's Avatar
 
Join Date: Aug 2001
Location: At the very edge of existance
Posts: 1,803
vampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet societyvampire_lestat is a pillar of this Internet society
Re: text files and combo boxes in visual basic

true, but if you want to move text or arrays then just use text files or binary files or whatever.
__________________
I think I just had an evilgasm
vampire_lestat is offline   Reply With Quote
Unread 7 Jan 2005, 19:14   #29
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: text files and combo boxes in visual basic

Quote:
Originally Posted by vampire_lestat
true, but if you want to move text or arrays then just use text files or binary files or whatever.
What?? You cannot be serious!!! Moving data from one form to another using FILES? The detour of HDD access?
That's really bad. You should never do that.
Or I got it wrong.

But even if it's for messages between foreign forms (i.e. of different apps), you could use DDE or Callbacks or Shared Memory.
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Forum Jump


All times are GMT +1. The time now is 22:26.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018