o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

how about shrinking/optimising this ::resolved:: -

by the time this part of the program is complete, at least another 20-30 if statements are gonna be used.

is there anyother way of doing this?

Code:
Private Sub Command1_Click()

    Dim BatchInfo As String

    'Makes sure no "batch.bat" file exists before starting
    On Error Resume Next
    Kill "batch.bat"

    'Adds string values to BatchInfo
    BatchInfo = "@echo off" & vbCrLf
    BatchInfo = BatchInfo & Left(App.Path, 2) & vbCrLf
    BatchInfo = BatchInfo & "cd\" & vbCrLf
    
    'Adds "\plugins" at the end of App.Path
    'App.Path shows the current location of the application
    MyPath = App.Path & "\plugins"
    
    'Removes the first three characters from "MyPath"
    MyPath = Right(MyPath, Len(MyPath) - 3)
    
    'Adds "cd " infront of the string "MyPath" and add that to "BatchInfo"
    BatchInfo = BatchInfo & "cd " & MyPath & vbCrLf
    
    'Adds info in "ListView1" to "BatchInfo"
    For i = 1 To ListView1.ListItems.Count
        Set InputPath = ListView1.ListItems.Item(i)
        
        'Checks the end of the InputPath
        If Right(InputPath, 3) = "mp3" Then
            'Replaces the end of the InputPath with ".wav"
            OutputPath = Replace(InputPath, ".mp3", ".wav")
            'Adds the encoding string to "BatchInfo"
            BatchInfo = BatchInfo & "lame --decode " & Chr(34) & InputPath & Chr(34) & " " & Chr(34) & OutputPath & Chr(34) & vbCrLf
        ElseIf Right(InputPath, 3) = "mpc" Then
            OutputPath = Replace(InputPath, ".mpc", ".wav")
            BatchInfo = BatchInfo & "mppdec " & Chr(34) & InputPath & Chr(34) & " " & Chr(34) & OutputPath & Chr(34) & vbCrLf
        ElseIf Right(InputPath, 3) = "ogg" Then
            OutputPath = Replace(InputPath, ".ogg", ".wav")
            BatchInfo = BatchInfo & "oggdec " & Chr(34) & InputPath & Chr(34) & " -o " & Chr(34) & OutputPath & Chr(34) & vbCrLf
        ElseIf Right(InputPath, 3) = "aac" Then
            OutputPath = Replace(InputPath, ".aac", ".wav")
            BatchInfo = BatchInfo & "faad " & Chr(34) & InputPath & Chr(34) & " -o " & Chr(34) & OutputPath & Chr(34) & vbCrLf
        End If
        
    Next i
    
    'Opens "batch.bat" and adds all the values in "BatchInfo" to "batch.bat"
    Open "batch.bat" For Append As #1
        Print #1, BatchInfo
    Close #1
    
    'Runs "batch.bat"
    Shell ("batch.bat"), vbNormalFocus
    
End Sub

 

shrinking transaction log files -
hi Does anyone know the Tsql for shrinking a transaction log file... I have tried the Dbcc shrinkfile but nothing appears to happen... I am using the stmt from my client PC, not sure if that makes a difference.. Thanks


Optimising Animation -
Discovered the wonders of List Calling . Thanks anyway, Matt


shrinking shapes -
How would I make a shape shrink with a For Next loop using delay's? thanks


how about shrinking/optimising this ::resolved:: -
by the time this part of the program is complete, at least another 20-30 if statements are gonna be used. is there anyother way of doing this? Code: Private Sub Command1_Click() Dim BatchInfo As String 'Makes sure no "batch.bat" file exists before sta


Sizing an Image -
I need some code for sizing images before they are put in a picturebox. (enlarging and shrinking, constrained aspect ratio)


Object Shrinking -
For some reason, the objects in my form are being scaled down from their original dimensions that I set. Is there a setting that I over looked in the form properties?


Measuring time taken to process block. -
Is there anyway to measure the time it takes for a block of code to be executed? Just want to measure if my optimisations are really optimising.


