|
There is this[^] pdf file which is in c#, if you are able to translate.
If not, I used c# openoffice interop as my search phrase, just substitute 'vb' for my 'c#' and see what you get. Bound to be something useful.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
ivo75 wrote: Can I export to OpenOffice from DataGridView? I can export to MS Word and MS Excel
Yes. You can probably open the files that you're generating for Word and Excel using OpenOffice Writer and Calc.
I are Troll
|
|
|
|
|
OK but can I export to word or excel without word or excel in my PC.
|
|
|
|
|
Yes, by exporting as RTF and CSV respectively. OpenOffice knows both formats too. Exporting to CSV is most easily done using a OleDb connection.
I are Troll
|
|
|
|
|
|
No. Without Word or Office installed, you cannot export to one of the Office native formats without Office installed.
Well, maybe. If you're trying to export to Office 2003 native formats, you'd have to find a third party library that can write those formats.
For Office 2007 and above, you can go through some of this[^] since Microsoft abandoned the proprietary formats and adopted an open XML file format instead.
|
|
|
|
|
..simply say "no", as the next question is going to be why it can't read Excel-files from Office 95/97
I are Troll
|
|
|
|
|
Is proprietary. Means you'll need the software installed, just as if it were a regular application like Autocad. Or go for OpenXML
I are Troll
|
|
|
|
|
Yes
see here[^]
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Hello everybody,
I have a byte array holding a (non-windows) bitmap format (RGB as 10 bits each in a UInt32). In order to change it to a visible 8-bit image I have to do some bit-shifting on the pixels, but unfortunately looping through the pixels with
Dim RGBArray(CInt((PicFile.Length - ft.Position) / 4 * 3) - 1) As Byte
For i = 0 To (RGBArray.Length - 1) Step 3
' change Endianness
Dim buff As UInt32 = EndianConversion.SwapDWORD(brh.ReadUInt32)
' bit-shifting operation
RGBArray(i) = (buff And &HFFC) >> 4 ' Blue
RGBArray(i + 1) = (buff And &H3FFFFC) >> 14 ' Green
RGBArray(i + 2) = (buff And &HFFFFFFFC) >> 24 ' Red
Next i
takes a lot of time. Having seen how images can be manipulated with an image matrix, I wonder if that kind of operation might also be performed using a matrix on the whole byte array?
Is someone around who can tell me this or a faster way to get my image as bitmap?
Thanks
Mick
|
|
|
|
|
IMO existing code, such as GDI+, will not do format conversions for you. Its matrix operations preserve the pixel format, all they do is multiply and/or add pixel values and matrix coefficients, not bit masking or shifting.
There are a few optimizations you could apply to your code; in particular you should avoid calling methods for each and every pixel (RGBArray.Length, SwapDWORD, ReadUInt32); replace them by local variables, local code, and larger moves (say a scanline at a time).
FWIW: languages that don't support pointers (such as VB.NET) aren't as good as C/C++/C# for image processing.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thank you, Luc.
Actually, I didn't think existing code would cover what I need. Basically I wanted to know if bit-shifting can be done with a matrix at all. If yes, the next step would of course be to ask how such a custom matrix would be coded.
Luc Pattyn wrote: replace them by local variables, local code, and larger moves (say a scanline at a time)
Ok, replacing the array's length was easy and I hope I replaced the byte-swapping properly by reversing the whole byte array (Array.Reverse(RGBArray)). What I don't quite understand is how you would address "a scanline at a time" and still get the right RGB values for each and every single pixel?
|
|
|
|
|
you should load a number of pixels into a local array, not call them one by one. So replace readUint32 by whatever fits the situation.
I did not suggest you reverse an entire array, that is an expensive operation (especially if the image size exceeds the L2 cache size) that doesn't raise the intrinsic value of your data. What I would consider is calculating each pixel component from the exact two bytes that hold its bits.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I want to change the verion number of XLA project,this is existing project
please help me thanks
|
|
|
|
|
1) Double Click 'My Project' in 'Solution Explorer' pane.
2) On the 'Application Tab' click the 'Assembly Information' button.
3)Set new version number as required.
Or, Right Click the Top Level Project Node and Select Properties, perform steps 2 and 3 above
Or, from the Project Menu select 'AddinName' Properties, perform steps 2 and 3 above
|
|
|
|
|
According to MSDN, to change the NameSpace of a project all I have to do is just type the new name in the textbox in Application Properties. But when I do that, the app won't run. I get an error in the Settings Designer.
This may or may not be relevant: When I first began the project it wasn't even intended to be saved - I was using a new separate project to work thru a problem with programmatically altering a TableLayoutPanel. But I decided to save it and changed the name in the VS SaveAs dialog. So now the root namespace and the assembly name are different. I'm wanting to use the assembly name for the root namespace.
What to do?
Everybody SHUT UP until I finish my coffee...
|
|
|
|
|
IIRC this is how it works:
- the assembly name is set in the project's properties; it determines the DLL/EXE name for future builds.
- the default namespace name is set in the project's properties, it is used when NEW source files are created.
- when you want to change a namespace, you have to do it manually, and in every relevant source file. Warning: there may be files you're unaware of, such as the Designer-generated files and the top-level file (Program.vb/cs).
- what gets to run inside VS is the Main method of the class that is named as "startup object" in the project's properties; the default is Program.Main().
So change whatever you want and make/keep it consistent.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote: So change whatever you want and make/keep it consistent.
Hm... it's only a single form. Rather than go thru all that, I'll create a new project with a name I like (instead of "TableStuff" ) and import the form from the other project.
Thanks once again!
Everybody SHUT UP until I finish my coffee...
|
|
|
|
|
Is it possible to tell when a WinForm app is being closed from Visual Studio when a developer uses the "Stop Debugging" button? I'd like to perform some file cleanup, etc whenever the app shuts down, but when the app is closed from VS itself vs. the close button the form, the closing, dispose, etc is not called.
Just wondering if someone has run into this and what they may have done. Thanks for any suggestions or comments.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Form_Closing event is definitely called buddy...Check again..
|
|
|
|
|
Closing is not called. When stopping the app with the "Stop Debugging" button in Visual Studio (take your flavor, 2005 or 2010) instead of closing the app through the form, the dispose, finalize and Form_closing events are bypassed. You can verify this by putting breakpoints on each and seeing if your app stops there.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Let me verify it, I will get back to you..
|
|
|
|
|
All closing and exiting events will equally fire inside or outside Visual Studio. Use one of them and take advantage of this[^].
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hey Luc,
I'm familiar with the Debugger.IsAttached because I have some debug.print statements that occur during various routines. I'm feeling rather blonde today.
I created a new WinForm app from scratch in VS2010.
Stuck this code in
Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
MessageBox.Show("Look ma, I'm closing")
End Sub
If I start the app and close it with the X in the caption bar, woot!
If I start the app and close it with the Stop Debugging button in VS on the debugging toolbar, it's just not called? Am I totally overlooking something?
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Nope. When you click on Stop Debugging, your code stops, period. There is no further exectuion of your application code. So, no, there is no way to do your file cleanup from inside your application. This would have to be done seperately, from some batch of script operation you launch yourself.
|
|
|
|