Solved

few problems

Posted on 2002-04-27
13
187 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

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

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

744 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

15 Experts available now in Live!

Get 1:1 Help Now