Designing beautiful windows in vb?

Posted on 2002-07-11
Last Modified: 2010-05-02
I want to design a beautiful windows in my
vb application. For example like windows media player,
Real player etc. How can I desing beautiful windows like
that. Curly edges, beautiful buttons with beautiful colors. I also want to know how can I animate
a running piglet or running horse when user waits
after he clicks on a command button for copying
files etc..
I need real world solution.

I can appreciate your help.

Question by:sureshpodaralla
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 16

Expert Comment

ID: 7146700
Hi, you need to manage GDI API to get your wishes.
There is a plenty of resources for that in Internet.
Take a look at 
or simply do a search at
LVL 22

Expert Comment

ID: 7146855
One way to create the nice buttons is to simply use an image control and treat it like a command button.

First, you'll need at least two versions of the button image: one for the button in the up position, and one in the down position, and maybe one when disabled.

After that, you'll have to intercept the mousedown and keydown events to see if the button was activated.  If so, change to the "down" image.  On mouseup and keyup, revert to the "up" image.  In the click procedure, run your activate code as though it were a button click.

Private mstrPath As String

Private Sub Form_Load()
  mstrPath = "C:\Documents and Settings\[username]\My Documents\My Pictures\"' maybe just "images\"
  Set Image1.Picture = LoadPicture(mstrPath & "Information.gif")
End Sub

Private Sub Image1_Click()
  MsgBox "button clicked"
End Sub

Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  Set Image1.Picture = LoadPicture(mstrPath & "Question.gif")
End Sub

Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  If Button <> 0 Then
    If X > 0 And X < Image1.Width _
    And Y > 0 And Y < Image1.Height Then
      If Not mbMouseOverImage Then
        Set Image1.Picture = LoadPicture(mstrPath & "Question.gif")
        mbMouseOverImage = True
      End If
      If mbMouseOverImage Then
        Set Image1.Picture = LoadPicture(mstrPath & "Information.gif")
        mbMouseOverImage = False
      End If
    End If
  End If
End Sub

Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  Set Image1.Picture = LoadPicture(mstrPath & "Information.gif")
End Sub

This would be much better served through a user-defined control.
For animations, you'll either need to set a timer that does similar to the above button example, but activated by the timer rather than mousedown/up, or again, create a user control to handle it.

Author Comment

ID: 7146951
rspahitz, You are talking about buttons only.
How can I design a window. Normally all vb windows
are rectangle or square windows. I really need to design
a window with edges rounded or parabolice etc...
Do you think that windows media player designed the way
you explained?

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 22

Expert Comment

ID: 7146963
You asked four questions combines into one:

How can I design:
1) beautiful windows like
that. Curly edges,
2) beautiful buttons
3) with beautiful colors
4) how can I animate

I answered #2 & #4
#3 is in the eye of the beholder.

For #1, if you do a search in the EE database, you will find references to making odd-shaped windows in VB. (Search for "transparent windows" or "rounded windows".)
LVL 16

Accepted Solution

Richie_Simonetti earned 100 total points
ID: 7146999

Expert Comment

ID: 7147069
If you are referring to putting a skin on a window, there are some components you can buy that will let you skin your application. I quick search on the net for "skins" will give you plenty of pages to read. ActiveSkin is one I have tried, there may be others.

Expert Comment

ID: 7147351
LVL 16

Expert Comment

ID: 7149330
Thanks for "A" grade. Glad to help you again.

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question