Solved

Designing beautiful windows in vb?

Posted on 2002-07-11
8
386 Views
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.

Suresh
0
Comment
Question by:sureshpodaralla
8 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
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 www.planet-source-code.com 
www.freevbcode.com 
or simply do a search at www.google.com
0
 
LVL 22

Expert Comment

by:rspahitz
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
    Else
      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

BTW
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.
0
 

Author Comment

by:sureshpodaralla
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?

Suresh
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 22

Expert Comment

by:rspahitz
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".)
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 100 total points
ID: 7146999
0
 

Expert Comment

by:jhamlett
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.
0
 
LVL 3

Expert Comment

by:ketapillar
ID: 7147351
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7149330
Thanks for "A" grade. Glad to help you again.
Cheers
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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 …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

777 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