
hog
Avatar/Signature-
Posts
1011 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by hog
-
I have spent 3 days working thru another programmers application which is hanging on the outputto method when outputting to rtf format. I won't bore you with all the nitty ****ty detail of this app apart from that it cycles thru many records and gets so far and just hangs. I then remove a number of records and the app works perfect as before. From my investigation all I can presume is that buried somewhere in the app some resource is being consumed and when it reaches it's limit it hangs? I have looked to check that there are the required .close and set to nothing of recordsets etc and all appear to be there. Is there a method/function which can be called to force Access to clear up similar to the garbage collection in .NET. Thnx
-
Ah, that is where I am going wrong then! Thnx probelm sorted :)
-
Is there a way to get this to display the contents of MyComputer and MyNetwork connections? I have tried numerous settings and can get mydocuments, desktop, my computer etc but can get it to display mynetwork connections? Thnx
-
Ooow I did not know that! But I do now thnx :) I just came back to say I found the problem. I did not include the explicit path to the movie file! Plonker :o I had included all the quotes as part of various attempts to resolve the error. Thnx
-
I am calling realplayer from within my app using shell. If I just call the player it works OK, realplayer opens. If I tack on the file name I want to open realplayer opens but I then get a general error from it saying this: http://100_0942.MOV I have the path to realplayer as: Public gstrRealPlayerPath As String = """C:\Program Files\Real\RealPlayer\realplay.exe""" I then add this when the user selects the movie file of choice: Dim strPlayerAndFilePath As String = gstrRealPlayerPath & " """ & Me.cboMovies.SelectedItem & """" I then pass strPlayerAndFilePath to shell. With or without quotes I get the error? If I run realplayer manually and open the mov file it works? If I modify the shortcut to include the mov file name it works? Have I missed something? Thanks
-
Seems very complicated. I might just call quiktime or real player via shell.
-
Am I correct that there is no way to play .mov files as an integral part of my application? Thanks
-
Is there a way to copy all files of a certain type from one folder to another without using loads of code with a loop? example: Filecopy("C:\anyfolder\*.jpg","destinationfolder") Thnx
-
Here are the sections of code that have anything to do with the file. Private Function ResizeBitmap(ByVal bmpTooBig As Bitmap, ByVal maxWidth As Integer, ByVal maxHeight As Integer) As Bitmap Dim decRatio, decRatioW, decRatioH As Decimal Dim bmpResized As Bitmap Dim grpBitmap As Graphics If bmpTooBig.Width > maxWidth Then decRatioW = maxWidth / bmpTooBig.Width Else decRatioW = 1 End If If bmpTooBig.Height > maxHeight Then decRatioH = maxHeight / bmpTooBig.Height Else decRatioH = 1 End If 'determine which dimension is the smallest If decRatioW <= decRatioH Then decRatio = decRatioW Else decRatio = decRatioH End If bmpResized = New Bitmap(CInt(bmpTooBig.Width * decRatio), CInt(bmpTooBig.Height * decRatio)) 'Make a Graphics object for the resized bitmap. grpBitmap = Graphics.FromImage(bmpResized) grpBitmap.DrawImage(bmpTooBig, 0, 0, bmpResized.Width + 1, bmpResized.Height + 1) If Me.chkFullScreen.Checked Then Me.picMain.Location = New Point((intSavePictureBoxWidth - bmpResized.Width) / 2, 0) Else Me.picMain.Location = New Point((intSavePictureBoxWidth - bmpResized.Width) / 2, 104) End If Me.picMain.Width = bmpResized.Width Return bmpResized 'dispose of graphic objects grpBitmap.Dispose() End Function Private Sub LoadSites() Try ' start up path to find photos Dim strPath As String = gstrPhotosFolderPath & Me.cboSites.SelectedItem & "\" & Me.cboDates.SelectedItem Dim diDirectory As New DirectoryInfo(strPath) Dim fiTemp As FileInfo ' create an array of the files in the current directory fiFileInfo = diDirectory.GetFiles("*.jpg") intPhotoCount = fiFileInfo.Length intIndex = 0 ' store the first photo path strFileName = gstrPhotosFolderPath & Me.cboSites.SelectedItem & "\" & Me.cboDates.SelectedItem & "\" & fiFileInfo(intIndex).ToString ' load the image m_bmpNewImage = ResizeBitmap(New Bitmap(strFileName), intPictureBoxWidth, intPictureBoxHeight) ' display it Me.picMain.Image = m_bmpNewImage Catch objException As Exception MessageBox.Show(objException.Message) End Try End Sub
-
Hi, setting the for to maximized still shows the taskbar at the bottom. I am trying to replicate the WindowsXP slide show program which will cycle through all the photos in a folder full screen, no taskbar. If the user chooses to press the Windows key to display the taskbar then that is OK. I just want to hide the taskbar until the uses chooses to show it or reduce my app to normal size.
-
Is it possible to turn off, hide the taskbar during runtime? I want my picture to take up the entire screen but cant find out where to turn it off? Thnx
-
This is all the code that has anything to do with the file. bmpResized = New Bitmap(CInt(bmpTooBig.Width * decRatio), CInt(bmpTooBig.Height * decRatio)) grpBitmap = Graphics.FromImage(bmpResized) fiFileInfo = diDirectory.GetFiles("*.jpg") m_bmpNewImage = ResizeBitmap(New Bitmap(strFileName), intPictureBoxWidth, intPictureBoxHeight) me.picMain.image = m_bmpNewImage I have tried setting all to nothing and disposing and nothing works except the gc.collect!
-
So KOOL :D gc.collect fixed the problem :D :D Thnx :D :D
-
Already implemented the cleaner way ;) Thnx chaps :D
-
Yeah I am running WIndozeXP :-\ I have tried this so far and still no joy, and my program IS the only program opening the bitmap to view? m_bmpNewImage.Dispose() fiFileInfo = Nothing Me.picMain.Image = Nothing File.Delete(strFileName)
-
Holy testicle Tuesday Batman! Why didn't I think of that :confused: Thnx :D :D
-
Yep :) picturebox.image = nothing
-
I am using the following to delete a file which is being displayed in a picturebox. File.Delete(strFileName) I keep getting an error message saying the file is in use by another process and cannot be deleted? I have set the picturebox to nothing, I have set the bitmap used to fill the picturebox to nothing and even set the FileInfo() object which holds the file name to nothing and still get the error???? Where am I going wrong? Thnx
-
I have some code in a command button which I would like to call from a sub, is this possible? If so what do I put in the arguments? Private Sub cmdNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdNext.Click Thnx
-
Is there a way to remove the image from picturebox without disposing of the picturebox? A bit like setting a string variable to string.empty? Thnx
-
Kool :D :D :D It works a treat :p Thnx DiverDan ;)
-
Thnx DiverDan :) I will try this out and let you know... :D
-
The idea was to try to make this a generic program that I could realise as a freebie on my website, but this looks like that won't happen. I realsie now that my camera will always take the same size images, (I never change the resolution), so the image length will always be 70% of the width in normal view or the width will always be 70% of the height when taking picture with camera on its side. Therefore I have created to picture boxes with this ration and it works :) Still would like to now how to go about making it generic tho :confused:
-
:confused: I get an even more distorted image but now have a blank area at the bottom of the picture box? The sizes used in this code are as follows Image = length 2142, width 2856 Picturebox = length 536, width 960 intWidth = m_bmpNewImage.Width intHeight = m_bmpNewImage.Height If intWidth > intHeight Then intHeight = intHeight * (intPictureBoxHeight / intWidth) Else intWidth = intHeight * (intPictureBoxWidth / intWidth) End If ' resize it to fit the picture box m_bmpNewImage = New Bitmap(m_bmpNewImage, intWidth, intHeight) confused as hell :(