Important alert: (current site time 7/16/2013 3:10:08 AM EDT)
 

winzip icon

WINDOWS XP CONTROLS created in VB6

Email
Submitted on: 11/11/2001 8:44:27 AM
By: Ming Han  
Level: Intermediate
User Rating: By 84 Users
Compatibility: VB 6.0
Views: 60791
author picture
(About the author)
 
     This is the creation of Windows XP Controls in Visual Basic 6! This is REAL created Windows XP. LOOK AT SCREEN SHOT! Basically, Windows XP is made up of graphics and it has a very complicated User Interface. This project has been designed according to the Windows XP Guidelines. Additional resources have been provided. Please VOTE!

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 7 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

11/11/2001 8:53:36 AMMH

Any comments or suggestions? Vote!
(If this comment was disrespectful, please report it.)

 
11/11/2001 9:40:06 AMJC

I am very impressed!! This is excellent work and I was trying to figure out how to do something like this myself but you saved me the trouble. Very nice job...5 globes and code of the month as far as I'm concerned.
(If this comment was disrespectful, please report it.)

 
11/11/2001 11:53:22 AMRick

I've never voted for anyones code before but I had to here. This is great work.
(If this comment was disrespectful, please report it.)

 
11/12/2001 2:00:41 AMMH

This project have been updated. There is less flickering now. Thanks for all the comments and suggestions.
(If this comment was disrespectful, please report it.)

 
11/12/2001 6:20:59 AMHerman Schutte

Very GOOD!!! It works like a charm!
(If this comment was disrespectful, please report it.)

 
11/15/2001 4:38:53 PMDP

Cool Sample Dude! Keep up the good work 5 globes from ME! (New Zealand)
(If this comment was disrespectful, please report it.)

 
11/24/2001 10:52:50 AMJaime Borges

Excellent Job, I downloaded this code with my tipical excepticism on the author being able to imitate XP in some way. I must say it blowed me away with the imaginative ways (like the Windows logo animation) this author pulls the MOST IMPRESSIVE WIN XP CONTROLS AND SCREEN i have seen, made for any Windows system. Tested it in Windows 2000 Adv. Server and it Works flawlessly. FIVE GLOBES FROM ME!!
(If this comment was disrespectful, please report it.)

 
11/24/2001 12:25:31 PMMikael Nordfelth

I don't like OCXs, but I guess this is the only way to do these Buttons.
(If this comment was disrespectful, please report it.)

 
12/17/2001 9:45:09 PMXIX

Once the flickering is completely gone it will be an excellent project.
(If this comment was disrespectful, please report it.)

 
12/27/2001 5:00:31 PMRev. Michael L. Burns

I love it. So far I only have a few things to add to the wish list.

1) I wish you had designed the xp_canvas1 with an align property so that it could be used directly on a MDIForm. This would be helpful to me since I have several projects that I am working or about to start that will use a MDI interface.

2) The xpgroupbox looks great. What about an input box. An XP style from looks down right crudy with a stardard stype message box.

3) A status bar would be helpful as well.

Thanks again for some really nifty tools. Looking forward to more to come.

Rec. Michael L. Burns
(If this comment was disrespectful, please report it.)

 
12/29/2001 1:10:04 AMgh0ul

ok... this is a dumb question but every body seems to use 'em I don't have it. Looked all over for it. WHere can I get the picClip control??
(If this comment was disrespectful, please report it.)

 
12/29/2001 3:01:37 AMMing Han

The picClip control comes with vb.
(If this comment was disrespectful, please report it.)

 
12/29/2001 3:12:58 AMgh0ul

I know... can't find it in the refs, or components. Everytime I load a project that references it, it always sez the control is missing.

Errors:
Line 67: Class PicClip.PictureClip of control pc2 was not a loaded control class.
Line 88: Class PicClip.PictureClip of control pcimg was not a loaded control class.
Line 98: Class PicClip.PictureClip of control pcimg was not a loaded control class.

(If this comment was disrespectful, please report it.)

 
12/29/2001 4:56:03 AMluthfi

Hi, i like your code, but it kinda heavy so i modified it and upload it back to PSC, you coul find it under 'Ming Han's XP button Update'
(If this comment was disrespectful, please report it.)

 
12/29/2001 7:33:19 AMMing Han

Thanks Luthfi

And Thanks to everyone for their comments and feedback and votes!
(If this comment was disrespectful, please report it.)

 
12/29/2001 8:24:05 AMMing Han

'Ming Han's XP button Update' is at http://www.planet-source-code.com/xq/ASP/txtCodeId.30195/lngWId.1/qx/vb/scripts/ShowCode .htm
(If this comment was disrespectful, please report it.)

 
12/30/2001 9:25:14 PMElly

Impressive and great work! Very new to VB programming and this really helps to improve my interface.
Got a problem though. I can't create 2 group of radio buttons. Clicking on 1 of the radio button in one group will cancel out the selection of the radio button in another group.
Example
Group colour = yellow, red
Group number = 1, 2, 3
Selecting the radio button in the colour group, will cancel off the selection in the number group. Is there a way to work through that??

