Click here to Skip to main content
15,896,606 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: kernel32.dll Call Problems Pin
Pugman81225-May-04 12:34
Pugman81225-May-04 12:34 
GeneralOpening large tiff files Pin
NaserAbiat24-May-04 19:22
NaserAbiat24-May-04 19:22 
GeneralRe: Opening large tiff files Pin
Dave Kreskowiak25-May-04 0:30
mveDave Kreskowiak25-May-04 0:30 
GeneralRe: Font color,Type, Columns... Pin
Dave Kreskowiak24-May-04 16:49
mveDave Kreskowiak24-May-04 16:49 
GeneralRe: Font color,Type, Columns... Pin
Dave Kreskowiak25-May-04 0:28
mveDave Kreskowiak25-May-04 0:28 
GeneralRe: Font color,Type, Columns... Pin
rubdub25-May-04 20:18
rubdub25-May-04 20:18 
GeneralSetting Enviroment Variables Pin
waffleman24-May-04 8:58
waffleman24-May-04 8:58 
GeneralRe: Setting Enviroment Variables Pin
Dave Kreskowiak24-May-04 9:22
mveDave Kreskowiak24-May-04 9:22 
There is no support in the .NET BCL to SET environment variables. You can get them, but you'll have to make calls into the Win32 API to actually set them.

There are two sets of environment variables, user and system. When you launch an application, the process gets a copy of the system and user variables for it own use. Calling the GetEnvironmentStrings and SetEnvironmentVariable API functions will modify the PROCESS'S copy of the environment, not the master copy in the OS.

In order to change the System environment variables, you would have to make the changes to the Registry under the key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment

User variables are stored (I THINK!) under:
HKEY_CURRENT_USER\Environment
or
HKEY_CURRENT_USER\Volatile Environment

Then you call the SendMessage API function and tell it to HWND_BROADCAST the WM_SETTINGCHANGE message. This will update the OS copy of the environment variables and tell the running applications that this changes has been made so they can update also.


RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralMultithreading Help Pin
800XL24-May-04 5:59
800XL24-May-04 5:59 
GeneralRe: Multithreading Help Pin
Dave Kreskowiak24-May-04 7:11
mveDave Kreskowiak24-May-04 7:11 
GeneralRe: Multithreading Help Pin
800XL24-May-04 23:32
800XL24-May-04 23:32 
GeneralRe: Multithreading Help Pin
Dave Kreskowiak25-May-04 0:24
mveDave Kreskowiak25-May-04 0:24 
GeneralRe: Multithreading Help Pin
800XL25-May-04 0:57
800XL25-May-04 0:57 
GeneralRe: Multithreading Help Pin
800XL26-May-04 1:19
800XL26-May-04 1:19 
QuestionHow can I........? Pin
Night_Soul24-May-04 2:37
Night_Soul24-May-04 2:37 
AnswerRe: How can I........? Pin
Dave Kreskowiak24-May-04 3:22
mveDave Kreskowiak24-May-04 3:22 
GeneralRe: How can I........? Pin
Night_Soul24-May-04 4:45
Night_Soul24-May-04 4:45 
GeneralRe: How can I........? Pin
Dave Kreskowiak24-May-04 5:00
mveDave Kreskowiak24-May-04 5:00 
GeneralRe: How can I........? Pin
Night_Soul24-May-04 22:20
Night_Soul24-May-04 22:20 
GeneralAudio Tool Pin
Night_Soul24-May-04 0:00
Night_Soul24-May-04 0:00 
GeneralRe: Audio Tool Pin
Dave Kreskowiak24-May-04 3:18
mveDave Kreskowiak24-May-04 3:18 
Generalmulti user application Pin
Ganesh4u23-May-04 23:11
Ganesh4u23-May-04 23:11 
GeneralRe: multi user application Pin
Dave Kreskowiak24-May-04 3:09
mveDave Kreskowiak24-May-04 3:09 
GeneralUnicode Converting Pin
Pugman81223-May-04 23:02
Pugman81223-May-04 23:02 
GeneralRe: Unicode Converting Pin
Dave Kreskowiak24-May-04 3:01
mveDave Kreskowiak24-May-04 3:01 

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.