|
i need it in vb.net...
Magi
|
|
|
|
|
hello all, i have an application, in which there is a butoon, on clicking it, an existing word document must open in msword, so i've tried to reference the library from the references (the COM tab) , but i couldnt find it, am using office 2003.
Any help....
Scorpion
|
|
|
|
|
system.diagnostics.process.start(" Location of the word document and then the name of the document .doc")
Example:
If the word document was in C:\ drive, and was called Example.doc, then:
You put this code in the button:
system.diagnostics.process.start("C:\Example.doc")
and it would open the word document.
|
|
|
|
|
Thanks, it worked great.
One inquiry, do i have to close the process? or end it ? or shut it down? oe may be it ends by closing the MsWord automatically?
Scorpion
|
|
|
|
|
scorp_scorp wrote: One inquiry, do i have to close the process? or end it ? or shut it down? oe may be it ends by closing the MsWord automatically?
No only when you want it to close. It is launched the same way as when you double click on it in windows.
To close it just hit the close button in the top righthand corner in msword and the .doc would close or click file then exit.
Or if you want to close it programmatically you could use the process.closemainwindow or process.kill.
You can do this by going to toolbox then clicking components and then double click on process to add a process component to the form.
Then this is the code you should have in your first button:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Process1.StartInfo.FileName = "C:\Example.doc"<br />
Process1.Start() '//starts example.doc<br />
End Sub
And this is the code for your second button(create another button) to close example.doc:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click<br />
Process1.StartInfo.FileName = "C:\example.doc"<br />
Process1.CloseMainWindow() '//Sends the example.doc a close message asking it to terminate<br />
'
'// And this will force example.doc to close <br />
<br />
End Sub
Hope this helps
|
|
|
|
|
Thanks a lot A*****, it was great, worked fine.
Regards.
Scorpion.
|
|
|
|
|
I've populated my DataGridView in which first column in a checkbox(System.Boolean) column. I want to select rows if a checkbox cell is clicked causes the Checkbox.Checked to true.
Private Sub gd1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles gd1.CellClick
If e.ColumnIndex = 0 Then
Me.gdFeePlan.Rows(e.RowIndex).Selected = Me.gd1.CurrentCell.Value
End If
End Sub
gd1 is the DataGridView
and column(0) is checkboxcolumn
Above code doen't works. When I select a row in Grid. I want to select all rows which holds first Checkbox Column Checked to true.
Can you help me?
|
|
|
|
|
Can i write a vb 6.0 client for a webservice, if yes can anyone provide me with any links for that.
Thanks in advance.
----------------------------------
where there is a will there is a way
|
|
|
|
|
When it's loaded I can't really do anything with it. I'm trying to register this copy and when I goto Help/About, nothing comes up. Same thing happens with New Project and any other file menu. Anyone know whats going on?
|
|
|
|
|
Hai,
How can I split a "SINGLE TIFF IMAGE FILE TO MULTI TIFF IMAGE FILE" using vb.net 2003 or vb.net 2005.
Regards,
G.Manivannan M.Sc.,[IT],
Software Programmer (VBA),
AKUVA Infotech, Bangalore.
|
|
|
|
|
|
Hai,
Thanks for your Help.
Regards,
G.Manivannan M.Sc.,[IT],
Software Programmer (VBA),
AKUVA Infotech, Bangalore.
|
|
|
|
|
I tried this the other day. I now have more information that I did not have before.
I have a DLL called spoem.dll
I Have a LIB called spoem.lib
In C++ there are the lines:
#define SPOEM_API __declspec(dllimport)
#pragma message("automatic link to spoem.lib") // <== add this line
#pragma comment(lib, "spoem.lib")
This last line I guess calls a linker the the LIB file. My understanding is that
the DLL has no entry points. Each function in C gets linked intot he program calling
this line.
#pragma comment(lib, "spoem.lib")
Is there any way in VB.NET to mimic this same behavior . I need to link
this LIB file into my VB.NET project.
Thanks
|
|
|
|
|
No, there isn't. A lib file is used during the linking of the C++ object files to get an .EXE. The lib files can ONLY be used with C/C++. They're of absolutely no use to your VB/VB.NET code. You can only use the .DLL version calling the functions it exposes.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
So to dot my I's and cross mt T's.
Since I did not write this DLL, and have no control over it. This DLL cannot
be used in a VB.NET application. Whenever I use
|
|
|
|
|
mlauahi wrote: Since I did not write this DLL, and have no control over it. This DLL cannot
be used in a VB.NET application.
That's not what I said. I said the .LIB file was useless. I didn't say the .DLL couldn't be used. The problem with the entry points is because the name you're using doesn't match the name in the .DLL. You can see the function exports if you open the .DLL in the Dependancy Walker utility. You can find it at http://www.dependencywalker.com/[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
my project is about problem reporting,, n im new to he world of vb.net, so i don't know anything,,, please help me out guys
post me on abbss.gaurav@gmail.com ,,,,,,
thanku
gaurav garg
|
|
|
|
|
If you have specific questions about a networked application then please ask them, nobody here will email you for this.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
abbss.gaurav wrote: im new to he world of vb.net, so i don't know anything
Buy a book. No-one can answer your question, you have not asked one. If you have specific questions, ask them. If you're totally lost, buy a book and learn the basics.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
There was no query to answer in this message.
|
|
|
|
|
Hello,
Can anyone please help me. I am new to VB.Net. I want to do a program that lists all the comm ports and the device name if any connected to those ports. For eg. we have a credit card reader connected to a port and it shoud display Comm1 : Moneris Credit Card Device. This is to help users to setup their initial settings for the program.
Thanks
|
|
|
|
|
There's no way to ID the device attached to the port. There was never a specification to identify serial devices. You can TRY certain commands that you know the device will respond to, and how it will respond, but most devices won't just plain old tell you "I'm a whatever" with a single well-known command. It just doesn't work that way.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
|
Could someone help me? I am trying to pass optional dates via a function.
I have VB.Net 2003.
What am I doing wrong? I keep getting asquibbly line under the zeros.
Here is a sample of the code.
Public Function myFunction(ByVal sSQL As String, Optional ByVal dToDate As Date = 0, Optional ByVal dFromDate As Date = 0) As Boolean
|
|
|
|