o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

string limit 50 -

i found this code on here today for use of ini files and it works great

but the Dim strResult As String * 50 has me confused. i need more than 50 characters per line so i changed it to 500 and it seems to still work fine.

but i am learning vb by example the best that i can , and everything else in this code is easy for me to understand but i wasnt sure if there was an important reason in limiting it to only 50 characters.




does the link timeout = 50 in the default property settings of a textbox have any relation to this ? or was this just a user preference and i can change the number to anything i want ? or just remove it altogether ?


Code:
Option Explicit

Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long

Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long

Private Sub Command1_Click()
Dim lngResult As Long
Dim strFileName
strFileName = App.Path & "\myini.ini"
lngResult = WritePrivateProfileString("My Text", "Text 1", Text1.Text, strFileName)
lngResult = WritePrivateProfileString("My Text", "Text 2", Text2.Text, strFileName)
lngResult = WritePrivateProfileString("My Text", "Text 3", Text3.Text, strFileName)
lngResult = WritePrivateProfileString("My Text", "Text 4", Text4.Text, strFileName)
End Sub


Private Sub Command2_Click()
Dim lngResult As Long
Dim strFileName
Dim strResult As String * 50
strFileName = App.Path & "\myini.ini" 'Declare your ini file !
lngResult = GetPrivateProfileString("My Text", "Text 1", strFileName, strResult, Len(strResult), strFileName)
Text1.Text = strResult
lngResult = GetPrivateProfileString("My Text", "Text 2", strFileName, strResult, Len(strResult), strFileName)
Text2.Text = strResult
lngResult = GetPrivateProfileString("My Text", "Text 3", strFileName, strResult, Len(strResult), strFileName)
Text3.Text = strResult
lngResult = GetPrivateProfileString("My Text", "Text 4", strFileName, strResult, Len(strResult), strFileName)
Text4.Text = strResult


End Sub

 

Winsock.. Limit On Text Length -
Is there a limit to how much data can be sent in 1 string? or is it just the limit of the string variable itself? if so what is that since i can't remember? if not and it is a limit on the winsock control itself.. what is that?


