Lots Of Txt Boxs
Hi there I have this application with one main form and twenty (20) other forms. The idea is that clicking on a certain area of the main form will display on of the twenty other forms. Each of these other forms have fifteen (15) text boxs and I am trying to save each text box on each form for a total of three hundred text boxs. The problem is that when I try to declare each txt box as a type variable (Type myinfo -300 different variables- End type ) vb6 says that "there are too many non-static variables", and the program will not run. Can someone tell me how I can go about saving the information on all the forms in one file, so that I can retreive them and put them back in the correct form and txt box when I need to. Thanks
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Load Lots And Lots Of Images To Memory
Hello all, I'm wondering how could I load like 11,000 images to memory? Each image is 32x32 pixels. I'm currently doing this:
Code:
myBufferBMP = CreateCompatibleBitmap(GetDC(0), 32, 32)
-- Then in a loop do something like this
For i = 0 to 11000
myBackBuffer(i) = CreateCompatibleDC(GetDC(0))
SelectObject myBackBuffer(i), myBufferBMP
BitBlt myBackBuffer(i), 0, 0, 32, 32, 0, 0, 0, vbWhiteness
For X = 0 to 31
For Y = 0 to 31
SetPixel myBackBuffer(i), x, y, RGB(R, G, B)
Next
Next
Next i
This is an example, I actually read bitmap info from a file and store it in all these buffers, but once its loaded, it seems that the program has a memory leak, because the forms look weird and is very slow :S
Any help? Can this be done with DirectX?
Thanks in advance
Hey, I Am Like The Biggest Vb Newbie.. And Need Lots And Lots Of Help =]
Alright.. I am making a bot for a chat program. I want people to be able to type somthing like "kill" and then someones name, so it'd be like "kill joe" and then for the bot to say "I killed Joe with a fork in the eye" or somthing stupid like that.
I also want to be able to do somthing like, when the would type in "diss" and it'd put a diss in. But, i'd come up with a bunch of disses, and it would say a random one each time.
If anyone could help me out, that'd be pretty cool.. thanks for any of your help I might get....
-Dapegleg
Lots And Lots Of Unbound Pictures
What is the best way to show pictures directly from files in a single control, i already have a picture on my form, and want to show a picture depending on what record is selected from a database.
Msg Boxs
I am sure this will be an easy one for the gurus.... I want to read a disclaimer (large paragraph in a text file) and display as a msg box using vbscript. Help would be appriciated.
Help With Combo Boxs
ii know this may be VERY easy but im new and i read some tut's but i cannot figure this out
Heres the Layout
http://img265.imageshack.us/img265/1268/untitlediv5.png
Simple I want it so people select a item in the combo box and it add to the coding the center. By pressing Insert. and adds it to the Text Bar. Cause normal letters have values to. Each have values i know already. That edits this part of coding.
http://img369.imageshack.us/img369/6...titled2wp1.png
And when NTSC Or PAL is selected it changes this coding
http://img146.imageshack.us/img146/3...titled3mk6.png
Check Boxs Only Two
I have 6 check boxs and I want it that only 2 check boxs can be selected at any time.
Can this be done and how.
Check Boxs
I am having a problem with a check box and an access database. I have four cb's on a form and they are connected to an access db. In the DB is a field with a yes/no data type. My problem is when I go to show the fields from the db in the form, I get an error 380 invalid property value. The code that I am using is:
Check1.Value = myRecordset!Check1
Is this the syntax that I need or is it something else??
Thanks.
-- Jon
Help With VB List Boxs
Hey, im making a VB port blocker using winstock but thats not the problem. My problem is you type in the port number and it addes it to the list. But how can i get all thoose number from the list. For example
They want to block ports 25,36,4500,2008 and they add it to the list. I then want to get the numbers out of there so that winstock will bind port 25,36,4500,2008
i put this in general because the list box is the problem!
Thanks
About Text Boxs
hi every bady
i please have 2 forms in the first one this are the fonction
text6.text= val(text4.text)+val(text5.text)
so inthe rusellt(text6) i want tow in the next form with same result please
i means one textbox in tox forms a same time
is it clair
thx alot
milen
How Do You Use Check Boxs?
I'd really like to know, as I'm not to sure how to use them, and it would really help with the project I'm doing. Thanx
Comparing Txt Boxs
hey, ive got two password boxs, and i want the to make sure that the user has put the corect password in each box(so they match) is there some way to check to see if they have done this?
thanks
Text Boxs
i want to be able to continualy load text into a textbox...
i need it to scroll the what is already in the box down a line and
load the newest text on the top... is this posiable?
List Boxs
How do I remove data from 1 list box and have it appear in another? Also once I have moved data from the first list, I world like to update the list and have the data removed?
Combo Boxs
I have a main form with a combo box, that has sub-form names in it. I have the names in the list property of the combo box. I want to be able to open the chosen form when i select it from the list. I think i am getting the syntax wrong and would appreciate any help.
Combo Boxs
Hi, got a problem with one of my combo boxes.
I want to add new values to my combo box using the notinlist event..and when the item is not in the list a form opens up and the user can then add the new values..
does anyone know how to do this??
This is the coding i'm using - can anyone see any errors of where i'm goin wrong?
Private Sub GandID_NotInList(NewData As String, Response As Integer)
' Add a new gang by typing a name in GangID combo box.
Dim intNewgang As Integer, intTruncateName As Integer, strTitle As String, intMsgDialog As Integer
' Display message box asking if user wants to add a new category.
strTitle = "gang Not In List"
intMsgDialog = vbYesNo + vbQuestion + vbDefaultButton1
intNewgang = MsgBox("Do you want to add a new gang?", intMsgDialog, strTitle)
' Open Addgang form.
DoCmd.OpenForm "Addgang", acNormal, , , acAdd, acDialog, NewData
' Continue without displaying default error message.
Response = acDataErrAdded
End If
End Sub
Saving Check Boxs
OK i really couldent think of a better title,
But i have made a program that logs you into a website using the user/pass that you have suplied but i do not understand how to save information, like
If user/pass CheckBox = checked
then
Username.text.save
etc... i really cant explain it but i hope yous understand what i mean.
Text Boxs And Key Strokes
im having some trouble on this code, what im trying to do is make it so when i hit the enter key the number is taken from one field, converted to the other degree measurement and printed in the other field
basicly, i put a number in the celcius field, hit enter and it converts it and prints it into the ferinheit field
im using text boxes.. heres the code
Code:
Private Sub txtCel_KeyPress()
Keyascii As Integer
If (Keyascii = 13) Then
txtFahr.Text = Val(txtCels.Text * 9 / 5) + 32
End If
End Sub
Private Sub txtfah_KeyPress()
Keyascii As Integer
If (Keyascii = 13) Then
txtCels.Text = Val(txtFahr.Text - 32) * 5 / 9
End If
End Sub
Checkbox That Act Like Option Boxs
For reason being, i cant use option boxs so i have to do this the hard way.
Does anyone have an idea on how to do the following:
lets say... 5 check boxs in an array *check2(0) - check2(5)*
Only 1 check box can be checked at a time (like an option box)
Any ideas anyone?
Question About Input Boxs
What does
Code:
inputbox("test", "test")
return if someone presses cancel, I done
Code:
msgbox inputbox("test", "test")
and it shows "" but if someone presses ok and there is no text in the input box then it also shows "". How do I pick up if someone presses cancel?
Listbox With Check Boxs
hi
i have setup a form with a folder adder in a listbox and i have changed the style to checkbox.
im trying to get the value of one of the folders in the list to be true or 1 how can i do this
i have tryed
Code:
list1.list(1).value=1
Multiple List Boxs
Hey, i've got a little problem with multiple list boxes
ok, so i have 12 list boxes, in 2 groups of 6 on each side of the from, like the image attatched, i can't work out how i can select one item from one side, then another item from the other side, click add and the selected items go into the middle list.
Rich Text Boxs
3 quick questions::
1) is it possible to load html into a rich text box (act like a web browser)
2) if so would it be possible to have clickable links in it
3) if 1 and 2 are possible, then please let me know how
thanks
Dimava
Clear Out Text Boxs
Hello all
I am using the code below to clear all the text boxs , it works fine but not with all, there are two text boxs still not clear them.
I really do not know why !!!! ???
Did any one faced that problem ?
On Error Resume Next
For i = 0 To Me.Controls.Count - 1
Me.Controls(i).Text = ""
Next
Any one can help please ?
MA
How I Can Control Of Two DBCombo Boxs
Hi all
I have a table contains students and countries names.
I would like to control of two DBCombo Boxes as follow.
DBCombo1 contains counters' names and DBCombo2 contains students' names.
How I can write code when I click to DBCombo1 to choose one counter the DBCombo2 gave me only the students belong to that country.
Example: when I click to DBCombo1 to choose UK country, the DBCombo2 should shows or contains only students from UK.
I really need your great help, any one can help will be highly appreciated.
Thank you in advance.
Mohammed
Adding Text Boxs?
how can i add decimal numbers eg, text1 to text2 using a button?
i want to enter a decimal number into text1 then by pressing a button i want it to ADD to the total, text2. then when i press the button again i want text1 to add to that current number in text2.
any ideas?
thanx.
Numbers In Text Boxs
I have several text boxes that I want only numbers entered in to. The code I have is below and works fine; however I cannot delete the numbers in the box. Can some one point me in the right direction? Thanks.
Private Sub txtecam_KeyPress(KeyAscii As Integer)
If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
KeyAscii = 0
End If
End Sub
Take Control Of Dialog Boxs
Hi all,
i use the web browser control to view content of html web pages and to work with the dom object model of this web pages.
my problem is with a dialog boxs (Yes or No for example)
that apears on those web sites , i dont know how to take
control of them form my source code.
for example if a Yes/No dialog box apear in some web page
i dont now how to access it and how to take control of the Yes/No
buttoms.
thanx,
pokpoki
Combo Boxs And Text Boxes
Hey all,
How could I get a couple of text boxes in one form change the list in a combo box in a second form?
Thank You
-gamesfreke
Conditional Formatting With Combo Boxs?
is it possible to make the conditional format update a combo box if a new piece of data is entered into a clolumn of cells.
say for example i have cells A1 through A5 with data in and i add a new piece of data into cell A6.
Is there any way that i can set the conditional formatting up with VB to update a combo box with this new piece of data included.
Multi Line Text Boxs
Hi all I am doing a little excise trying to do my own word wizard i have done prety much everything but i want to change one thing .Currently i save the names and addrees in a comma seperated file i.e
"ed","1 st line off address","2nd line of Address","3 st line off address","4nd line of Address","post Code"
for each these entries there is a seperate text box . I want to change all the address text boxes to just one multiline Text box. How can i go about treating each line seperatly (just like i was doing with lots of text boxes)?
Thanks
Print All Text Fr List And Txt Boxs
I have 3 text boxes on a form, how can I print them and ensure I get all of the contents (sometimes they have more text than can fit so they have scrollbars) using PrintForm sometimes they get cut when they have scrollbars, as I am sure you all know!
I just want to print them on on top of the other but ensure it prints all the text
Text1.Text = "Some Text"
Text2.Text = "SomeMore Text"
Text3.Text = "EvenMore Text"
Printed page would be:
Some Text
SomeMore Text
EvenMore Text
(one return between each text box info)
Sorry, I put list boxes in the title but there are not any!
Cliptext Naviagte Text Boxs
Hi guys
i have a problem i am trying to find a solution to - i have an exe i am trying to interact with initially i thought i may be able to navigate to around the textboxs filling with data by including vbtabs to get me to the boxs as you can on excel
but i cant seem to get it to work.
I.e
Code:
Dim ClipStr as String
ClipStr = "textbox1" & vbtab & "textbox2" & vbtab
clipboard.settext(ClipStr)
I know this is a very basic way of doing it but i am restricted as to what i can do with the systems i am working with.
I concidered sending messages to the relavent textboxs but with the limited info i have i understand that would involve loading vb onto the machine with the software in question and getting process handles and windows address's
before i could start interacting with them.
in short i want to fill in 6/7 textboxs on an exe that i have no real access to mess around with.
any help suggestions would be great
what about combining sendkeys into the clipdata can this be done?
Looking For Help With Adding Text Boxs While Running
Hello I'm making a program that searches for variables with in a flash game. I'd like to have a text box added and have the info for each variable put in the text box.
Say the program finds 60 variables I want to have my program either make the 60 text box's available to see and use or which ever way this can be done.
I know it didn't make sense.
Printing Multiple List Boxs
I was wondering if anyone could help me with this problem? I cant figure out how to print out multiple List Boxes. Please email me a klubhead9985@yahoo.com
List Boxs And Random Access Files HELP!
I am using a random access file to create a program. in this program, names that have already been saved to the random access file, are added to a list box. from here they are arranged in groups in other list boxes. i am having trouble saving which list box each name from the random access file is moved to.
heres my code from the page
Option Explicit
Private Type AcctRec
Cnum As Integer
Cubfirstname As String * 15
Cublastname As String * 20
Cubaddress As String * 150
Cubnumber As Integer
Cubemail As String * 75
Cubbirth As Integer
Cubage As Integer
Cubschool As String * 20
cubother As String * 150
End Type
Private CubRec As AcctRec
Private Sub add1_Click()
List1.AddItem (List6.Text)
Dim PositionInList As Integer
Dim NumberOfItemsInList As Integer
PositionInList = List6.ListIndex
NumberOfItemsInList = List6.ListCount
If NumberOfItemsInList > 0 Then
If PositionInList >= 0 Then
List6.RemoveItem PositionInList
Else
MsgBox "You must select an item to delete.", 48, "Error"
End If
Else
MsgBox "There are no items to delete.", 48, "Error"
End If
NumberOfItemsInList = List6.ListCount
If NumberOfItemsInList > 0 Then
If PositionInList = NumberOfItemsInList Then
List6.ListIndex = NumberOfItemsInList - 1
Else
List6.ListIndex = PositionInList
End If
End If
List6.SetFocus
End Sub
Private Sub Delete1_Click()
List6.AddItem (List1.Text)
Dim PositionInList As Integer
Dim NumberOfItemsInList As Integer
PositionInList = List1.ListIndex
NumberOfItemsInList = List1.ListCount
If NumberOfItemsInList > 0 Then
If PositionInList >= 0 Then
List1.RemoveItem PositionInList
Else
MsgBox "You must select an item to delete.", 48, "Error"
End If
Else
MsgBox "There are no items to delete.", 48, "Error"
End If
NumberOfItemsInList = List1.ListCount
If NumberOfItemsInList > 0 Then
If PositionInList = NumberOfItemsInList Then
List1.ListIndex = NumberOfItemsInList - 1
Else
End If
End If
List1.SetFocus
End Sub
Private Sub Form_Load()
Dim FileName As String
FileName = "Cubs"
If FileName <> "" Then
Open FileName For Random As #1 Len = Len(CubRec)
End If
Dim RecNo As Integer
RecNo = 1
Get #1, 1, CubRec
While Not EOF(1)
If RecNo = CubRec.Cnum Then
List6.AddItem CubRec.Cubfirstname & "" & CubRec.Cublastname & "" & CubRec.Cubage
End If
RecNo = RecNo + 1
Get #1, RecNo, CubRec
Wend
End Sub
has anyone got any suggestions?
Using List Boxs, Adding Records And Stuff
hey um i need to make a list box and load an array of records into the list box i guess using the additem method, but i need to make it so that when someone clicks on an item in the list box underneath in labels the rest of the record would be displayed (so only the name would be displayed in the list box, has anyone got suggestions?
i think i can fill the list box, just need to know the command for when someone clicks on one...
Using A Combo Box To Bring Up Related Fields In Text Boxs
Ok im running a vb program in front of a access database
I want that when you choose a value from the combo box the related fields come up in the text boxes.
eg the persons name in the combo box so when you choose the name, in the text boxes if brings up the relevent address, phone, email etc, i would prefer to use text boxes to show this information, (a new text box for piece each of info)
I have a adodb connecton to the database and have called the names to the combobox but the text boxs only load up the first record
in the form load im doing this
With rsStaff
.LockType = adLockOptimistic
.Open "select * from staff", MDIMain.Db, adOpenKeyset
End With
Assigndata ' assign data to the text boxes
Do Until rsStaff.EOF = True
cmbStaff.AddItem rsStaff.Fields("staffname")
rsStaff.MoveNext 'moves next record
Loop
rsStaff.MoveFirst
cmbStaff.Text = rsStaff.Fields("staffname")
but im not sure what code to put in the cmbstaff combo box to get the text boxes to update to the appropriate combobox selection
I Need Lots Of Help.
im now making my VB program and it says ive gotta add the mnuFileSaveAs_Click code, but the thing is, i dont know what the hell that it is ive gotta do, so could someone tell me the code and where to put it and mabey after i keep asking things il know who to do stuff for myself.
the filename i want is:
Text adventure game files (*.tad*)
and i need it for, Save As, and Save.
Lots Of Help?
Sorry for all the questions!
1) How can i open a html file into a rich text box or normal text box? Is it the same as opening a text file? I want the code to show?
2) How can i then only show a specific bit/s of the code. So basically someone with no knowledge of web programming can come in and add text it etc.
3) Then save the file as filename.html overwriting the old one!!
Thanks for any help!
Beacon
Lots Of The Same
Hi, im trying to fill all the combo boxes in a form with the same thing, im currently using this code:
Dim combo As ComboBox
For Each combo In ImpAsig
combo.AddItem Impre1
combo.AddItem Impre2
combo.AddItem Impre3
combo.AddItem Impre4
combo.AddItem Impre5
Next combo
But it returns an error saying "Type Mismatch" and highlights the first line of the code.
Please help
Lots Of Problems
Hi,
I listed my questions and I am waiting for answers
- I used Explorer API in my mini browser, but I want to personalize this API. For example when you click the body of the browser, the explorer menu appears, but I dont want this. I want to show my own menu. How to do that? Is there any free tutorial to teach how to use this API?
- Another question, when I finished my program on one form, I want to add another forms when program runs. Like Download Accelerator Plus. How to do that?
- When my program runs, I want to add a button or another object. How to do that? Generally, how to add an object when program runs?
Thanks for all.
Kaan ERDEMIR
ITU Math. Engineering Dept.
Lots Of Help Needed
hi ive been working on about 3 or 4 programs at a time so as i dont get bored with doing the sme thing and i need help with all of them
first i need to know how to make a form full screen and resize all of the controlls on it the only way i can think of doing this is setting all the sizes of the controlls so it looks right then putting 2 labels on the form and typing
private sub form1_load()
label1 = screen.width / form1.width
label2 = screen.height / form1.height
resize
end sub
private sub resize()
shape1.width = shape1.width * label1
shape1.height = shape1.height * label2
shape1.top = shape1.top * label2
shape1.left = shape1.left * label1
..........etc.
end sub
as you can imagin with about 200 controlls this takes quite a long time and ive tried something to do with the scale operations but i cant get the hang of it and it never works.
another problem is i have just bought a new laptop and i can plug an external monitor into it and have 2 different pictures (one on each screen) but the problem is when i come to write twin screen programms i put one form on one screen (the laptops lcd) and make it fit the screen then i put another form slightly smaller because the second screen has to have a smaller screen resolution or it loses some colors and i make the left of that form the width of form1 so when it opens up they come on seperate screens the only problem is i cant make it full screen like you can with forms on a normal screen if you put as the startup position "maximised" it goes horribly wrong (for those people who dont know how twin screen works on my laptop what it does is add another desktop onto the right hand side of my existing one without any icons on it)
another problem to do with the way my laptop works is when you move the mouse of the right hand side of the screen it comes back on the left instead of being shown on the other monitor but when you try to click on something it works as if it is on the other screen you just dont see it
once more i have to ask for help about monitoring incoming sound into my laptop i just want a progress bar or something to show how loud the music is comeing out of my sterio .... my laptop has got a built in micophone.
and every ones probabibly sick of me asking about this but im still having trouble with bitblt ive tried the demo on that web site and it worked but when i move the pictures about a bit (like one so the top of the picture was just of the screen) i got other things appearing in the destination picture like a nulti colored title bar of the form and how can i use this operation on hiden images
Lots Of Frames
i was wondering how many ways there are to put a gif/media file into vb.
the only way i know is to make a control array of all the frames and control it with a timer but i have a gif with alot of frames and i didnt know if there was an easier way the place it into vb
Lots Of Errors
will sombody please take a look at this database program??
i am having problems adding to the output database and refreshing the dbgrid whenever i add a record (sometimes it overwrites and sometimes it crashes out and so on...
please somebody help it is driving my insane lol
ps you will have to copy the db files to
c:program filesottobock diary systemdata
otherwise it wont find the db files and throw out yet another error
Lots Of Text
I wish to insert lots of text (as in a pragraph for example) into a report with some calculated data. For example.....
This week we gained 25 new customers. Each customer bought on average $25 worth of goods. And so on.
I want each of these numeric values to come from variables I have in my code. The user needs to be able to select a menu option of click a button and the report populated with the current values and for it to be saved.
Can I do this in the VB5 Crystal reports component or the report designer if so how do I do it? If not is there anthing out there I can buy that can do it?
Cheers in advance
Kevin.
Lots Of Problems
Ok first of all i have a program with a sorta macro in it and when you use the macro it places the text at the bottom of the richtextbox i want it to be where your curser thing is.
ALSO
i had syntax highlighting but the code i used was slowing down as i added more text is there a code that will highlight the text and then forget about it and not rehighlight everytime someone enters something?
Newbie Needs Lots Of Help Please
hello all.
i am trying to write a program with vb and need help.
in my program i need to display a list box that can show the first column of an exel sheet, first question how do i do get the list box to display the info required? (please if you can show me with an example as i am very new to programing.)
also when the list box shows the fist column i would like to be able to click on one of the items and this would automaticaly place the rest of the info in that row of cells into set text boxes, i.e show column a in list box, pick say a10 then put all row 10 cells containing info into text boxes in so that it is displayed onto the screen these cells would contain numbers only. second question , san anyone show me in an example how to do this please?
last question, i want to display a blank window with just a menu file at the top, and from there show (when clicked) a new window inside the first window . do i do this by creating a new form and jumping to it? if so how do i do this please.
i know that am asking a lot but hey i am a newbie and ive been told this is the best place to start. thank you
|