Search:
Type: Posts; User: Elroy
Search:
Search took 0.04 seconds.
-
Not a problem.
--------------
Let me flesh it out just a bit more.
See comment in this example:
Option Explicit
-
Because a BSTR type string is nothing but a pointer in the UDT. And, when you send it through something like StringFromUdtViaPtr, all your getting is a copy of the string pointer, and not the actual...
-
I'm not sure what I'm trying to do. At most, I'm really just trying to make some intuitive tools for working with 32bpp RGBA PNG files, and using the GDI+ to do it. Anything I feel is useful, I'll...
-
Ahhh, of course. I didn't consider that. I'm not sure the OP was thinking of TypeLibs though. IDK.
-
I'm not sure, but I think maybe this is the confusion. The following compiles absolutely fine:
Option Explicit
Private Declare Sub asdf Lib "asdf" ()
Private Sub Form_Load()
...
-
Yep, it all seems to be working fine with UDTs. I included a BAS module with the following code (from posts #5 & #8 above) in both test projects, although I didn't use the FarMemoryFileExists...
-
Ok, I was putting together an example and I saw your problem. You've got BSTR type variable length strings in your UDT. That's an awful idea (as discussed in the OP), as they're only in there via...
-
Ahhh, ok, it's finally getting into my head. Some of the GDI+ documentation suggested that bitmap was more powerful/flexible than image ... MSDN:
But it appears the exact opposite is true:
...
-
Ok, I created an example using the vbString option of the class, as it seemed like that's what you were interested in (although I have confidence it'll work with any variable type).
Two projects...
-
*nods* Thanks for that though. :)
It's sort of a shame this didn't get more widely adopted, as it seems to have some very nice functionality ... if only it had a bit more documentation. ...
-
And several of the API calls in the "Bitmap" category will accept hGdipImage handles. That's what makes any distinction difficult to understand.
However, ...
... that does make some sense....
-
Also, as a secondary question, how would one convert an hGdipImage to an hGdipBitmap? I don't see any GDI+ call to do that. Also, I'd be interested in the vice-versa as well.
-
Yeah, I was thinking the same thing above. Basically, if we're willing to hack enough, we can change anything we like. But that just ignores the whole idea of scoping and lifetime. Niya talked...
-
Does anyone have a thorough grasp on the difference between these two, and why I might choose one over the other, and what circumstances a hGdipImage would be appropriate and when an hGdipBitmap...
-
Ahhh, yes, good point. Keoki, you need to make sure that Word 2007 or later is installed on the computer, or you won't be able to open these .docx, .docm, .dotx, nor .dotm files. That's when...
-
Well, that's not absolutely true. The code he's got (including uninstantiating the mWord object) looks like it should open the .docm file. The VB6 app will just no longer have any control of it. ...
-
This is some code that can be used with the post #1 code that will allow UDTs to be converted to Strings that are compatible with the vbString arrays.
Option Explicit
'
Private Declare Sub...
-
Dil, your vbMinimized check is definitely something I need to add.
-
Oh goodness Dil. You really went all out. Hmm, now I've possibly got some benchmarking to do to see which is fastest.
-
No problem. Let me/us know if you use this thing and how it performs.
I'm hoping Eduardo will jump back in and do some performance testing of this thing. It certainly won't perform as fast as...
-
Okey dokey. :) Here you go.
I just put it into a module named ArraysInFarMemory.bas:
Option Explicit
'
Private Declare Function CreateFileMapping Lib "kernel32" Alias...
-
If it is, you'll get a "File Already Open" error when you try and create (call to Initialize) your array. And that's entirely independent of what process has that far memory file open. Best advice...
-
Turns out that Autoredraw=True is faster.
Here's where I landed:
Option Explicit
'
Private Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long,...
-
Yes, I think that's better/faster. Also, I think yours is better with AutoRedraw=False, as it's drawing directly onto the background anyway, so no need for it to be True. Also, setting it to false...
-
Here, try this one for some fun.
Option Explicit
'
Dim miColor1 As Long, miColor2 As Long, miBoxSize As Long
'
-
Well, here's my first pass at this. I wouldn't mind tips to make it faster, but it seems to work pretty good the way it is.
(I'm not going to use Cairo just to do this, just FYI.)
Option...
-
Oh gosh, I don't want to use any PictureBoxes, and I want to pick any color I'd like. I've been working on some other stuff, but I'll get something together in a bit.
-
I'd like to generate a checkerboard background on a form, with the squares being any color I specify. And I'd also like it to be any size I'd like, possibly resizing (re-generating) when the form is...
-
Don't icons have the possibility of several actual images of different sizes in them? Which size do you want, the largest, all of them?
-
Ok, this is an idea I've been playing around with, inspired by some work by Dilettante and The Trick. And much thanks goes out to both of them.
My idea was to use those concepts and create a...
-
Ok, I've fixed the problem Eduardo was having (with the bug pointed out by The Trick).
I'm also going to move this whole thing over to the CodeBank. Please continue the discussion over there.
-
Also, just as another tip, I sometimes use Select Case True. This allows me to put a complete conditional statement in each Case test. That would allow the following to be done:
Dim strr() As...
-
Dim strr() As String
strr = Split(strData, ",")
Select Case strr(0)
Case "dc$$disconnectedd"
Debug.Print strr(0) & " " & "disconnected"
Case "dc$$tandaaa"
-
Well, in your post #3 case, you're leaving the "dc$$" pre-pended onto the beginning of your string. Just include that in your Select Case tests if that's the way you want it. Also, your test string...
-
Your second delimiter is a comma, and not "dc$$", so strr(1) after the Split() will, at a minimum, have a comma on the end of it, and it will also have whatever is in txtName.Text after the comma.
-
haha, ok, you've convinced me ... we're serializing. :p
-
Yeah, I'll soon look at what he did, and fix my class (using his guidance). I'm just sort of indolent right now.
-
Ahhh, thank you. I missed it somehow. And missing your posts is not something I should be doing. :)
-
Declare Function vbaCopyBytes Lib "msvbvm60.dll" Alias "__vbaCopyBytes" (ByVal length As Long, dst As Any, src As Any) As Long
Declare Function vbaCopyBytesZero Lib "msvbvm60.dll" Alias...
-
Hi Niya. I'm not sure I'd want to call this serialization. Many people tend to think that means what happens when we write them to a file, and this is different. It's really just copying the whole...
|
Click Here to Expand Forum to Full Width
|