From: Jim Y on 2 Oct 2006 15:47 "Mike Williams" <Mike(a)WhiskyAndCoke.com> wrote in message news:%23wqgo2g5GHA.3444(a)TK2MSFTNGP02.phx.gbl... > "Jim Y" <jj819stuffNOSPAM(a)comcast.net> wrote in message > news:oKydnQg7RIhOH73YnZ2dnUVZ_oqdnZ2d(a)comcast.com... > > . . . by the way, just in case you don't know about User Controls, here is a brief rundown of how > to create one to suit your needs. First create a bitmap in any drawing package and use white for > any part of the bitmap that you wish to be transparent. Save it as a standard .bmp file. Now start > a new VB project (just one Form) and use the menu item Project / Add User Control. If there is > more than one available option the select a standard User Control. > > You will now see a design window that looks like a borderless Form. In the properties window set > its BackStyle to Transparent, its Picture property to the picture you created and also its > MaskPicture property to the picture you created. Finally set its MaskColor property to white. Now > close the User Control design window (the cross in the top right corner just below the main red > cross which would close the project). You will now see a new control in the list of available > controls. Just place it on your Form in the same way that you would for any other control. It > should be exactly what you want. > > Mike > > 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. I assume those that did not work were conversion files and not true .BMP files. 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? Thank you, Jim >
From: Jim Y on 2 Oct 2006 15:53 "Larry Serflaten" <serflaten(a)usinternet.com> wrote in message news:eXPcsue5GHA.1188(a)TK2MSFTNGP05.phx.gbl... > > "Jim Y" <jj819stuffNOSPAM(a)comcast.net> wrote > >> I would love to use the transparency feature except the program that I am using (Button Gadget) >> produces PNG and JPG formats. Only the PNG includes the transparency feature and VB will not >> accept >> the PNG format. I have used HiJaak to convert the graphic to BMP and MS Paint to color the >> background. I have been unable to convert the transparent feature in the process. I have tried >> various ways without success. If you have any suggestions, I am willing to try them. > > If it were me, I grab a snapshot of all the buttons and other transparent things, > and load them up into Paint Shop Pro to make individual GIF files. Those GIF > images could then be stored in Image controls on a hidden form. > > Any of the other forms that want to use those images would get them from the > hidden form. If there are a great many images, such that you don't want or need > to keep them all in memory, group them by functionality and put them on separate > forms so that you can load and unload them at will, as needed. > > VB does support tansparency in GIF images, when used with the Image control. > > LFS > > 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. Thank you, Jim Y
From: Karl E. Peterson on 2 Oct 2006 17:25 Michael C wrote: > Here's how to get a color from hue, saturation and luminance in c#. *slap* > Unfortunately I don't have code to convert an RGB color to HSL > because c# has built in functionality for this. If you mean that literally, as in you would consider yourself fortunate to have such code written in *ClassicVB*, I have some I'd be happy to share. -- Working without a .NET? http://classicvb.org/
From: Karl E. Peterson on 2 Oct 2006 17:29 Larry Serflaten wrote: > If it were me, I grab a snapshot of all the buttons and other > transparent things, and load them up into Paint Shop Pro to make > individual GIF files. Same here. > Those GIF images could then be stored in Image > controls on a hidden form. *cough* Not in a resource file? Really? -- Working without a .NET? http://classicvb.org/
From: Larry Serflaten on 2 Oct 2006 19:46
"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.... LFS |