?
Solved

few problems

Posted on 2002-04-27
13
Medium Priority
?
197 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
[X]
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
  • 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 320 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
Industry Leaders: 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 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

762 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