Solved

need help

Posted on 2002-04-22
10
156 Views
Last Modified: 2010-08-05
i got some questions to ask u on vb 6.0.

first,normally when a application or programme is run,if want to minimize it,
it will hide in the toolsbar at the bottom which next to the start button right?
but why if i now create a form which the border style i put 0 "none" so that it dun have the minimize ,
maximaze and close's buttons....the minimize button i create my self.......
but when i run and i click to the button,it work ,it can minimize but the problems is ,
it not hide in the toolbar but is hide right above at the start button.....how i going to make it
so that it can hide at the toolbar which just like others programme when i  click minimize ...?

Second.....if now i got a .mp3 file,or a .avi file, (a few second only),which i want it to play when i click some button or when i open some form,
beside put the mediaplayer component in it..
what else should do on coding ..let say the  file i put in C:\xxx....wat should i do?

Third...i want to make a progresing bar..just like when we install something...the bar come out tell us the status about installing ....
and i found that the componet at left hand side which we can choose dun have such component to use
..so i have to add it right?but what is the name?

last, what is "option explicit " for? how to differentiate and use??
0
Comment
Question by:qfren
10 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
All for 30!
0
 
LVL 4

Expert Comment

by:RichW
Comment Utility
1. Set the ShowInTaskbar property on the form for True.

2. http://vbcode.com/asp/showsn.asp?theID=1545


3. Don't understand the question.

4. Option Explicit is VB's way of forcing your to declare all of your variables before you can use them.

Richie is correct, that's an awful lot of questions in one question, for only 50 points.


RichW
0
 
LVL 18

Expert Comment

by:mdougan
Comment Utility
3. That is probably the Microsoft Windows Common Controls-3 6.0 (SP5) that you will select from the Project|Components menu.  

If it's not that one, then it's Microsoft Windows Common Controls 6.0 (SP4)  
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
0
 
LVL 1

Accepted Solution

by:
olx earned 80 total points
Comment Utility
1)
when you minimize it, hide it
use the systray.ocx control to make an icon in the systray.   when the user clicks on the systray icon make it visible again.

2)
Private Sub Form_Load ()
     ' Set properties needed by MCI to open.
     MMControl1.DeviceType = "WaveAudio"
     MMControl1.FileName = "C:\WINDOWS\MMDATA\GONG.WAV"

     ' Open the MCI WaveAudio device.
     MMControl1.Command = "Open"
End Sub

sub PlayIt
    mmcontrol1.command = "Rewind"
    mmcontrol1.command = "Play"
end sub

To properly manage multimedia resources, you should close those MCI devices that are open before exiting your application. You can place the following statement in the Form_Unload procedure to close an open MCI device before exiting from the form containing the Multimedia MCI control.

Private Sub Form_Unload (Cancel As Integer)
     MMControl1.Command = "Close"
End Sub

3)
dont need to use an ocx for that.
create a shape1 from the toolbar and size it to the max
size you want the toolbar
create another one named shape2, and place it at the same left and top properties tha the shape1 but in this one use .width = 0

use this procedure

sub Advance(amount as long, total as long)

    me.shape2.with = me.shape1.width * (amount /total)

end sub

4) if you use option explicit you will need to declare each and every variable you use.  one of the best programming practices.

hope this helps
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 8

Author Comment

by:qfren
Comment Utility
to olx:
What is the MMcontrol1 use to?what is that?
is this way can use to mp3 file also?
0
 
LVL 1

Expert Comment

by:olx
Comment Utility
mmcontrol1 is an object created with the mci32.ocx
microsoft multimedia control 5.0 sp2

i use vb5sp3 enterprise

i dont think mci32.ocx can play mp3, but you say it is a small mp3, make it a wav.
let me see if you can play mp3s the same way.

:)
0
 
LVL 8

Author Comment

by:qfren
Comment Utility
to olx: ok.. i wil try it..
i am a new member so the points is limited but i have many questions to ask..so only 80 points ...sorry...
0
 
LVL 8

Author Comment

by:qfren
Comment Utility
thanks to all experts that give comments to this question..thanks...
0
 
LVL 1

Expert Comment

by:olx
Comment Utility
hope helped you.

thanks!

*please feel free to ask, even when the Q is already graded

0

Featured Post

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!

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

772 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

10 Experts available now in Live!

Get 1:1 Help Now