Winforms Saving Images To SQL Server Without Creating A File On The User's Hard Drive?
Jun 22, 2011
This is my first attempt at creating a Winforms application, and I have been developing in the .Net Framework (Silverlight, ASP.Net, WPF) for about 6 months. So, my appologies if this is a newbie question.
Basically what I am doing right now is taking the drawings of a stylus-based input, and storing them into an image field in a SQL Server database. Then, in another form, I go and get that image out of the database, and load it into a picture box. It works, but it is rather "sloppy" how it got there.When the user clicks save, it stores that image into a temporary folder, then converts it to a byte array and throws it into the database that way. Then, it deletes the file from the temporary folder. When retrieving it, it pulls it out of the database in a byte array, then converts it to an image in a temporary folder, thus displaying it on the form.
Is there a way that I can just bypass the storing of the file onto the user's harddrive both times, and go from byte array to picturebox?
View 2 Replies
ADVERTISEMENT
Jul 8, 2011
I'm working on an app that should be able to read files from an External Hard Drive or even an iPhone or iPod. I'm a beginner so it would be great to keep it simple :) I suppose I should use the SerialPort class? But I'm not sure and I couldn't make it work.
View 7 Replies
May 19, 2011
I have a VB.Net 2010 app and need to delete a file from the hard drive when the app opens up (cache file). What command will perform this action? I know the name in advance, so I can format the command right in the app.
View 1 Replies
Jan 1, 2010
Im having a problem loading a html file to a webbrowser in a program im writing. What it does if I press a button or menu item a form is loaded and a html help file is loaded to the WebBrowser1. here is the code
Public Class frmWeb
Private Sub frmWeb_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim path As String
[code]....
View 2 Replies
Mar 29, 2010
I wrote a program that can kinda of read Docx files. I can extract the text of the file and the metadata that word puts in the file not the stuff you see when you write click and go to properties. I Can extract and view that data I'm working on making the subroutine (i don't know if its an algorithm there is no math.Anyway I want this to be a forensic program where it will scan the whole hard drive and add all the docx files to a listbox. I found this code
Dim file_names As ReadOnlyCollection(Of String)
Dim directory As String = "c:"
Dim searchFor As String = "windows"
[code]....
but some folders that where hidden like $inplace they were left over from my windows 7 upgrade. they cause it to crash. is there anyway to be able to scan every folder on the PC. I tried launching the complied .exe by right clicking and hitting run as admin but it still crashed when i executed that code.
View 11 Replies
Sep 7, 2010
I got a problem when i try to get binary file from database and put it in hard drive
View 8 Replies
Jun 5, 2011
I have a program that must copy a file to 3 locations, the local hard disk, a USB drive, and a network location. I have the file (about 70mb) loaded into a byte array. My quesion is, since I'm not actively modifying the byte array, can I impliment a form of multithreading where all 3 threads read the same byte array at the same time?
View 1 Replies
Mar 28, 2010
I have a program that works I would just like it to be able to find the file with out me specifying the actual path. Because if it is on someone's computer other than mine the path might not be correct and it will not function properly. Here is the code I have done. The file it is looking for is of course names.txt. I have not been able to find much info on this.
[Code]...
View 1 Replies
Apr 23, 2010
How do I load or display an Excel file located on the hard drive in vb 2005?
View 2 Replies
Dec 18, 2010
The drive is connected via USB and the problem I'm having is that, periodically, while my code is executing, the usb drive seems to disconnect and reconnect. (Nothing to do with the program, but the drive itself).I want to find a way to prevent these temporary drive reconnects from interrupting my code. IE, i want to insure that whatever read or write that is requested is actually executed even in the case of a temporary drive interruption.
View 1 Replies
Jun 7, 2010
I'm working on creating a web application which is going to allow the user to upload a video file to the server. Once the file is uploaded to the server, it's going to be converted to .flv and copied to another folder in the same directory. Since I'm doing this from a web app, I don't want to tie up the app with the conversion process. That is when I figured this might be a good time to try threading the conversion process... what do you think?
Currently, my process logic is this:
1) User presses the upload button.
2) A dummy record is created in the database for the file being uploaded.
3) Folders are created on the server to house the original video file and the converted video file.
4) The original is copied to the server.
5) Once the original is finished being copied, the app converts the original to .flv and saves it in another folder.
6) Information about the conversion process is stored in a .xml file
7) The dummy record is updated with real data
8) There is a redirect to a page that lets the user view the .flv file on the web
View 6 Replies
Sep 6, 2011
I ran across some legacy code which creates a link to a file on the web server and offers the user a link to download the file.
Machine name:
MYSERVER
[URL]
Full url path to the directory containing the file to download: [URL]
Target file name:
downloadable.txt
The code does the following to create a link to 'downloadable.txt'
server.machinename.tostring & ".. argetdownloadable.txt"
Which results in:
"MYSERVER.. argetdownloadable.txt"
That link appears on the page as:
<a href="MYSERVER.. arget.downloadable.txt">download this file</a>
In IE 7, mousing over the link shows the full URL "[URL]" in the status bar. And it works fine for downloading the file in IE 7 (left or right-click). Firefox shows "[URL]" in the status bar and downloading the file isn't as straight forward. FF actually tries to change the file name to include the server name and target directory in the file name.
I've tried other methods like WebClient.DownloadFile() and had no success. This works, but I'm unfamiliar with the ".." and curious about how it works. I understand that ".." typically means go up one directory. My question was really more in the line of "how does that get interpreted in the browser to sort out the path?"
View 4 Replies
Jul 8, 2010
A while back, I wrote my own settings provider because I was having problems persisting settings in a class library. (Note - I had no problems persisting settings from an application).Today, I just did a test of persisting class library settings and it worked, without my custom provider.The test is:
(1) Create a class library
(2) Add a setting - 'Name'
(3) Add a class with a public shared property 'Name' that reads and writes to the setting 'Name'.
(4) Create an application that references the class library, and use the shared property to read and write the 'Name' setting.
I'm sure that before the 'Name' setting would persist while the application was open but after I closed it and re-opened it, the setting would revert to the default.This is not happening now and I'd like to be sure that I was being an idiot before and not an idiot now.
ETA: I've noticed that the first time I create a test app, change the setting, close, and reopen, the setting is not persisted. Subsequently it is. May be I gave up after one try before. Any ideas why it's not persisted the first time?
ETA2: As an example, I have a class library called 'MyLibrary' and a test application called 'MyApp'. I do the steps 1-4 above, and below are the contents of the user.config file found at C:Documents and SettingsUser NameLocal SettingsApplication DataMyAppMyApp.vshost.exe_Url_vi5gjcooahbdm2ma3dcay0mkexu2suul1.0.0.0. Note: I did not touch the settings in MyApp;-
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral >
<section name="MyLibrary.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, allowExeDefinition="MachineToLocalUser" requirePermission="false" />
[code].....
View 1 Replies
Aug 12, 2010
I was thinking to make an app to save images [or download images] to local hard disk. But to keep it easy, I want this app to create a small picturebox on form to show the thumbnail of downloaded image. Lets say a 5 pictureboxes has to be added with the thumbnails to show the recent downloads. A user can save the location where he wants to save the files on hard disk. A listbox or a dropdown menu will help in categorizing the images, like image1 in friends section, image2 in family section, image3 in others, etc... When the program restarts all the latest 5 thumbnails has to be loaded in pictureboxes and the directory that was chosen. Finally, a button that shows the downloaded images into original image file size one by one or a slide show. Is it possible to make such program?
View 2 Replies
Jul 21, 2011
I would like to create thumbnails into a VB (2005 or 2010) form from video files.
I have a directory (in my hard drive) with video files (.mpg).
How to show video thumbnails for each video file?
My VB code (for images) is attached below and I want to convert it in order to manage video files.
Private Sub ThumbButton_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles ThumbButton.Click
Dim imagepath As String
[Code].....
View 2 Replies
Jul 22, 2010
How to get the path of user shareable drive in server which can be shared by users ?
View 4 Replies
Feb 2, 2010
I'm trying to write an application that will allow a non-administrator user to create virtual directories in IIS6. I've tried numerous different ways of impersonating a administrative account but nothing seems to work to create the virtual directory.
Here's some of what I've tried:
dim sDirPath as string = "IIS://remotehost/W3svc/1/root"
Dim de As DirectoryEntry = New DirectoryEntry()
de.Path = sDirPath
de.AuthenticationType = AuthenticationTypes.Secure
de.Username = tbxUsername.Text
[Code] .....
what is the correct way to impersonate another user in winforms application that will allow me to create the virtual directory without the user that's running the application being an administrator on the web server? I know this can be done, IIS manager allows you to use "connect as" checkbox to do it.
View 1 Replies
May 18, 2010
I need to get my application to be installed on to the C: location in Visual Basic after ive published it.
View 7 Replies
Nov 9, 2007
I'm trying to get hard drive temperature data.I can get the temperature via MSStoragedriver_ATAPISmartData.And, I can get all sorts of drive info (model, serial #, etc. via the Win32PhysicalMediaClass.The trouble is trying to link the two together.I get this temperature info, but I don't know which drive it is.The only identifier I can get from MSStoragedriver_ATAPISmartData is InstanceName.That looks like it has the model number embedded in it, but I can't get model number in Win32 my question is how can I get the temperature data and realte it to a specific drive?
View 2 Replies
Mar 26, 2009
is there any way to find out the hard drive that windows is installed in? (local drive?)
View 4 Replies
Oct 19, 2011
Anyone know how i can get the harddrive id?
View 1 Replies
Aug 10, 2009
I would like to use the Windows Vista/7 defragmentation feature from my program. I can use a shell command to call defrag.exe, but there's no way to get the status that I know of. I would like to show a percentage and maybe what part of the process it's doing. Then when it's done get the results.
View 6 Replies
Jul 28, 2011
I have made this program in which the user selects a number of directories and copies them all to an external drive. is there a way to detect when the user does something that involves writing data to the hard drive. When they do, I want my application to detect this and back up that file on the external drive as well so that the back up is always up to date.
[Code]...
View 2 Replies
Aug 13, 2011
How would I disable a device during runtime? I can do it by going to Device Manager and disable it from there, is there anyway I can do it from a program?
View 2 Replies
Aug 4, 2010
How can I get VB.NET to find the folder that begins with "17014 -"? The actual Folder is called "17014 - Mr John Smith", but I want it to search only upto the "-" (hyphen) point.
I will then use this to check if the folder exists or not.
View 2 Replies
Jul 2, 2009
I would like to get the hard drive serial number.... to make a security feature for some software so it will only run on that hard drive... [URL]
View 13 Replies
Feb 1, 2010
I am looking for a way to retrieve the temperature of hard drives in VB Express 2008. I have found posts at a few different places that accomplish this with the following:
[Code]...
View 7 Replies
Oct 6, 2010
[code] i need to find a way to loop through ALL the directory's on the "c" drive and not just the main folder.
View 4 Replies
Oct 6, 2010
i have this piece of code:
[Code]....
and it works just fine. However, saying that, i need to find a way to loop through ALL the directory's on the "c" drive and not just the main folder. Does anyone have any code that can do that?
View 2 Replies
Mar 9, 2012
have this piece of code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strFileSize As String = ""
[code].....
View 6 Replies