Click here to Skip to main content
15,881,687 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralA question about PictureBox Pin
24-May-04 23:52
suss24-May-04 23:52 
GeneralRe: A question about PictureBox Pin
Aaron Eldreth27-May-04 11:13
Aaron Eldreth27-May-04 11:13 
QuestionIs it possible to make a setup .exe with .NET installer? Pin
adonisv24-May-04 14:01
adonisv24-May-04 14:01 
AnswerRe: Is it possible to make a setup .exe with .NET installer? Pin
normanordas1-Jun-04 0:53
normanordas1-Jun-04 0:53 
GeneralRe: Is it possible to make a setup .exe with .NET installer? Pin
Ashraf Fathy1-Jun-04 2:26
Ashraf Fathy1-Jun-04 2:26 
GeneralCheck this out! Pin
adonisv1-Jun-04 9:27
adonisv1-Jun-04 9:27 
GeneralSetting Environment Variables... Pin
waffleman24-May-04 8:59
waffleman24-May-04 8:59 
GeneralRe: Setting Environment Variables... Pin
deeps2624-May-04 19:08
deeps2624-May-04 19:08 
The System.Environment class has methods to read the environment variables. However, this class has no method to set the environment variables for the current process.

To work around this problem, use the interop services to set the environment variables. Use SetEnvironmentVariable function.

ex

using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;

namespace SetEnv
{
///
/// Summary description for Class1.
///

public class SampleSetEnvironmentVariable
{
// Import the kernel32 dll.
[DllImport("kernel32.dll",CharSet=CharSet.Auto, SetLastError=true)]

[return:MarshalAs(UnmanagedType.Bool)]

// The declaration is similar to the SDK function
public static extern bool SetEnvironmentVariable(string lpName, string lpValue);

public SampleSetEnvironmentVariable()
{
}

public static bool SetEnvironmentVariableEx(string environmentVariable, string variableValue)
{
try
{
// Get the write permission to set the environment variable.
EnvironmentPermission environmentPermission = new EnvironmentPermission(EnvironmentPermissionAccess.Write,environmentVariable);

environmentPermission.Demand();

return SetEnvironmentVariable(environmentVariable, variableValue);
}
catch( SecurityException e)
{
Console.WriteLine("Exception:" + e.Message);
}
return false;
}
}


class MyClass
{
///
/// The main entry point for the application.
///

[STAThread]
static void Main(string[] args)
{
// Create a sample environment variable and set its value (for the current process).
SampleSetEnvironmentVariable.SetEnvironmentVariableEx("TESTENV", "TestValue");

// Verify that environment variable is set correctly.
Console.WriteLine("The value of TESTENV is: " + Environment.GetEnvironmentVariable("TESTENV"));
}
}
}

Hi all this is Deeps..
GeneralHTMLDocument and scripts Pin
Aggtaa24-May-04 4:10
Aggtaa24-May-04 4:10 
GeneralCheque Writing Control Pin
BrentSeufert22-May-04 12:54
BrentSeufert22-May-04 12:54 
GeneralRe: Cheque Writing Control Pin
Colin Angus Mackay23-May-04 1:53
Colin Angus Mackay23-May-04 1:53 
GeneralRe: Cheque Writing Control Pin
BrentSeufert23-May-04 18:23
BrentSeufert23-May-04 18:23 
GeneralRe: Cheque Writing Control Pin
GNPrinting5-Apr-11 19:25
GNPrinting5-Apr-11 19:25 
GeneralSending Faxes from .NET pages Pin
taylo21-May-04 17:01
taylo21-May-04 17:01 
GeneralReference nightmares in .NET 2003 Pin
jremignanti21-May-04 8:52
jremignanti21-May-04 8:52 
GeneralRe: Reference nightmares in .NET 2003 Pin
Nicholas Naddaf21-May-04 9:12
Nicholas Naddaf21-May-04 9:12 
GeneralRe: Reference nightmares in .NET 2003 Pin
TigerNinja_21-May-04 12:56
TigerNinja_21-May-04 12:56 
Questionsupports .net more than 2 GB of main memory? Pin
occcy21-May-04 4:01
occcy21-May-04 4:01 
AnswerRe: supports .net more than 2 GB of main memory? Pin
TigerNinja_21-May-04 13:04
TigerNinja_21-May-04 13:04 
GeneralRe: supports .net more than 2 GB of main memory? Pin
Aryadip24-May-04 0:55
Aryadip24-May-04 0:55 
QuestionRandom Navigation of a BindingContext ??? Pin
Kurt B. Ederhoff21-May-04 3:50
Kurt B. Ederhoff21-May-04 3:50 
AnswerRe: Random Navigation of a BindingContext ??? Pin
normanordas1-Jun-04 1:26
normanordas1-Jun-04 1:26 
Generalother .NET frameworks Pin
kratchkov20-May-04 10:44
kratchkov20-May-04 10:44 
GeneralRe: other .NET frameworks Pin
TigerNinja_20-May-04 17:18
TigerNinja_20-May-04 17:18 
GeneralRe: other .NET frameworks Pin
kratchkov21-May-04 9:59
kratchkov21-May-04 9:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.