|
i want the answer of that work tody to finish my tasks iam lating
i want to make an array that contain of 25 numbers this array contain only 0,1 and the aray is create random so the arrang of number is chane automaticaly evry time i create it
ma_refay
|
|
|
|
|
Random r = new Random();
int[] arr = new int[25];
for(int i = 0; i < 25; ++i)
arr[i] = r.Next() % 2;
|
|
|
|
|
Random class[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
What i need to do is to get the path on the local filesystem were a notepad application is saved. I have written a C# console application which spawns a notepad process. When the user clicks on the notepad File -> Save menu I need to capture the location where the it is saved.
I used System.Diagnostics.Process to start the notepad process. it seems I have to use P/ Invoke to get the work done. But can't figure out how. Please help me.
Thanks.
Harsha Kamat
|
|
|
|
|
Try Environment.GetFolderPath(Environment.SpecialFolder.System) to get the system path, then
Path.Combine(..., "notepad.exe")<br />
<br /> Or alternatively Process.Start("notepad.exe") (which uses the shell).
|
|
|
|
|
The 'Environment.GetFolderPath(Environment.SpecialFolder.System)' will give the path to the notepad.exe application. What i want is the local filesystem path where the contents of a new Notepad will be saved. i.e the path the user selects in the FILE->SAVE menu of the Notepad application.
Harsha kamat
|
|
|
|
|
Don't think that's possible without some really clever low-level API hooking wizardry and several large pinches of salt.
|
|
|
|
|
How to access variable in one Form from anothre form, and how to send data or messeges
between them.
I have two forms (Forms1 and Fomr2) and what i want is: when i click on a specific button in Form1 i want a specefic message (migth be written in textbox in Form1) to be sent to Form2 and then displayed
in listbox there.
|
|
|
|
|
|
public static variables will do the trick.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi,
A client is getting the below exception when trying to open a control.
Exception: System.IO.FileNotFoundException: Could not load file or assembly 'vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.<br />
'vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
I've looked around the internet and people suggest that you should have the latest .net framework installed, which she does. Im quite stuck, because this doesnt happen on any development PCs.
Any ideas?
Regards,
Gareth.
|
|
|
|
|
Hi,
vjslib.dll is part of J#, it contains things such as a zip class and a biginteger class.
So if you are using C# (through Visual C# Express) now is the time to also
download and install Visual J# Express.
|
|
|
|
|
Hi Luc,
The problem is that we dont want users to install programs since the control is based in a web client. Is there a way around this?, eg embeding the vsjlib somehow.
Regards,
Gareth.
|
|
|
|
|
Hi Gareth,
no:
- AFAIK you cant embed a dll into something else
- you are not allowed to distribute parts of .NET
but you may find a way around without vsjlib by using other classes that are available,
or by creating your own. What is it you really need ?
|
|
|
|
|
Hi Luc,
Im using a 3rd party DLL which creates some graphs, that uses the vsjlib. So i cant not use vsjlib since its not my code
I've contacted the 3rd party company but was hoping there might be just a simple way around it.
Regards,
Gareth.
|
|
|
|
|
I see.
You might consider another graphing approach then; there are several graphing articles
on CodeProject (and lots of commercial products as well of course).
|
|
|
|
|
To consider another approach would mean a months work would be wasted and a license fee payment wasted as well.
I found on the web you can distribute the vjslib.
http://www.codecomments.com/message160639.html
The problem now is, how do i make the 3rd party dll look at my version of vjslib and not the one in the windows directory.
Regards,
Gareth
|
|
|
|
|
Hi Gareth,
vsjlib.dll being redistributable is very good. Here are two attempts to use it:
1. put it next to the dll that references it, remove it from its original position
and see if the graph lib still works (or use some tool to see which vsjlib.dll
got used, TaskInfo might help here).
2. ask your vendor to come up with a product that includes its own vsjlib.dll and
does not reference the one that may or may not be in the system folders.
Good luck
|
|
|
|
|
The 3rd party guys got back to me and gave me the following URL:
http://devcenter.infragistics.com/Articles/ArticleTemplate.Aspx?ArticleID=1264
But i dont really understand it that well. I also tried uploading the vjslib to the webclients bin directory (same location as my controls bin dir) and i get a new error:
[FileLoadException: Could not load file or assembly 'vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Failed to grant minimum permission requests.
I've signed the vjslib with our companys certificate but that didnt help.
Regards,
Gareth.
|
|
|
|
|
Hi Gareth,
I fail to see the relevance of the infragistics article; it does not contain "vsjlib".
I did not study it, as I am unfamiliar with web apps.
Is your graph lib a signed dll ? If so it needs vsjlib.dll to be signed also (with the
signature they expect, not with yours). If not, there would be no need to sign at all.
I suggest you Google "could not load file or assembly vjslib.dll"; there seem to be
issues with Win64.
|
|
|
|
|
Hi Luc,
The graph DLL is signed with our company certif, and if it wasnt, it would not be allowed to run in the web client. The webclient is running on a UNIX Solaris box and the client machines are all windows 32bit so i dont think the Win64 issue would be affecting this.
Regards,
Gareth.
|
|
|
|
|
Hello,
Im new to C#, I try to connect a pda to a server via GPRS.
But I have no idea to how start!
Anybody here who has a code example or can give me some information?
Thanks in advance
Regards,
Hulk
|
|
|
|
|
if you know the interface of the webservice,but you aren't sure what knid of transport protocol can be used, and whether to carray the infomation with the soap1.1 .Even you dont know where is it ,the web service.
How can you call the service in the runtime when you get some services that are fit ?
In dotNET, if you only dont know the address of the service, you can config the *.conf file together with the application to indicate the location.
hello world!
|
|
|
|
|
Set the URL of the webservice object at runtime. Make sure the definition is set to by dynamic.
File Not Found
|
|
|
|
|
Make sure the definition is set to by dynamic.
what is the definition?
hello world!
|
|
|
|