HELP!!! What to do with the 255 char string DB limit! -
I am running an access database and it limits me to 255 chars in a text field. Is there a different way to store a long string. Onther then spliting the string up and storing in multiple fields (which I don't want to do). Does SQL limit string length?


Http Request Handling -
hello, I am sending an Http Request which contains xml string to the browser through VB. But when the Length of xml string extends the maximum limit, the function which i have written doesn't works. The problem is with the browser. it cannot accept more than 2000 characters, w


array upper-lower limit x-->13 but x<>13 -
hello everyone, i have aquestion concerning the following code and its upper and lower limit Dim numlabel As Integer Dim generatorrandom As New Random Me.txtnum1.Text = generatorrandom.Next(1, 13) the lower limit (1)comes up many times when it is run ho


Can I limit the no of instances od an dll -
Hi, I'm interested to know if it possible to limit (or detect) the no of instances of an dll (VB6) that are running or are instantiated. I would like to limit the no of instances from inside the dll, (if the no of instances reach a limit all the new tentative of instantiating will


Limit of CopyMemory -
does CopyMemory has a limit on length of string... i am passing a string data of len 256 when i call Call CopyMemory(buf(1), ByVal cds.lpData, cds.cbData) i get a error Invalid procedure call or arugment.. any solution for this i need a string of max 256....


[2005] How to limit bandwidth -
Hi! How can I limit bandwith for download / upload? There is one thread about this, but isn't resvolved. Anyone know, how to set limit (by own program, instead of using completed applications)?


Visual Basic 6 limit -
There is a limit on how many controls you can put on a form. 255. Is there any way to get rid of the limit?


image and picture box size limit -
Hello, I was just wondering if there's a way to get rid of the maximum size limit of a picture box. For example i have about 20 or more pictures to be loaded into a picture box, but only 11 are being loaded, and i was told that there is a limit, my question is how can i get rid of tha


Braking the Limits (>32,768) -
How can I brake the limit of list boxes' and text boxes' limit of 32Kb? Or store it into a variable string wen scrolled down and still contain all the nessecary data?


Character Limit on Text Boxes -
Is there a way of applying a limit to the number of characters that can be put in a text box in VB 6. Also how would I display an error message if the user tries to go over the word limit? Thanks, Darren


SQL/ SP Limit......on combining fields -
Hi I was merging fields together for an address in an SP, then when I saw it was null tried a SQL..same result seems to go over limit 255? And then put whole string to null SQL like SELECT BillingHouseFlat + ' ' + BillingStreet + ' ' + BillingAddress2 + ' ' + BillingAddress3 + '


How to send and receive string between apps -
Here's my problem: I want to limit the number of instances of my app running on a pc. I AM NOT ASKING TO LIMIT IT TO JUST ONE! I may want to specify the number of instances, like 3 or 10 or 7, etc. So, I thought that if my app could do the following it may work: 1) Enum the


Limit to the top of a frame -
Quick question, does the top of a frame have a limit? Or the height of a frame, does that have a limit? Because I just designed a form where I can scroll down, sort of, and it just moves the top of a frame higher (negative sense). But when I fill it with to many data, it stops at some


Page limit (solved) -
Hey guyz.. when i am designing a page for ASP.net... it has a limit at the bottom where i cannot make it any longer.. how do i extend the page limit?


email limit -
Hey ppl, I would like to know what could be the limit, or how many is too much! I'm using the MAPIMessages1 & MAPISession1 to send a list of email! But what could be the limit, 1000 , 5000, 10000!! What do you guys do, does someone here did this sort of thing for a c


Limit of sum of series, proof required -
By numerical analysis, I have determined that the limit as n tends to infinity of the sum over i = 0 to n-1 of 1/(n+i) is 0.693147 (i.e. ln(2)) Please can someone provide a step by step proof that the limit is in fact ln(2) (natural log of 2). Thanks Rob


Listbox row limit -
Is there a limit to the number of rows a listbox can hold? Im getting Runtime error 5 - Invalid procedure call or argument when i try and add a row when i already have 32736 rows in it. Is there any way round it or will i have to use a listview? Will that have a similar limit i wonder


go to a certain date and work backwards -
Hi there, I need to create a procedure which will track back from the date entered in a textbox to the previous 6 April (end of tax year). From there I want to take the tax limit for that year and the previous 2 tax years. Any ideas on how I would do this? i.e. User enters


Generate Unique Random Integer in given range -
I am sure there must be a function available that can generate a unique random integer in a given range. Inputs: Upper limit Lower Limit Array of integers between upper and lower limit. Output: A random integer that does not exist in the [array of integers between upper


Help Select Limit in MySql not working -
This works: Select * From tbl Limit 0,100 But This Does Not Work: Select * From tbl Limit 0,100 Order By Name What am I doing wrong?


limit instance of a running program -
How can I limit the number of instances of a program is being run?I need to limit the program to 1, sometimes 2. Tahnsk, pp


Database Query Question -
I have 3 tables TABLE: EMP PK - EMP-ID - EMP-NAME TABLE: ALTER PK - EMP-ID FK - EMP-ALTERNATE TABLE: LIMIT PK - EMP-ID - EMP-LIMIT And im trying to show every instance on the employees table. I've got my query to work fine with 2 tables but i cannot get it to


Limit on Console.Writeline -
The program I'm currently working on seems to hang while writing to the Console (I use this for debugging, to keep track of what the program is doing when it hangs.) I cleaned it up a little & it worked. It appears that there's a limit to the amount of information you can write to


countdown timer / time limit -
how can i make a time limit thing so i have a timer and i want it to countdown and show that limit counting doen on the form and when it gets to 0 the games finishes and thay lose


Updating when using Select Limit -
SELECT * FROM xxxx Where xxx Limit 1000 If there a way to update those 1000 records when using Limit or do I have to loop each record and update them one at a time? Either way any code you have to look at is appreciated. Thanks.


Limit to Number of Controls per Form -
In VB6 there was an imposed limit of 255 controls (not counting arrays) that could be on a form. Is there the same limit in .NET?


ListBox Limit -
Hi Someone can help me What is the len limit of each line in ListBox and how can bypass this limit ? Thanks! JP III


.Net ListBox Limit -
What is the limit for the number of items in a ListBox in .NET now? Or is there no limit at all?


Help me solve this limit before tuesday please :) -
I know this isn't even a maths forum as such but what the hell.. "If you ever meet a boastful mathematician, show him this limit.. it will keep him quiet for a while.." -- my calculus lecturer.. I've been given this to solve as a challenge: lim (as x --> 0) of


Variable or email limit -
Is there a character limit that the mail() can send or maybe a limit of variable size? I am trying to send an html email and it cuts it off. Any one have some insight on this issue?


limiting multiline texbox -
hi guys need a little help here. i have a scrolling multiline textbox that constantly outputs status messages for an application that runs 24-7. however, after letting the application run for a few hours, i reach the 64k limit of the textbox, and the program crashes. what i


Is there a Limit on Users for iis 5 server -
I have leased a dedicated server and would like to know if there is a limit to the number of users I can have in a group? Each user will also have a folder for their name on the domain with ftp access. Can I have 1,000 users on the server? Or should I limit it less? Thanks!


Quick Question about control limit. -
Is there anyway to create control more than the control limit amount? I need more than 200 controls, well not much actually, but i know it's more than the allowed amount. Why do they have to limit it anyway?


szinfo number of characters -
hi all Is there a way to increase the number of character in this varaible from 256 characters to NOLIMIT: Public Type NOTIFYICONDATA cbSize As Long hWnd As Long uID As Long uFlags As Long uCallbackMessage As Long hIcon As Long szTip As String * 128 dwState As Long dwSta


Increase the character size -
hi all Is there a way to increase the numbe of character in thsi varaible from 256 characters to NOLIMIT: Public Type NOTIFYICONDATA cbSize As Long hWnd As Long uID


Maximum Characters... -
Hello, We all know that the TextBox control has a character limit of 32,000... Is there a way to exceed this limit?


Is there an SQL LIMIT command for SQL Server -
Like there is in MySQL? I.e. SELECT <fields> FROM <tables> WHERE LIMIT 1


parameter limit -
Is there a limit to the number of parameters a sub or function can be setup with when using byVal?


Dataset character field limit -
I have a textbox tied to a dataset and then into an Access database. The textbox is set with a maxlength of 0. The field in the Access database is a memo field. Where the dataset is defined, the field is set as string. The textbox will accept unlimited (or 65000+) characters, and I