Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Problem with XP-Style Visuals


Reply
 
Thread Tools Display Modes
  #1  
Old 12-19-2005, 10:27 AM
Nilhanth's Avatar
Nilhanth Nilhanth is offline
Centurion
 
Join Date: Oct 2004
Location: UK
Posts: 129
Default Problem with XP-Style Visuals


I'm sure most of you are aware of the ".manifest" plugin you can use with visual basic so you can make the buttons/textboxes/etc look like XP ones.

Well, I have a problem with it! I can't seem to have XP-style buttons AND have them in graphical mode for pictures at the same time!?! Is there a way around this at all?

Thanks!
Reply With Quote
  #2  
Old 12-19-2005, 06:33 PM
guest_5432 guest_5432 is offline
Junior Contributor

* Expert *
 
Join Date: Nov 2005
Posts: 259
Default Duplicating or mimic-ing WinXP Theme Visual Styles using VB6

Quote:
Originally Posted by Nilhanth
Is there a way around this at all?
Unfortunately the manifest file IS the workaround.

But of course there are other ways..

1.) You could create your own WinXP specific usercontrol
2.) You could subclass
3.) You could use a picturebox containing a graphic image that looks like the command button (but modified to suit your particular WinXP Visual Style needs). The limitation with using pictureboxes is that they are rectangular, but you can use custom regions to reshape the picturebox into maybe an oval/elliptical pill-shape (rounding the corners like a rounded rect and letting the form's background show through at the corners).
4.) You could take a "virtual command button" approach with a little Bitblt-ing and PtInRect testing:
http://www.xtremevbtalk.com/showpost.php?p=797088

..for multiple virtual controls the "amtar" technique can be substituted for multiple (looping) PtInRect calls:
http://www.xtremevbtalk.com/showpost.php?p=1061210

Note: The VB6 controls are ever more showing their age and this issue will may come to the forefront even more when the next version of Windows (Vista/Longhorn) is released with a whole new set of U/I elements like those found in the current Office 12 beta.
Reply With Quote
  #3  
Old 12-20-2005, 02:15 AM
Flyguy's Avatar
Flyguy Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 18,884
Default

See the attachment in the 3th post in this thread:
http://www.xtremevbtalk.com/showthread.php?t=224641
Reply With Quote
  #4  
Old 12-22-2005, 06:16 AM
Nilhanth's Avatar
Nilhanth Nilhanth is offline
Centurion
 
Join Date: Oct 2004
Location: UK
Posts: 129
Default

Ah thanks Flyguy! Much appreciated!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->