Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialog boxes and Icon buttons

Status
Not open for further replies.

cryptotech

Technical User
Nov 9, 2007
26
US
Somewhat new at scripting, but I use dialog boxes with pushbuttons in a lot of my scripts and I like things to look cool in addition to making my tasks easier.

My question is how can I make pushbuttons out of different bitmaps?
GIF's can't be used and I can't seem to resize Icon buttons to make them bigger.
I thought of putting a hotspot over a bitmap in a user window, but the bitmap doesn't display, just a white background with the hotspot where I put it...

This is just a test where I have a hotspot set to just exit the userwindow when clicked.

proc main
integer event

uwincreate full screen 100 255 255 255 bitmap
bitmapbkg center center memory "intro.bmp"
hotspot 101 6836 4466 2383 1354 userwin

while 1 ; Loop forever.
if (Event = $OBJECT) != 0
switch Event
case 101
exitwhile
endcase
endswitch
endif
endwhile
uwinremove
endproc

Any helpful ideas on how to work with graphics (however limited the options may be with Aspect) would be appreciated! thanks!


 
Graphics are pretty limited in ASPECT dialogs. I think your best bet would be using software to convert GIFs or other images you are interested in using into bitmaps. I think the newer versions of Paint that ships with Windows can handle this, but if not there should be many freeware/shareware utilities that can handle the job. I've also used such tools in the past to pull icons out of DLLs if that is what you were referring to by icon buttons.

In your particular script, you need to add the uwinpaint command after the hotspot command so that the complete user window is repainted. Otherwise the bitmap will not appear unless you switch to a different window and come back to Procomm.

I suspect that your coordinates in the hotspot command are too large and that they are not visible within the bounds of the Procomm window, but that is just a guess as I've not done much work with user windows. You might consider building your user window with the User Window Editor tool under the Tools | Scripts menu item.

 
I don't know for sure about this, but it seems that .ico icons are the most supported format.

Would any of you know of a good program or tutorial for converting/creating graphics to .ico files?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top