|
-
Nov 6th, 2013, 03:49 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Text Length Limit on MESSAGEBOX API ?
Hello PPl,
So I'm using the API version of the messagebox to support Unicode text etc..
Code:
Private Declare Function MessageBox Lib "user32.dll" Alias "MessageBoxW" (ByVal hWnd As Long, ByVal lpText As Long, ByVal lpCaption As Long, ByVal wType As Long) As Long
However there is this size limit which trims off longer bits of text?!
Is there a workaround to increase the buffer size? other than replacing a Fake MSGBOX with a form?
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Nov 6th, 2013, 03:59 PM
#2
Re: Text Length Limit on MESSAGEBOX API ?
How much text are you able to get the MessageBox API to display? When I tried it before on XP, I was able to display so much text that the dialog box was several times higher than my screen height. Are you certain there are no vbNullChars in the string that you pass to the MessageBox API?
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
-
Nov 6th, 2013, 04:26 PM
#3
Re: Text Length Limit on MESSAGEBOX API ?
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Nov 6th, 2013, 04:29 PM
#4
Thread Starter
Frenzied Member
Re: Text Length Limit on MESSAGEBOX API ?
aaaaaaaaaah ... after a few tests... i got it.... its not the MSGBOX causing this, its my INI CLASS which had a buffer size limit of 255 :/
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Nov 6th, 2013, 04:34 PM
#5
Re: [RESOLVED] Text Length Limit on MESSAGEBOX API ?
I can only get 900+ some characters with MsgBox no matter how many characters are in the string.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Nov 7th, 2013, 07:46 AM
#6
Re: [RESOLVED] Text Length Limit on MESSAGEBOX API ?
 Originally Posted by jmsrickland
I can only get 900+ some characters with MsgBox no matter how many characters are in the string.
That's a limitation of VB6's MsgBox function. However, as far as I can tell, the MessageBox API is probably limited only by the amount of virtual memory available or the maximum length of VB dynamic Strings (~ 2 GB), whichever is lower.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|