Shrinking Crystal Report -
I created a legal size report . I want to shrink that report and print in 8.5 X 11 . Somebody help me in this regard Thanks in advance


Optimising VB.2005 -
Dear Friends I have moved from vb.6 to vb.2005 , but i am experiancing speed problem with VB.2005 please advise for optimisation of resources and getting Better Speed Thanks Rupal


*Resolved* shrinking text inside a fixed size label :( -
Hi All, I'm wanting to do something a bit different and shrink the text within a fixed size label. I'm using the following code to shrink the text (using ARIAL 72 point initially), but it only works when I've printed something first. Otherwise it doesn't work at all. Even if


how to shrink Firebird Sql databae -
hi everyone just want to ask if you can help me with some codes for shrinking the firebird database? thanks in advance


* RESOLVED * Ways to optimise a project Utils -
The exe for an application I'm working on is about 11 mb in size. As well as it's vast size, it also (I assume) has many memory leaks. The PCs it runs on are all very old (winchips, cyrix k6 - some with very little RAM). The application crashes sometimes (so I'm told by the users) and


search engine optimization advice -
Hi! I’m new to this and I'm looking for help on optimising my website to get it higher up in the search engines. Has anyone got any tips? My site is about double glazing so i was thinking of trying to link it to sites on homes, gardening to find people interested in getting replaceme


Excel. Button shrinks! -
Has anyone experienced their buttons on an excel sheet shrinking when you click on them ? It happens to me sometimes. Or the text inside the control (eg a combobox) gets bigger each time I use it. Doesn't always happen and not always on the same sheet either. Any one any clu


How can I prevent my form from shrinking -
hello, How can prevent the user from resizing the form's width under 8400 pixels? and for that matter, the height too... thanks


Shrinking a Polygon -
I have two arrays, one with X coordinates and one with Y coordinates, I also have the area calculated, how can I shrink the polygon a certain amount of distance? I tried think about this but its hard to come up with something because it depends on how many points are on the polygon.


Shrinking data -
Is there any easy way to create collapsing and expanding "items". Like with an XML that you can expand or collapse any "item" with a click on a "+" or "-".


SQL Server 2005 Enterprise Shrink DB -
Does anyone have a good script to shrink a SQL 2005 database to a size (or % free space) that you set? I now there is DBCC Shrinkdatabase. That is not shrinking the size down. Thanks Gary


Lawl!! -
http://www.msnbc.msn.com/id/14485634/ Polar bear genitals shrinking due to pollution? Maybe it's just the cold water?


StretchBlt -
I have used StretchBlt with some success on perfect stretches such as an image of 20,20 stretching to 40,40 but if I try and stretch it to 20,40 or something unsquare it fails. Also unsuccessful in shrinking with it. Is it something I'm doing wrong or is StretchBlt only capable of perf


[02/03] Datagrid paging alternative -
I have a function which is essentially an SQL builder where the user specifies what columns they want and what conditions (allows customised reporting). However as the user (as stupid as they are) may run a report that could potentially return thousands of resulting rows we want to ena


Backing up the log file with truncate_only -
Hi, Recently I've asked about shrinking an sql server log file - http://vbforums.com/showthread.php?t=491596 szlamany suggested this code for backing up the log file and shrinking it - Code: BACKUP LOG ACCTFILES TO DISK="C:\somefilename" GO DBCC SHRINKFILE (ACCT


Problem with inserting image into a Rich Text Control... -
When I insert an image into a Rich Text box the image has one of those boxes around it for stretching/shrinking the image. It also adds menu items at the top (same one that appears in MS Paint). Any ideas on how to get this to stop?


asynchronous ftp -
I have to develop an ftp client which can handle asynchronous uploading/downloading of files showing progress. I am not to worried about the ftp bit but I am new to asynchronous development using threads and was wondering if you guys had come across something similar. Any urls or


Shrinking/Compacting Data files and transaction Log files -
Hi How do I Shrink/Compact a Data file and transaction Log file within SQL server (2000) ?? Thanks for your help


Stretching/Shrinking a picture in the Picture property of an MDI form -
I believe I saw this somewhere but I can't remember where... So, If I place a bmp picture in the picture property, how can I get it to automatically resize to same size of the MDI Form?


Resolved item issue -
Sorry about this. I'm just wondering how am I suppose to mark items as being resolved. I have currently just been doing an advanced edit on my original post and adding [RESOLVED] but by the looks of it, this is not the correct way of marking an item as resolved. UPDATE ----- Fi


Doctor, Doctor -
A man bursts into a busy doctor's office and says, "Doctor, Doctor, I think I'm shrinking." The doctor says, "Now now, you'll just have to go to the waiting area and be a little patient."


SEO Question -
Guys This is a kind of random question. By optimising a website so it goes from page 12 on google to page 1 - is there an accepted industry average that says by what percentage the number of unique visitors will increase? I know this is a how long is a piece of string kind of que


optimising 256 grey values...help :0 -
Hi, i am using a regular 8 bit monitor (256) and need more values around grey (or smaller jumps in grey values). so, instead of spreading the 256 values across the whole range from black to white, I want to focus on the values around grey. something like this:


Low Resources -
has this ever happened to you? you are on the computer for a long time, your resources are shrinking by the minute, finally you get this crappy looking wierd ass color, it looks kind of like a barcode, and then you look at your resources and it says 3%!!!!!!!! ? or something si


resolved or not!!!!! --:RESOLVED:-- -
can neone plz tell me how to put RESOLVED in the title bar of the thread??? i tried many times but in vain thnx in advance


Shrinking MDI Child form !!! -
Has anyone ever had any problems when switching MDI child forms ? Every now and then, when MDI Child window A switches to MDI Child B (i.e. the user clicks a proceed button), MDI CHild window B appears 'shrunken', for want of a better word, within the MDI Master window ?!?! This


Shrink pic in Image Control not very clear -
I'm using an IMAGE control to display a JPG. I am shrinking it down a bit - setting the .Stretch=True and setting the .Height and .Width proportionally. But the result is not a clear image. I'm comparing that to what the Windows Picture and Fax Viewer is showing for an image o


Selection box on a picture -
Anyone have some code that will draw an expanding (or shrinking) rectangle on a form or picture, after I mousedown, move over a selected area, and then mouseup. Mousemove fills in my rectangle for each increement in X and Y, and is too messy. Using mousedown and moseup alone, I


[2005] Variable Bitmap Size(GDI+) -
Hey guys, I'm having a small problem here. I'm making a class to paste a bitmap with text (generated from some string with GDI+) onto a bigger bitmap. Now when I insert the contents of the string into the bitmap using GDI+, I don't know how wide and high the bitmap is going to be, s


Guru help pleeeeeease (on top and shrinking question.) -
How do i get a form to: A) on load move to the top-RIGHT of the form. (the form has to be always on top...) B) When the mouse comes off of the form, the form shrinks to Width = 200 Height = 10 And moves to the top-RIGHT C) If the mouse comes back on the form it goes


New function Request! - - func Resolved -
I see the forum admin constantly pushing "Add resolved to all your posts which are resolved". This is of course a great idea! As people will assume two things: the post is done and needs no more feedback, or it is done and it contains useful answers so it is worth a look.


A Small :) Problem with MS Word -
For some reason when I use the MinButton in MS Word's control box, Word minimizes to the task bar rather than just shrinking to some smaller size. The only way to bring it back is to click the Maximize option in its toolbar dropdown list. How can I restore the MinButton setting to som


[RESOL[SUPER DUPER RESOLVED] [EXTRA PRIMA GOOD RESOLVED] Hello -
hello hello hello edit: Rob and I were testing how many time thread can be [RESOLVED]... the answer is - as many times as you wish but as far as the length of a Title fields allows (apparently 84 chars).