Thanks!
(If this comment was disrespectful, please report it.)

 
12/30/2001 11:45:53 PMMing Han

Still trying to figure out how.
Does anybody have any suggestions?

What you can do is to delete this lines in the click event of xpradiobutton(usercontrol code):

For Each rd In UserControl.Parent
If TypeOf rd Is xpradiobutton Then
rd.Value = False
End If
Next rd

You can then design a sub to return false for all other controls in your group on the form.
Then in the click event of this control put control.value =true
eg:
Private Sub op1_Click()
call falsegroup1
op1.value = true
End Sub

(If this comment was disrespectful, please report it.)

 
12/31/2001 8:28:35 PMGrout

Could you please send me the binaries.
Thanks
(If this comment was disrespectful, please report it.)

 
1/6/2002 12:11:37 PMdaryl

umm i dont know there is a windows xp start bar in the vb part search for nick ridley and you will find theres a great taskbar but theres bugs i know for fact that hes got a good one and he should be uploading it soon
(If this comment was disrespectful, please report it.)

 
1/6/2002 3:27:10 PMSolomon

THis is just what I was looking for. Great coding. PLEASE keep up the good work. I will keep an eye out for you here in the future. 5 GLobes form me...
(If this comment was disrespectful, please report it.)

 
1/6/2002 11:15:04 PMJeff Khor

Is it your work, Fantasic.
(If this comment was disrespectful, please report it.)

 
1/7/2002 4:19:33 AMMing Han

Of Course it is my work!
Thanks again for all comments and votes!
(If this comment was disrespectful, please report it.)

 
1/7/2002 6:31:06 AMDave Peake

Nice controls! One thing i would like to say is that your code needs OPTION EXPLICIT. Many variables aren't defined and that makes it a pain in the back side to add them and debug (making sure that they're all in the right scope). eg. RGN_DIFF

(If this comment was disrespectful, please report it.)

 
1/7/2002 3:26:52 PMBaz

Excellent work and thanks for sharing it with us all...(UK)
(If this comment was disrespectful, please report it.)

 
2/8/2002 8:42:07 PMMichael

One way to solve the RadioButton-GroupBox issue is:
Add this to the xpgroupbox code:
Public Property Get hWnd() As Long
hWnd = UserControl.hWnd
End Property

Then change the xpradiobutton line of code from this:
rd.Value = False

to this:
If rd.Container.hWnd = UserControl.ContainerHwnd Then rd.Value = False

See how that works out for you...
(If this comment was disrespectful, please report it.)

 
3/14/2002 7:47:03 AMHaitao Zhao

It rocks! Great code!
5,5,5,5,5 globes from me,too
(If this comment was disrespectful, please report it.)

 
4/4/2002 10:27:50 AMMing Han

Please VOTE!!!!!
(If this comment was disrespectful, please report it.)

 
4/16/2002 2:09:38 PMMystical

Realy great work...thanx man....The only problem that i have is adding some kind of allignment
(If this comment was disrespectful, please report it.)

 
4/26/2002 6:55:59 AMStilleto

Great job. Keep up.
Oh and there are more 5 Globes from me.
(If this comment was disrespectful, please report it.)

 
5/3/2002 9:50:47 PMSrideep Prasad

Great work ! You've got an easy 5 from me !
(If this comment was disrespectful, please report it.)

 
5/22/2002 12:59:24 PMDaniel Pramel

wow, cool :-)) but if you use manifests you can make it much easier. 5 from me because this was much work and looks pretty :-))
(If this comment was disrespectful, please report it.)

 
6/1/2002 9:39:58 AMJai

my man,,,its cool cool cool///
this is really worthy
(If this comment was disrespectful, please report it.)

 
6/9/2002 6:09:32 AMLucas Moffitt

Hey Great Code,
Please If anyone else has anything like this could you please E-mail It To Me!!! Any Help would be greatly appriciated!!!


Lucas_Moffitt@bigpond.com
(If this comment was disrespectful, please report it.)

 
6/21/2002 5:02:51 AMDeGhost

Excelent code. Really appriciate you sharing it. I do have one question though.

How can I change the images in xp_canvas at runtime??

Thanks again..
(If this comment was disrespectful, please report it.)

 
6/23/2002 6:41:36 AMMing Han

There is not much options for that unless you change the code for xp_canvas. But it can be done.
(If this comment was disrespectful, please report it.)

 
7/13/2002 3:17:14 AMali s

Wonderful code and graphic!
but i hate ocx and user ctrls!
the left upper and right upper are magenta! they should be transparent
(If this comment was disrespectful, please report it.)

 
7/14/2002 9:12:15 AMMing Han

They should be transparent.
However, the code do not seems to work on some computers. Best experienced with Windows ME.

