From: Karl E. Peterson on
Larry Serflaten wrote:
> "Karl E. Peterson" <karl(a)mvps.org> wrote
>
>>> Those GIF images could then be stored in Image
>>> controls on a hidden form.
>>
>> *cough*
>>
>> Not in a resource file? Really?
>
> I never really got into using a resource file. When I did play with
> it, just to see how it worked, I had to write the file out in notepad
> and use RC.exe from the (VB5) CD. While they do provide a
> load-on-demand advantage, I didn't like their hidden nature. I
> couldn't go somewhere to see details (images or names) and
> adding more resources was also a bit long winded, (back to
> Notepad, recompile, re-link, etc.). If, as often happend, a
> small change was needed in an image, it was too long a process
> to effect the change.
>
> Stuffing images into a form was far more versatile, and easier
> to manage. I rarely used so much image data that leaving it all
> loaded was problem....

Man, you owe it to yourself to try the built-in "VB Resource Editor" add-in.
It's far from perfect, but it's *way* farther than that from RC.EXE! It's
true, you still can't "see" what's in a RES once compiled, but the names and
IDs are there, and editable. I suppose I lean towards them, anyway, because
I frequently store larger text blocks (of the sort displayed for Usage in a
console app, for example) and stuff like that. Plus, you can't mark an app
"Unattended" if there's even one form in it, right?
--
Working without a .NET?
http://classicvb.org/


From: Larry Serflaten on

"Jim Y" <jj819stuffNOSPAM(a)comcast.net> wrote

> I found a wide ranges of prices for the Corel Paint Shop Pro X. Is there a specific model (?)
> number that I should seek? I don't want to pay $114.00 if I can get the correct version for $29.95.

Don't pay anything. There are plenty of free GIF editors, pick one and try it out.
http://www.google.com/search?hl=en&lr=&q=free+GIF+editor

LFS




From: Mike Williams on
"Jim Y" <jj819stuffNOSPAM(a)comcast.net> wrote in message
news:1P-dnX-CAoM78bzYnZ2dnUVZ_sadnZ2d(a)comcast.com...

> I found that some of the graphics that I had tried did not work,
> but I did find a couple of .BMP graphics that did work.

God! How I hate that phrase, "did not work"! What was it about the graphics
that "did not work"? You need to be specific. Without more details from you
I can only assume that some of the graphics you tried did not produce
transparency of the User Control in areas where the graphic was white. If
that is the case then the area probably wasn't white at all, but merely
"looked white". The areas that you wish to be transparent need to be
*exactly* the same colour as your User Control's MaskColor property (white
in the case of the specific example I posted). Most jpg picture files for
example can contain a dozen or more completely different "non white" pixel
colours in an area that to the naked eye looks like solid white. That is why
I said you should use bitmaps.

> In any case, I have a graphic that has a transparent background.
> This is less of a problem than what I was trying. To advance to the
> next step, I tried to get it act as a command control without success.
> I tried placing it on an Image Control and tried using it alone on the
> form - neither worked. My Click sub did nothing. Can you help?

Just place your User Control directly onto the Form in the usual way. If you
then double click it on the Form (in the VB IDE) you will see that it has
only a limited number of Events (typically DragDrop, DragOver, GotFocus,
LostFocus and Validate, although this may be different on different
systems). To get a Click event , for example, you need to add one. You can
call the events you add by any name you want. You can add an event in the
following manner:

Create your User Control (Project / Add User Control) and set its Picture,
MaskPicture, MaskColor and BackStyle properties in the way previously
described. Then double click the User Control to open up the User Control's
code window and paste in the following code (making sure it replaces any
code that VB may have already placed there for you):

Option Explicit
Public Event SomebodyClickedMe()

Private Sub UserControl_MouseUp(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
RaiseEvent SomebodyClickedMe
End Sub

Now close the user Control's design window as previously described. You will
now see the User Control in the list of available controls. Add one to your
Form in the usual way. Now double click the User Control on your Form and
you'll see that in addition to the previously mentioned events it now has
another even called "SomebodyClickedMe". You can use that event in your VB
Form in the same way that you would use any other event. For example:

Private Sub UserControl11_SomebodyClickedMe()
Me.Caption = Val(Me.Caption) + 1
End Sub

Mike







From: Jim Y on

"Mike Williams" <mike(a)WhiskyAndCoke.com> wrote in message
news:OqQVv6H6GHA.4116(a)TK2MSFTNGP03.phx.gbl...
> "Jim Y" <jj819stuffNOSPAM(a)comcast.net> wrote in message
> news:1P-dnX-CAoM78bzYnZ2dnUVZ_sadnZ2d(a)comcast.com...
>
>> I found that some of the graphics that I had tried did not work,
>> but I did find a couple of .BMP graphics that did work.
>
> God! How I hate that phrase, "did not work"! What was it about the graphics
> that "did not work"? You need to be specific. Without more details from you
> I can only assume that some of the graphics you tried did not produce
> transparency of the User Control in areas where the graphic was white. If
> that is the case then the area probably wasn't white at all, but merely
> "looked white". The areas that you wish to be transparent need to be
> *exactly* the same colour as your User Control's MaskColor property (white
> in the case of the specific example I posted). Most jpg picture files for
> example can contain a dozen or more completely different "non white" pixel
> colours in an area that to the naked eye looks like solid white. That is why I said you should use
> bitmaps.
>
>> In any case, I have a graphic that has a transparent background.
>> This is less of a problem than what I was trying. To advance to the
>> next step, I tried to get it act as a command control without success.
>> I tried placing it on an Image Control and tried using it alone on the
>> form - neither worked. My Click sub did nothing. Can you help?
>
> Just place your User Control directly onto the Form in the usual way. If you
> then double click it on the Form (in the VB IDE) you will see that it has
> only a limited number of Events (typically DragDrop, DragOver, GotFocus,
> LostFocus and Validate, although this may be different on different
> systems). To get a Click event , for example, you need to add one. You can
> call the events you add by any name you want. You can add an event in the
> following manner:
>
> Create your User Control (Project / Add User Control) and set its Picture,
> MaskPicture, MaskColor and BackStyle properties in the way previously
> described. Then double click the User Control to open up the User Control's
> code window and paste in the following code (making sure it replaces any
> code that VB may have already placed there for you):
>
> Option Explicit
> Public Event SomebodyClickedMe()
>
> Private Sub UserControl_MouseUp(Button As Integer, _
> Shift As Integer, X As Single, Y As Single)
> RaiseEvent SomebodyClickedMe
> End Sub
>
> Now close the user Control's design window as previously described. You will
> now see the User Control in the list of available controls. Add one to your
> Form in the usual way. Now double click the User Control on your Form and
> you'll see that in addition to the previously mentioned events it now has
> another even called "SomebodyClickedMe". You can use that event in your VB
> Form in the same way that you would use any other event. For example:
>
> Private Sub UserControl11_SomebodyClickedMe()
> Me.Caption = Val(Me.Caption) + 1
> End Sub
>
> Mike
You are correct "... did not work." is a terrible phrase when one is attempting to explain a
problem. You did get it correct that the transparency did not happen in the process. I will double
check the white background on those GIFs which did not produce a transparent background.

The only written information that I have found in my texts describing the UserControl show the same
text box example. I appreciate your help.

Thank you,
Jim