vb6

Image Created using GDI+ is not showing in VB6 LeadTools

家住魔仙堡 提交于 2019-12-31 05:37:10
问题 We have legacy applications built using VB6. These applications are using lead-tools. Everything was perfectly working. We have another .NET process that optimizes the image (and do some water-marking) and save it in tiff format. Here is glimpse of .NET code, using (var bitmap = new Bitmap(contractWidth, contractHeight)) { using (var canvas = Graphics.FromImage(bitmap)) { canvas.InterpolationMode = InterpolationMode.Default; // Play with canvas canvas.Save(); } using (var stream = new

How to automate response to msgbox

依然范特西╮ 提交于 2019-12-31 04:16:09
问题 I am developing a C# application to automate the running of a legacy VBScript(vbs) file which calls several VB6 .exe files. The .exe files have message box pop-ups that I need to 'respond' to in order to allow the VBScript process to run unattended. The response would need to be the Enter key. I do not have the source for the .exe files and I do not know exactly what they do. I would greatly appreciate any help with this... 回答1: You might find AutoIt helpful. AutoIt v3 is a freeware BASIC

Utility to Convert Legacy VB6 Function Calls to .NET [closed]

拟墨画扇 提交于 2019-12-31 03:03:13
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I am looking for a utility/tool to convert calls to legacy VB6 functions to the .NET equivalent. For example, it would convert this...

VB6 - Declaring and calling C DLL with pointers

半腔热情 提交于 2019-12-31 01:58:09
问题 I have an old C DLL I use to call from Ruby, but now I need to call it from VB6 and I can't figure out the correct way to do so. Here is the header for the function I need: int Decrunch(const BYTE *src, BYTE *dest, DWORD src_length) *src is a sequence of bytes which will be decrypted by the function *dest is a buffer which will recieve the decrypted data. I can call the function with dest=NULL and it will return the size of the decrypted data, so I can use it to create the buffer with the

VB6 Application timing

情到浓时终转凉″ 提交于 2019-12-30 23:23:16
问题 I am attempting to profile a VB6 application. Basically I wanted to work out at a method by method level how much time execution is taking. However VB6 only supports times to 1 sec. Is there any good way of working out millisecs etc ? 回答1: Although MSDN says Timer is only accurate to 1 second, I've found it's better than that in practise. GetTickCount is typically accurate to about 10 to 16 milliseconds. Here's a VB6 declaration. Declare Function GetTickCount Lib "Kernel32" () As Long The

How to read and write interoperable strings to a binary file between .NET and vb6

烂漫一生 提交于 2019-12-30 18:09:08
问题 I have a new program I am writing in C#, it will need to read and write binary files that are compatible with vb6's binary format. I can not change the vb6 program but I can make changes to my program. I have everything working except I am a little iffy about strings. If I write the following in vb6 Private Type PatchRec string As String End Type Private Sub Command1_Click() Dim intFileNum As Integer Dim recTest As TestRec intFileNum = FreeFile Open "E:\testing" & "\" & "testfile" & ".bin"

ReDim Preserve “Subscript Out of Range”

偶尔善良 提交于 2019-12-30 17:44:12
问题 I am trying to move data from 2 Double Arrays to 2 different Double Arrays. I'm not sure what the size is going to be because I am taking a randomized sample out of the first arrays and putting it into the 2nd arrays. When I add the ReDim Preserve line I get the Subscript Out of Range error. Function CreateTrainingSet(TrainingPercent As Double, Inputs() As Double, Outputs() As Double) ' Create Randomized Training set data Dim TrainingInputs() As Double, TrainingOutputs() As Double Dim i As

ReDim Preserve “Subscript Out of Range”

删除回忆录丶 提交于 2019-12-30 17:43:03
问题 I am trying to move data from 2 Double Arrays to 2 different Double Arrays. I'm not sure what the size is going to be because I am taking a randomized sample out of the first arrays and putting it into the 2nd arrays. When I add the ReDim Preserve line I get the Subscript Out of Range error. Function CreateTrainingSet(TrainingPercent As Double, Inputs() As Double, Outputs() As Double) ' Create Randomized Training set data Dim TrainingInputs() As Double, TrainingOutputs() As Double Dim i As

How to get time elapsed in milliseconds

↘锁芯ラ 提交于 2019-12-30 17:36:26
问题 Since performance of string concatenation is quite weak in VB6 I'm testing several StringBuilder implementations. To see how long they're running, I currently use the built-in Timer function which only gives me the number of seconds that have passed after midnight. Is there a way (I guess by importing a system function) to get something with milliseconds precision? 回答1: Yes, you can use the Win32 API: DWORD WINAPI GetTickCount(void); To import it in VB6 declare it like this: Private Declare

Code to make a DHTMLEd control replace straight quotes with curly quotes

好久不见. 提交于 2019-12-30 17:24:10
问题 I've got an old, legacy VB6 application that uses the DHTML editing control as an HTML editor. The Microsoft DHTML editing control, a.k.a. DHTMLEd, is probably nothing more than an IE control using IE's own native editing capability internally. I'd like to modify the app to implement smart quotes like Word. Specifically, " is replaced with “ or ” and ' is replaced with ‘ or ’ as appropriate as it is typed; and if the user presses Ctrl+Z immediately after the replacement, it goes back to being