|
OK, that doesn't answer my question.
|
|
|
|
|
Hi,
here is the cenario:
a form will capture user informations. One richtextbox is for loading a grievance letter which can be a soft copy or a hard copy. if it is a hard copy, it will be first scanned and placed in a folder. Then the application will load it from the folder.
if it is a soft copy, meaning from a USB Flash drive, the app will get it from there.
Hope I am clearer now
thanks
|
|
|
|
|
So? What's so hard about an OpenFileDialog?? What's difficult about calling the RichTextBox's LoadFile method??
|
|
|
|
|
Hi Dave,
Can you shed some light on this?
Dim docs as System.Drawing.Image
ME.OpenFileDilogue.ShowDialog()
docs=System.Bitmap.Drawing.FromStream(Me.OpenFileDialog.OpenFile,True)
Me.PictureBox.Image= docs
My problem is that firstly in the table, the record is of type image
secondly, file that i am selecting is not an image therefore the file cannot be loaded.
I tried to have the record type as bytes and use it as Filestream. No luck..
Maybe you can guide me
Thanks
|
|
|
|
|
waner michaud wrote: My problem is that firstly in the table, the record is of type image
"Image" in the database means any blob of binary data, not a picture.
The first line of code in your snippet is garbage. It refers ONLY to pictures or drawings. It can NOT load a Word document, nor a .TXT file, nor an .RTF, or any other non-picture format. And no, there is no class or method in the .NET Framework that will convert these formats into a "picture" of a page.
waner michaud wrote: Maybe you can guide me
I have no idea what you're ultimately trying to do with this code. Are you trying to save a picture of a Word page, or are you trying to save the Word document itself in the database??
|
|
|
|
|
.....
openFileDialog.Filter = "Word Files|*.DOC" ?
|
|
|
|
|
Hardly the point of his problem. This is just one tiny aspect of using the OpenFileDialog. He's got much bigger issue with his design, including the inability to describe the specification of his app, the design, and what he's ultimately trying to do.
|
|
|
|
|
Hi Dave,
I got this issue solved. I have the path of the file saved in a table.
Now what I want to do is when I load this table, I want to click on a command to read this this file in its format.
Let's say if it is a word document, it will launch msword and the file..for that matter any other format..
thanks
|
|
|
|
|
Launch the full path to the document using the Process class. It'll launch the default editor for that document just like you double-clicked the icon yourself.
|
|
|
|
|
I am currently creating a visual studio plugin for my group. When we are trying to add a new item to the database we click add new item button, another window opens. You add the information and press the okay button. Out of no where the application freezes and gives us a window stating that .NET has encountered an error and shuts down giving you the option to restart. I have stepped through the code on various employees computers and it happens to everyone. Any suggestions on a fix???
|
|
|
|
|
Since you haven't given anny information on what's causing the error, nor the error message, there's little to nothing anyone can tell you on how to fix it.
|
|
|
|
|
I stated that the error was ".NET has encountered an error and shuts down giving you the option to restart." That's all the error was. And I also said that the error would happen when trying to add some information into a text box on a window. when pressing the okay button the app would freeze and that window would pop up saying that Visual Studio has to shut down.
|
|
|
|
|
There could be a hundred reasons why this happened. What you do is start TWO Visual Studio sessions. One debugging the library you wrote, then other to run the library as you normally would. Under Debug menu, you'll find "Attach to process". I think you can figure it out from there.
|
|
|
|
|
Thank you but I think we have figured out the issue. Thanks again!
|
|
|
|
|
Hello,
I currently have an application that when running, has to load a lot of data and it takes too much time. The data is coming from a SQL database. I am not very familiar with async and was wondering if there is a way to run the application asynchronously through the
Init() method? Thank you.
|
|
|
|
|
That doesn't make any sense.
Are you asking if you can load the data on a background thread while your application finishes starting up??
|
|
|
|
|
Sorry. I am not very good at trying to explain. But basically my application takes a very long time to load and was looking into trying to load it asynchronously through the Init() method because this method calls the different connection strings. Or could even have it load the data on a background thread like you mentioned, but I am unsure of how this is accomplished.
|
|
|
|
|
Currently the project is taking a tremendous amount of time to load. And we are required to have a loading image showing while the application is accessing the data from the database. The code below is where the asynchronous code should be placed so I am being told by my fellow co-workers.
Public Sub Init(ByVal solution As Solution)
LoadingDataSymbol.Visible = True
_presenter = New TranslationPresenter(Me)
_presenter.getProjects(solution)
End Sub
This code sets the image visible and gets the data from using getProjects(solution). I am required to make these two items async and turn the image visible before and invisible after.
Any suggestions???
|
|
|
|
|
Look into the BackgroundWorker component in the ToolBox.
|
|
|
|
|
How would that be incorporated in the code that I had just posted?
|
|
|
|
|
You drop the component on the form, then in your Init code for the form, setup the event handlers, then send it on it's way. Read this...[^]
|
|
|
|
|
Thank you!
|
|
|
|
|
Hello,
I have an application that acts as a plugin for another. It is to enter translation data. I am currently using the software DevExpress (DXCore)to use the plugin. However, this is not going to work because the application will need to be installed on other developer's computers and I only want the one setup file for the actual plugin, as well as DevExpress is not aloud to be used at my work. Does anyone know of another free software to use that does not require a client install?
|
|
|
|
|
You could always roll your own. I don't of any free libraries that you don't have to install.
|
|
|
|
|
We will need an install but unfortunately DxCore does not allow us to Package it into our setup file for the plugin we are creating. We are looking for something that can be packaged with our setup? Any ideas?
|
|
|
|