VB4 16 bit LoadPicture not accepting above ascii 127 chars 
Author Message
 VB4 16 bit LoadPicture not accepting above ascii 127 chars

I use VB 4 in Denmark, where we have some more letters in the
alphabet than in the USA.

I am converting a 32 bit application to an 16 bit application.

I can't load pictures into my image-control with LoadPicture
in this version if the filenames contains these Danish
letters.

During design time I can load the same pictures by the
property-window without problems, so the problem is not
in the control, but in the LoadPicture function.

Do any one know about a bug fix for this, or a suggestion
for working around, e.g. a way to load pictures from disk
other than the LoadPicture function?

Palle M. Pedersen
Neuropsychologist
The Aphasia Computer Rehabilitation Project



Mon, 13 Sep 1999 03:00:00 GMT  
 VB4 16 bit LoadPicture not accepting above ascii 127 chars

its a way the unicode characters and ansi code characters get translated
during runtime

--
Michael Gernaey
Microsoft Corporation( I don't own it I just work there ;) )
MSN Operations Development
NT/SQL Server VB/C++



Quote:
> I use VB 4 in Denmark, where we have some more letters in the
> alphabet than in the USA.

> I am converting a 32 bit application to an 16 bit application.

> I can't load pictures into my image-control with LoadPicture
> in this version if the filenames contains these Danish
> letters.

> During design time I can load the same pictures by the
> property-window without problems, so the problem is not
> in the control, but in the LoadPicture function.

> Do any one know about a bug fix for this, or a suggestion
> for working around, e.g. a way to load pictures from disk
> other than the LoadPicture function?

> Palle M. Pedersen
> Neuropsychologist
> The Aphasia Computer Rehabilitation Project




Tue, 14 Sep 1999 03:00:00 GMT  
 VB4 16 bit LoadPicture not accepting above ascii 127 chars

Quote:

> its a way the unicode characters and ansi code characters get translated
> during runtime

> --
> Michael Gernaey
> Microsoft Corporation( I don't own it I just work there ;) )
> MSN Operations Development
> NT/SQL Server VB/C++



> > I use VB 4 in Denmark, where we have some more letters in the
> > alphabet than in the USA.

> > I am converting a 32 bit application to an 16 bit application.

> > I can't load pictures into my image-control with LoadPicture
> > in this version if the filenames contains these Danish
> > letters.

> > During design time I can load the same pictures by the
> > property-window without problems, so the problem is not
> > in the control, but in the LoadPicture function.

> > Do any one know about a bug fix for this, or a suggestion
> > for working around, e.g. a way to load pictures from disk
> > other than the LoadPicture function?

> > Palle M. Pedersen
> > Neuropsychologist
> > The Aphasia Computer Rehabilitation Project


I finally solved my problem:

I call the Windows 3.1 function AnsiToOem before passing the string
to LoadPicture

Declare Function AnsiToOem Lib "Keyboard" (ByVal lpAnsiStr As String, _
   ByVal lpOemStr As String) As Integer

Dim retval As Integer
Dim tempStr As String * 255
Dim tempAStr As String * 255

retval = AnsiToOem(tempAStr, tempStr)

I don't know why that solves the unicode problem (or why there
should be unicode in 16 bit VB4. But it works ok

Palle M. Pedersen



Thu, 16 Sep 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How can I retrieve dos Ascii Chars in VB6 as Codes above 127 are not similar to dos in Windows

2. How can I retrieve dos Ascii Chars in VB6 as Codes above 127 are not similar to dos in Windows

3. Calling 16 bit DLL from VB4 16 bit in Win 95

4. Russian(Cyrillic): vb4 32-bit works, but vb4 16-bit doesn't

5. ASCII Problem in VB.Net no character greater than 127

6. ASCII 127

7. Object Server not Correctly Register in Vb4 16 bit

8. Creating 16 bit vb4.0 app under '95 will not run under win 3.1

9. Why does Crystal Reports not run with the 16-bit VB4 version

10. VB4 (16-bit) app calling LoadLibrary() not working on Win98

11. Passthrough queries fail in 16-bit VB4, succeed in 32-bit

 

 
Powered by phpBB® Forum Software