• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

few problems

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
jfren
Asked:
jfren
  • 5
  • 3
  • 3
  • +1
1 Solution
 
rovermCommented:
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
 
hongjunCommented:
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
 
jfrenAuthor Commented:
thanks......
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
rovermCommented:
jfren: May I ask why you chose hongjun's answer ?
0
 
jfrenAuthor Commented:
ok....i am new to vb....maybe i cant make the good decision on choosing the answers....will u mind that?roverm?
0
 
rovermCommented:
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
 
rovermCommented:
jfren, I am still wondering ... ;-)
0
 
MoondancerCommented:
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
 
MoondancerCommented:
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
 
rovermCommented:
Thank you Moondancer!
0
 
jfrenAuthor Commented:
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
 
MoondancerCommented:
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
 
hongjunCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 5
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now