Solved

Designing beautiful windows in vb?

Posted on 2002-07-11
8
384 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now