Solved

need help

Posted on 2002-04-22
10
159 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
ID: 6960424
All for 30!
0
 
LVL 4

Expert Comment

by:RichW
ID: 6960563
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
ID: 6960581
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 100

Expert Comment

by:mlmcc
ID: 6960689
0
 
LVL 1

Accepted Solution

by:
olx earned 80 total points
ID: 6961021
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
 
LVL 8

Author Comment

by:qfren
ID: 6964534
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
ID: 6966026
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
ID: 6966406
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
ID: 6966411
thanks to all experts that give comments to this question..thanks...
0
 
LVL 1

Expert Comment

by:olx
ID: 6966526
hope helped you.

thanks!

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

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…
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…

856 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