vb6

Conversion Single To Hex

冷暖自知 提交于 2021-01-29 07:32:43
问题 I am trying to convert the following VB6 code to VB.NET: Public Function SingleToHex(ByVal Tmp As Single) As String Dim TmpBytes(0 To 3) As Byte Dim TmpSng As Single Dim tmpStr As String Dim x As Long TmpSng = Tmp Call CopyMemory(ByVal VarPtr(TmpBytes(0)), ByVal VarPtr(TmpSng), 4) For x = 3 To 0 Step -1 If Len(Hex(TmpBytes(x))) = 1 Then tmpStr = tmpStr & "0" & Hex(TmpBytes(x)) Else tmpStr = tmpStr & Hex(TmpBytes(x)) End If Next x SingleToHex = tmpStr End Function I tried to find a function in

Conversion Single To Hex

心已入冬 提交于 2021-01-29 07:17:20
问题 I am trying to convert the following VB6 code to VB.NET: Public Function SingleToHex(ByVal Tmp As Single) As String Dim TmpBytes(0 To 3) As Byte Dim TmpSng As Single Dim tmpStr As String Dim x As Long TmpSng = Tmp Call CopyMemory(ByVal VarPtr(TmpBytes(0)), ByVal VarPtr(TmpSng), 4) For x = 3 To 0 Step -1 If Len(Hex(TmpBytes(x))) = 1 Then tmpStr = tmpStr & "0" & Hex(TmpBytes(x)) Else tmpStr = tmpStr & Hex(TmpBytes(x)) End If Next x SingleToHex = tmpStr End Function I tried to find a function in

Memory full error when exporting crystal report to pdf

天大地大妈咪最大 提交于 2021-01-28 12:14:56
问题 we have a legacy application written in visual basic 6.0. This application first saves the rendered crystal report into a directory as a pdf document. Then we take that document and store in database as a blob. Following is a snippet of the code. When the application has to render reports for say 1000 employees, it runs half-way through and throws "Memory full" error on ".Export false" line. If I hit play button after it throws the exception, it works fine. But, someone has to watch for it

INI File With Duplicate Keys

痞子三分冷 提交于 2021-01-28 08:22:40
问题 Say I have an INI file like so: [123] name=Ryan name=Joe How would I retrieve "name=Ryan\nname=Joe" using API calls such as GetPrivateProfileSection and GetPrivateProfileString? 回答1: Yes, GetPrivateProfileSection will return it. GetPrivateProfileString() can obviously only ever retrieve "Ryan". You won't get the string handed to you like you want, the name/value pairs are separated by a zero. The end of the list is indicated by two zeros. You'll need to account for that when you parse it. 来源:

debug php-cgi.exe + vb6 dll

我的未来我决定 提交于 2021-01-28 08:10:10
问题 I'm calling through php a vb6 .dll (IIS) and on some rare and weird occasions when i call a particular function the php-cgi.exe crashes with message: the instruction 0x029b7387 referenced memory at "0x0f138000". The memory could not be written. Click OK to terminate, click cancel to debug the memory address might slightly change but always ends in 8000. Is there any way to debug and find out what is wrong with my .dll ? thanks in advance. 来源: https://stackoverflow.com/questions/14502834/debug

How to implement advanced custom properties in VB6 usercontrols?

北城余情 提交于 2021-01-28 05:59:11
问题 Sorry I don't know how to name it other than "advanced custom properties". If I know, I would search it first. I am dealing with a legacy code using 3-rd party controls. In VB6, When you drag that control onto the form, you can see all the properties supported by the control in the "Properties" window. Such as MarginLeft, MarginRight etc. etc. That's no problem. In the "Property" window, the top-most property is generally the "(Name)" field, which is the name of the control. But the 3-rd

could anyone guide me on this byref arguement type mismatch error?

感情迁移 提交于 2021-01-28 00:33:04
问题 The code had been deleted due to the question was being solved. Really appreacite all the help question is being solved so really appreciate all the help from the community.Love u all 来源: https://stackoverflow.com/questions/65771596/could-anyone-guide-me-on-this-byref-arguement-type-mismatch-error

creating a custom odbc driver for application

China☆狼群 提交于 2021-01-27 21:20:22
问题 Ok, i have a simple database engine (its a proprietary product written in vb6) for one of my applications... i'd like to create an ODBC driver for it so i can use some of my other applications (which require a database) with my database engine rather than microsoft sql (which they are currently using).... Does anyone have any heads up on how to develop an ODBC driver (preferably in vb6) ... i'v spent the last few hours googling it and havnt had much luck... about the best thing i have found

How to specify a sound card for use with mciSendString API

旧城冷巷雨未停 提交于 2021-01-27 19:42:03
问题 I am updating an old VB6 app. Back in the day, I coded a wrapper around the mciSendString command to be able to record and playback audio. Back then, computers typically had a single audio card. Now, many of the customers have multiple sound cards (typically a built in one and a USB headset). I can't seem to find the API to specify which sound card to use with mciSendString. Can someone point me in the right direction? 回答1: Please check out several solutions here with sourcecode (Ergebnisse

vb6 to vb.net dll compatibility version

若如初见. 提交于 2021-01-27 13:32:53
问题 I explain my problem : I have some program (5-6) in vb6, and a lot of DLL in vb6. We will perform a migration of these DLL and program in Vb.Net. We want to start with DLL, and each program references 2 or 3 DLL. I want to perform the migration of the DLL in vb.net (no problem for that) but i want to keep the (binary) compatibility between my old vb6 DLL and the new one in vb.net Because without that i will have to re build each application using this DLL because the compatibility is broken.