DWUTKA at marlow.com
DWUTKA at marlow.com
Fri Dec 23 18:56:44 CST 2005
http://www.marlow.com/HiddenAccess2k.zip Same as before, but I added a ShapeForm routine. You just feed it the name of the shape you want (no, you can't just pick a shape, read on.... <grin>), and then me.hWnd, it does the rest. (Quick note on that, shaping a form can leave extraneous stuff out there, so remove the border and record selectors, otherwise they show up in your shape. There is also an .exe in this zip. It's a quick VB program I wrote (definitely not crash proof, so pay attention). Step One: Click Picture --> Open Picture. Select the picture you want the 'shape' of. Step Two: Click Picture --> Analyze Picture. This will give you colored boxes down the left side of the form (the bigger the picture, and the more colors, the longer it takes....if you go more then will display sorry, I'll send the source if you want, this was a nitty gritty demo for William.) Step Three: Click the colored boxes that have the colors that you want in your shape. (ie, if you have an american flag, on a black background, you would click the red, white and blue boxes, each time, you will notice that 'color's shape' added to the bottom picture (in red). Step Four: Click Picture --> Build Form Shape. Crucial step, and may take a few seconds, depends on how big the shape is. It will give you a message box when it's done. When you have the shape built, you can either test it with the other commands under the Picture menu, or save it to a database with the Save Menu. You will need tblFormShapes to be in the database you selected. As for a technical aspect of what this does, here's the rundown. The VB program 'builds' a region, based on the color of the pixels. It does this by adding tiny regions together. When it's done, it uses and API call to get that region as a Byte Array. When you save it to the database, it stores a string version of that Byte Array into a memo field. The ShapeForm code, in the sample database then converts that memo field back into a byte array, uses another API to recreate the region (which goes MUCH faster then creating it from smaller regions) and sets that region to your form. There is a second shape in that sample database. If you want to see it, change the ShapeFrom "For William", Me.hWnd in frmTwo's OnLoad event to ShapeForm "Full Question Mark", Me.hWnd. Merry Christmas William, you can send me a 12 pack of the beer of your choice.... ;) Drew -----Original Message----- From: William Hindman [mailto:wdhindman at bellsouth.net] Sent: Friday, December 23, 2005 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Hiding the Access Window WAS: access xp runtime ...you're giving me heart failure today ...I e'd you a logo sample :) William ----- Original Message ----- From: <DWUTKA at marlow.com> To: <accessd at databaseadvisors.com> Sent: Friday, December 23, 2005 3:31 PM Subject: Re: [AccessD] Hiding the Access Window WAS: access xp runtime > No it isn't, you just need to have a bitmap in that shape. Then you > create > a region based on that bitmap, and set that region to your form. Got the > logo you want to use? > > Drew > > -----Original Message----- > From: William Hindman [mailto:wdhindman at bellsouth.net] > Sent: Friday, December 23, 2005 2:30 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Hiding the Access Window WAS: access xp runtime > > > ...yada, yada, yada code boy :) > > ...been doing rounded, oval, and elliptical forms for years ...I'll take a > look at your code though and see if there's anything worth changing my > current default sfgui module for ...but rounded forms are hardly more than > a > > toy ...what I want is to be able to take a graphic like the Texas > Instruments logo and shape a form to fit its bounds ...that's a sight more > complicated, eh :) > > William >