|
Because setting an environment variable only affects THAT PROCESS. It will NOT update the system-wide table of environment variables.
When any process is launched, that process gets a COPY of the environment variables table that launched the process.
So, Windows Explorer (the Shell) has the master copy of the running environment variables. When you double-click an application to launch it, the loader gives the new process a copy of Explorer's environment table. When the code in that process modifies the environment variables, it's modifying it's own copy of them, NOT THE MASTER COPY IN EXPLORER!!
When the new process is closed, all changes to that copy of the environment table are lost.
The master copy of the environment variables are stored in the registry under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
But, changing those values will not take effect in any already running process. Only new processes launched by the Shell will get the updated variables.
|
|
|
|
|
Thank you very much , i totally underatand now.
Once you change the command shell , value of env variable changes .
-sandeep
|
|
|
|
|
Ok, here is some code (i cut some out so this message would not be too long) that I found that is for VB.NET for converting a PDF to a TIFF image.(it's at the very bottom, and how the heck do you do code(or even quote?) boxes on these forums???)
I'm trying to convert this code to C#. I've looked over the Acrobat Javascript API documentation and found that if I change "com.adobe.acrobat.tiff" to "com.adobe.acrobat.html-3-20" it will save as HTML, rather than TIFF. (which is my goal)
So, i've got Visual Studio Express for C# going and i've loaded my Acrobat reference, but i'm stuck on the javascript bridge part. For some reason Adobe thought it would be awesome to make a "Save As.." function only available with Javascript, so to do it on .NET one must create a javascript bridge.
What can I do to make this javascript bridge work?? here is the code I have so far for C#.. see the comment
I have searched and searched but found no "reference" for "JSObj". Can anyone provide any help at all with this?
My C# code..
CAcroPDDoc pdDoc;
CAcroAVDoc avDoc;
string test = @"C:\temp\test.htm";
pdDoc = (CAcroPDDoc)avDoc.GetPDDoc();
object JSObj = pdDoc.GetJSObject();
JSObj.SaveAs(test, "com.adobe.acrobat.html-3-20");
VB Code I found..
PDFApp = CreateObject("AcroExch.App")
PDDoc = CreateObject("AcroExch.PDDoc")
PDDoc.Open(Me.txtPDFPath.Text)
AVDoc = PDDoc.OpenAVDoc("TempPDF")
PDFApp.Hide()
JSObj = PDDoc.GetJSObject()
JSObj.GetField("Text2.0.0.0.0").value = "JESSICA"
strPDFText = JSObj.GetField("Text2.0.0.2.0").value
JSObj.SaveAs("C:\TestTiffs\TestGood.tif", "com.adobe.acrobat.tiff")
-Shea
-- modified at 6:27 Thursday 11th October, 2007
|
|
|
|
|
Don't know about your code, but as for code boxes, for small bits of code (a few lines) use the code tag:
<code>my code here</code>
For longer peices of code, with indentation, use the pre tags:
<pre>my long code</pre>
The pre tags preserve the indentation. You can also specify the langauge within your pre tags to have colorzation:
<pre lang="C#"> my c# code </pre>
|
|
|
|
|
shea851 wrote: JSObj.SaveAs(test, "com.adobe.acrobat.html-3-20");
try
object[] objArray2 = new object[] { _outputFile, "com.adobe.acrobat.html" };
jSObject.GetType().InvokeMember("SaveAs", BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance, null, jSObject, objArray2);
"America prays for god to destroy our enemies. Our enemies pray for god to destroy us. Somebody’s gonna be disappointed!"
-George Carlin
|
|
|
|
|
Now i have a problem to search pdl(group) in the ldap server, i can search the pdl(group) with the following filter
string filter = "(&(objectClass=group)(displayname=" + displayname + "))"
but can only filter out with the whole display name
if i want to search with partial name, what should i do??
|
|
|
|
|
I'm facing one problem with DataGridViewRow.Tag. I set some values to DataGridViewRow.Tag. Then, I get those values whenever it is necessary. but when I do sorting the GridView by clicking the header of Girdview, all values which was set are gone...
The following is my sample code..
Filling the data to DataView
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
this.employeesTableAdapter.Fill (this.employeeMgmtDataSet.Employees);<br />
<br />
}
Setting the value to DataGridViewRow.Tag
private void button1_Click(object sender, EventArgs e)<br />
{<br />
<br />
foreach ( DataGridViewRow dr in dataGridView1.Rows )<br />
{<br />
dr.Tag = "Michael Sync";<br />
}<br />
}
Getting the value from DataGridViewRow.Tag
private void button2_Click(object sender, EventArgs e)<br />
{<br />
foreach ( DataGridViewRow dr in dataGridView1.Rows )<br />
{<br />
Console.WriteLine (dr.Tag.ToString ());<br />
}<br />
}
it works fine before sorting.. but Tag become "null" after sorting.. Why is it happening like that?
Any idea would be appreciated. Thanks in advance..
|
|
|
|
|
The DataGridView is probably rebuilding the rows from the datasource when you sort. This means it's removing all the existing rows and adding new ones.
There should be a Tag property for the objects in this.employeeMgmtDataSet, which you could use.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi,
I like to have a menu, in which a click with the right mouse button on a ToolStripMenuItem opens a ContextMenuStrip. Has anybody made such stuff? If yes how to do this?
At the moment I use the MouseUp event of the ToolStripMenuItems for differentiating a click with the left mouse button from one with the right mouse button. At a click with the right mouse button I want to show a ContextMenuStrip, but anyway the position isn't okay and the main menu closes.
Greets
pkoeppe
|
|
|
|
|
Simple :
Use the ContexMenuStrip in the ToolStrip Propertie and change it from "None" to "ContexMenuStrip";
Have fun
kobkob
|
|
|
|
|
Sorry, ToolStrip Property of what?
pkoeppe
|
|
|
|
|
This Propertie:
ContexMenuStrip
it got the same name that the way i forgat, Sorry
kobkob
|
|
|
|
|
When I set the ContextMenuStrip Property of the MenuStrip the context menu appears only when I right click on the MenuStrip but not when I click on any inferior ToolStripMenuItem.
Sorry but I need the context menu for the sub items of the MenuStrip.
pkoeppe
|
|
|
|
|
The Items inside do not have that options
i would suggest tcontinue use the rightclick event & to add mouseEnter/Leave
if i'll encounrt any other i'll let u know
have a nice day
kobkob
|
|
|
|
|
HI,
first :
i would like to know how to run sevrel forms that each one is independent
second :
a year ago i wrote an app that had a while() stat' that would run an algorithm so the all app was frozen. i could'nt do anything but wait.
how can i improve it do other things in the app while the "while()" Runs
any suggestions?
all will be welcomed
THNKS
kobkob
|
|
|
|
|
To run several forms independantly, you just instance your class:
myForm newForm = new myForm();
then call Show(), not ShowDialog();
newForm.Show();
A new window should appear and run, and both windows will run at once.
Also, for long while loops, you can either run your algorithm in a new thread (see below), or add 'Application.DoEvents()' into the while loop, that way you can still move the form around, and it doesn't seem to be frozen.
To start a method in a new thread:
Thread myThread = new Thread(new ThreadStart( -method name- ));
myThread.Start();
If the method has input parameters, its a little emore complicated.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
THNKS man
have a great day
kobkob
|
|
|
|
|
can we make DIV Read only?. is it possible to Make in server side?
sathimailin
|
|
|
|
|
Hi,
I need to load data from .csv to SQL Server(2005).I may have to do it often thus need a simple,cost-effective way of doing it.
I tried using Bulk Insert but there are issues with delimiter(they are not same all files)
Any pointers would help!!!
(May be c# .net too)
Aswini Kumar.A.V.
Hyderabad, India
|
|
|
|
|
Do you mean a scripted method? If not its pretty straightforward using the import menu in Sql Management Studio.
Regards,
Rob Philpott.
|
|
|
|
|
I want to get extension of file that the user has selected to open.
OR i want to allow the user to open only specified types of file in the
"FileType" field............
Regards,
chanzeb chaudhary.
|
|
|
|
|
Have a look at the Path class. It has methods that allow to manipulate with the string that represents a file path. You can retrieve the name of the file chosen through the openfiledialog by its filename property.
If you want to allow the user to open only specified types of file using openfiledialog then use the Filter property of openfiledialog class.
|
|
|
|
|
Hi,
here.. i am checking the extension of file name extension to jpg..
for image files
if(Path.GetExtension(photoFile.FileName).ToLower()!=".jpg")
{
MsgLabel.Text=" File should have .jpg extension ";
return;
}
Aswini
|
|
|
|
|
As I said you can use Filter property of openfiledialog class to restrict files with jpg extension
|
|
|
|
|
Use filter for the openfiledialog eg: C# files(.cs)|*.cs makes only .cs fileextensions to be selected.
Koushik
|
|
|
|