(If this comment was disrespectful, please report it.)

 
10/26/2002 7:19:50 AM

Could you tell me where can I get those XP Guidelines ?
(If this comment was disrespectful, please report it.)

 
10/28/2002 9:31:17 AMMing Han

You can get those Windows XP Guidelines at http://www.microsoft.com/hwdev/windowsxp/downloads/
(If this comment was disrespectful, please report it.)

 
11/1/2002 11:48:11 PM

AWESOME JOB! One question though- after I add a command button to my form and run the project- it doesn't allow me to change the caption. There are vertical lines across the control-- why is that?
(If this comment was disrespectful, please report it.)

 
11/4/2002 4:53:24 PM

Never mind! I figured out the problem-
(If this comment was disrespectful, please report it.)

 
12/18/2002 12:45:07 AM

Great job buddy keep it up
(If this comment was disrespectful, please report it.)

 
12/19/2002 9:04:39 AMnullPointer

nothing to say but WOW!!!!!
(If this comment was disrespectful, please report it.)

 
1/16/2003 5:16:36 AM

nice job, man!
(If this comment was disrespectful, please report it.)

 
2/28/2003 8:30:50 AM

Nice code.Make more controls like scrollBars,Combobox etc.5 g from me
(If this comment was disrespectful, please report it.)

 
3/11/2003 8:45:07 PMDarkMercenary44

AWESOME CODE!!!, only I had the same probem with the magenta corners, but I figured it out, here is the solution. You can either add this to the xp_canvas control itselft in .make_trans or just call it from another module...

Add to Module
Public Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Public Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
Public Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Public Declare Function CreateRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long) As Long
Public Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long, ByVal x3 As Long, ByVal y3 As Long) As Long

(If this comment was disrespectful, please report it.)

 
3/11/2003 8:45:41 PMDarkMercenary44

(Continued...)
Const PS_DOT = 2
Const PS_SOLID = 0
Const RGN_AND = 1
Const RGN_COPY = 5
Const RGN_OR = 2
Const RGN_XOR = 3
Const RGN_DIFF = 4
Const HS_DIAGCROSS = 5
(If this comment was disrespectful, please report it.)

 
3/11/2003 8:47:18 PMDarkMercenary44

(Continued...)
Public Sub DrawWindow(frm As Form)

Dim Rgn1 As Long
Dim Rgn2 As Long
Dim CRgn As Long

frm.AutoRedraw = True
frm.ScaleMode = 3 'pixels

Rgn1 = CreateRoundRectRgn(0, 0, frm.ScaleWidth, frm.ScaleHeight, 11, 11)
Rgn2 = CreateRectRgn(0, 8, frm.ScaleWidth, frm.ScaleHeight)
CRgn = CreateRectRgn(0, 0, frm.ScaleWidth, frm.ScaleHeight)

CombineRgn CRgn, Rgn1, Rgn2, RGN_OR

SetWindowRgn frm.hWnd, CRgn, True

frm.Refresh

DeleteObject Rgn1
DeleteObject Rgn2
DeleteObject CRgn

End Sub
(If this comment was disrespectful, please report it.)

 
3/11/2003 8:47:57 PMDarkMercenary44

And the above code should take care of those pesky magenta corners

(If this comment was disrespectful, please report it.)

 
6/3/2003 2:48:39 AMharish

Great work, thatz very nice, i think u have spent so much time on this, i worth man. good keep it up

(If this comment was disrespectful, please report it.)

 
9/20/2003 5:24:23 PM

So Superior Coding Contest Winner, what did you win?? You got 5 globeys from me too.
The top corners of the form and transparent, theyre pink!
The icon to the left of the title could do with a pop up menu.
And it seems to flicker alot.
But as my girlfriend always tells me I'm livin in a dream world.

Cool code though!
(If this comment was disrespectful, please report it.)

 
5/14/2004 5:05:31 AM

HOLY COW! BRILLIENT CODE! 5 Globes from me!
(If this comment was disrespectful, please report it.)

 
1/30/2005 6:15:01 PM

A REAL newbie here!
How do I get to USE these buttons? In other words, how do I get them into my project?
Thanks.

(If this comment was disrespectful, please report it.)

 
6/22/2005 6:21:43 PM

one way to fix that is; find the usercontrol for the button on your hard drive and add it to the project you want the button. then it will appeare in the toolbox(where the other controls are)

i hope that helps =)

great code MH!
(If this comment was disrespectful, please report it.)

 
8/22/2005 6:40:32 AMBrian Ail

How about this John, you should use mask color for the close buttons and maximize buttons...they look really ugly without it
(If this comment was disrespectful, please report it.)

 
5/4/2006 3:55:11 PMGary

Great Stuff. You get my Hi 5
(If this comment was disrespectful, please report it.)

 
5/9/2006 11:38:43 PMflyzzx

Those controls are not drawn using WinXP API. It works only by swapping pictures. And they flicker a lot.

Cool. But not impressive.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.