Solved

few problems

Posted on 2002-04-27
13
192 Views
Last Modified: 2010-05-02
i have some question on vb:

1 how to insert the icon and words in the title of form when we MINIMIZE it in toolbars?

2 how to insert the picture that can animate in a form?
i already use the "picture box"and image but cannot..

3 which component or object can use to do something that related database??

4 how to make a form that have shape??maybe make a form in cirlce,......
0
Comment
Question by:jfren
  • 5
  • 3
  • 3
  • +1
13 Comments
 
LVL 12

Expert Comment

by:roverm
ID: 6973130
1. Check in the Form_Resize event for State = vbMinimized, change the caption and icon there.

2. Use an animation control/code, like:
http://www.freevbcode.com/ShowCode.Asp?ID=758 

3. You can use the DataEnvironment or ADO (Microsoft ActiveX Data Objects), which are both shipped with VB6.

4. Take a look here:
http://www.thescarms.com/vbasic/VBFormsAndControls.asp
and
http://www.thescarms.com/vbasic/IrregularForms.asp

D'Mzzl!
RoverM
0
 
LVL 33

Accepted Solution

by:
hongjun earned 80 total points
ID: 6973189
1. Change Caption property of form to whatever you want for your title customization. To change icon, go to Icon property of form and choose the icon you want.

2. Read this
http://www.mvps.org/vbnet/code/bitmap/loadgif.htm

3. You can use dlls like ActiveX Data Objects (ADO), DAO. Or you can use controls like ADODC.

4. Create a new project with a form named frmMain. Then add a command button named cmdClose. Add the below form code and you get a circle form.

Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function DeleteObject Lib "gdi32.dll" (ByVal hObject As Long) As Long

Private Sub cmdClose_Click()
    End
End Sub

Private Sub Form_Load()
   Dim fwidth As Long, fheight As Long
   Dim rval As Long, nhwnd As Long
   fwidth = Me.Width / Screen.TwipsPerPixelX
   fheight = Me.Height / Screen.TwipsPerPixelY
   'Create Elliptic Region
   'nhwnd = CreateEllipticRgn(0, 0, fwidth, fheight)
   'Create Circular Region
   nhwnd = CreateEllipticRgn(0, 0, fheight, fheight)
   'Set Created Elliptic Region on form
   rval = SetWindowRgn(Me.hWnd, nhwnd, True)
   rval = DeleteObject(nhwnd)
End Sub



hongjun
0
 

Author Comment

by:jfren
ID: 6975118
thanks......
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 12

Expert Comment

by:roverm
ID: 6975337
jfren: May I ask why you chose hongjun's answer ?
0
 

Author Comment

by:jfren
ID: 6977908
ok....i am new to vb....maybe i cant make the good decision on choosing the answers....will u mind that?roverm?
0
 
LVL 12

Expert Comment

by:roverm
ID: 6987331
jfren:
I was wondering why you choose hongjun's answer since it almost is a copy of my answer, posted almost an hour earlier.
I don't care about the points, just wondering...

D'Mzzl!
RoverM
0
 
LVL 12

Expert Comment

by:roverm
ID: 6990469
jfren, I am still wondering ... ;-)
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6991521
It would be very much appreciated to hear from you when more than one expert participates and zero response to a query evolves.

I am listening as well.

Moondancer - EE Moderator
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7004671
Still zero response from Asker .... roverm clearly provided the information first, yet points were awarded to hongjun.  

I see no reason for roverm to have to wait any longer here and have processed the following:
Points for roverm -> http://www.experts-exchange.com/jsp/qShow.jsp?qid=20299747

Please, roverm, comment in that question thread to finalize this "correction".  I have not yet modified this original question, will wait a few days longer for Asker's response.

Thank you,

Moondancer - EE Moderator
0
 
LVL 12

Expert Comment

by:roverm
ID: 7004736
Thank you Moondancer!
0
 

Author Comment

by:jfren
ID: 7006609
to roverm:
are you sure hongjun's answer is almost a copy from you?but i am more clearly to understand wat he comment...
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7008862
I have processed a separate question to award roverm points for the help given here, since his response was the first one given here and hongjun, whom you awarded essentially was a duplicate set of detail provided earlier.
Moondancer - EE Moderator
0
 
LVL 33

Expert Comment

by:hongjun
ID: 7008992
1.
>>Check in the Form_Resize event for State = vbMinimized, change the caption and icon there
Perhaps the statement should be rephrased. The statement may imply changing of caption and icon got to do with Resize event which is not true. Furthermore, this has nothing to do with vbMinimized state of the form.

2.
I provided a DIFFERENT code example.

3.
That's just a "standard" answer to that question.

4.
I provided a DIFFERENT code example.

hongjun
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 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…

831 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