|
|
Hi,
Have you found a solution ?
In Folding@Home you can set max cpu usage in %, but no one has been able to tell me how this is done in vb.net.
|
|
|
|
|
|
I need to do a simple button select from a form to call a MS Word document and a PDF document. I'm new to DotNet so be nice.
|
|
|
|
|
If you just need to open a document, you can simply shell out the command using a commandline similar to this:
Shell("C:\Program Files\Microsoft Office\Office\WINWORD.EXE <mydocument.doc>")
The document must be fully qualified with it's path i.e. "C:\MyDocument.doc" or whatever.
You can do the same for a PDF.
If you need to actually interact with the document, you will have to use the Word Automation model, and your application MUST be compiled against the same version of Word the user has.
Similarly, if you need to interact with a PDF file you will need a full version of Adobe, not just the free reader, and you will have to program against the Adobe API library.
Robert
|
|
|
|
|
I can create a new instance for the MS Office app with the shell statement:
Shell("C:\Program Files\Microsoft Office\Office11\WINWORD.EXE ")
but I can not figure out the proper syntax to call a specific word document in a folder. I have tried the double, triple quotes...
Shell("c:\Documents and Settings\Administrator\My Documents\Docs\Analysis.doc")
I still get file not found in my try catch block
|
|
|
|
|
i am having a problem with the time. i want to see how many hours there were between the first time and the current time. I am making a bit bit game and i want to check the last time that the pet was fed and the distance in hours from that time till current time. i am having a problem with the datediff because if a day passed away, the hours will begin again or with a negative sign before the number. how can i make it that it will keep going on the numbers now restarting on a date.?
|
|
|
|
|
|
|
hummm.. Link Works for me..
|
|
|
|
|
I am have a problem with a custom dll that I have created.
The dll works perfectly until I try to create an installer for an application that uses the dll.
The error that I get when I try to run the installed application is "File or assembly name mycustomdll, or one of its dependencies, was not found"
I think that the issue is that I do not have the public and private keys set for it and that it is not in the global assembly cache.
I got it working by adding the assemblies to the folder where the executable will be placed on the target machine. It does not however seem like this is the best way to do things.
Any suggestions
Any help is greatly appreciated
|
|
|
|
|
You are basically correct. NET locates assemblies by looking in the GAC and the root folder of the application. And you cannot install an assembly to the GAC unless it has a strong name - i.e keys set.
However the decision to install an assembly to the GAC is based on whether you intend to share it with other applications. If you do not intend to use the assembly in any other applications, the best practice is to install it to the app folder.
Robert
|
|
|
|
|
I am going to use it in other applications so it would be helpful to put it in the gac
I have been doing some reading about it but have not been able to make it work.
After I have created the dll the next step is to create the keysets by using
sn -K <filename>
I got this far.
but now what? and where does this file go and how is it used.
Thank you
|
|
|
|
|
Technically, ypou should create a Merge Module setup component for the assembly if you plan to use it accross multiple setups/applications.
But you can also add the shared assembly to the application setup directly.
The basic steps are:
1) Create the shared DLL project, code, compile and sign with a strong key. Then close that solution.
2) Create the EXE project. Add a reference to the compiled release version of the shared DLL, and code the application EXe. Compile the EXE for release and close the solution.
3) Create the Setup Project. Add the compiled release version of the EXE. The IDE will automatically add a dependency reference to the DLL.
4) Change the Folder property of the shared DLL from the default value of Application Folder that was set automatically by the IDE to Global Assembly Cache Folder. Typically you will leave other properties at their defaults.
5) Compile the setup for release and close the solution.
Hope this helps.
Robert
|
|
|
|
|
Thanks Works perfectly
Andrew
|
|
|
|
|
I am doing some work using an ArrayList in VB .Net (I'm new to VB, coming from a C# background) and I am currently without my library of code samples. here is what i am hoping to accomplish. say i have built an arraylist like so:
<br />
Dim arr As ArrayList<br />
arr.Add("a")<br />
arr.Add("b")<br />
arr.Add("c")<br />
arr.Add("d")<br />
arr.Add("e")<br />
arr.Add("a")<br />
arr.Add("e")<br />
arr.Add("a")<br />
<br />
What I am trying to accomplish is to make the array have only one instance of each value, so that once I run this arraylist, the vales would be:
a
b
c
d
e
Any suggestions would be great
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
Here is function that will do the trick.
Private Function DistinctArray(ByVal arr As ArrayList) As ArrayList<br />
Dim x As New ArrayList<br />
Dim myEnumerator As System.Collections.IEnumerator = _<br />
arr.GetEnumerator()<br />
While myEnumerator.MoveNext()<br />
If Not x.Contains(myEnumerator.Current) Then<br />
x.Add(myEnumerator.Current)<br />
End If<br />
'Console.Write(ControlChars.Tab + "{0}", myEnumerator.Current)<br />
End While<br />
Return x<br />
End Function
Here is my test code.
Dim arr As New ArrayList<br />
arr.Add("a")<br />
arr.Add("b")<br />
arr.Add("c")<br />
arr.Add("d")<br />
arr.Add("e")<br />
arr.Add("a")<br />
arr.Add("e")<br />
arr.Add("a")<br />
Dim strValues As String<br />
Dim x As New ArrayList<br />
x = DistinctArray(arr)<br />
Dim myEnumerator As System.Collections.IEnumerator = x.GetEnumerator()<br />
While myEnumerator.MoveNext()<br />
strValues += myEnumerator.Current & ", "<br />
End While<br />
MsgBox(strValues)
"People who never make mistakes, never do anything."
My blog
http://toddsnotsoamazinglife.blogspot.com/
|
|
|
|
|
Awesome! that is Exactly what I needed
Thanks A ton.
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
I have a datatable filled with data.
How can I query a cell in the table to see if it has changed since the last acceptchanges?
I'm familar with the column changing event. I want something similar to this where i can query the original value and proposed value etc. But I want to just make reference to a cell in the table and test it at my own liesure.
I can do this with a row by typing the following:
if drw.RowState = DataRowState.Unchanged then
' Do something...
endif
Is there any way to test the following for a change?
dataset.tables(0).rows(0).item <--has changes
And if so is it possible to test the current value against the oginal value in the cell?
I want to check if a certain cell value has changed and action the result.
Thanks Glenn
|
|
|
|
|
In a datagrid how can I get the current row value of its underlying table?
Or how can I get the dataset field value of the datagrids current row?
Thanks.
|
|
|
|
|
|
That did it, thanks alot!
|
|
|
|
|
Hi
Can anyone tell me is there any way to interact autocad in vb.net
if yes please tell me i need it in urgently
Thanks in advance
|
|
|
|
|
|
In a text box I want only numeric or backspace allowed. I know how to do the numeric but have not a clue with the backspace.
Here is my code. How do I also get the backspace?
'An integer allowed only
If e.KeyChar.IsNumber(e.KeyChar) = False Then
e.Handled = True
End If
|
|
|
|