Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




API Needed: Get User Current Color Settings


Well, I've said it before: I'm Still New To VB!!!
Few days ago, i found on this site "a Change Display Settings" exe application with its code, posted by Steve ...(I Think!)
Well, I had a hard time reading and understanding the code, and the API calling, but i finally got it! The only problem is that i need in my program to change only the Resolution Settings, and not the Color Settings(16, 24, 32... bits), while the posted one changes everything!(Resolution and Color).
Is there any code for that???
Or i might just need an API function to get the user current color settings, and then use Steve's posted Code to change the Resolution Settings, and RESET THE COLOR SETTINGS to the user current defined settings...
Can I get the user current Color Settings???

Help, Please!!!

Thanx.....




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Erasing /documents And Settings/[user]/local Settings/temporary Internet Files
Hey guys.
I have a program that erases temporary internet files from my hard drive and I have having a horrible time trying to get it to erase /documents and settings/[username]/local settings/temporary internet files/ when I run the program is acts like that dir doesn't exist. Like it can't see it. Anyone heard of this problem before? Any help would be MUCH appreciated.

-Wolfy1818

Save Current Settings!
Id like to be able to save every control field in my program into a DATabase! and the retreave it later, What is the easiest way to do this?

And Id like to save the current settings. For example, if the user removed the StatusBar, it will be off when the program is next ran.

Internet Explorer Current Settings
Is there a way to get the web page url of an open internet explorer window?

How To Save The Current Settings From A DbGrid
Hi,

when the User of my program change for example the width of a column how can I safe this settings?

(I tried DefColWidth = 0 but it is not true what the MSDN say that it makes autosize.)

nice greetings
Franky

Settings Current Item In Array
I have an array of 5 images (0-4) and I want to set the active image randomly in runtime (which then changes appearance, or something), but only from the first four images (0-3). This is the code I have to randomly select an index from the array.


Code:
RndX = Int((ImgMenu.UBound - 1) * Rnd(ImgMenu.UBound))

Now I want to get which image is randomly chosen, and I want to invoke its MouseUp event (I've tried ImgMenu (RndX)_MouseUp, but VB doesn't recognize this.

Anyone have the (probably simple) solution?

Dave.

Formatting A User Settings Date To A System Settings Date For Access
Hi,

I have been trying to look for this on the forums somewhere, but to no avail.

I'm sure this is a common problem for people having to write code to support different locales using Access.

When looking for records (ie when performing an SQL statement with the 'WHERE' in it, Access only returns the system settings locale (ie the US one where short date is read as mm/dd/yyyy), but any date we enter using Date or Now uses the user settings date. Forcing a Format of Now to mm/dd/yyyy does not work as it passes the user settings date.

My question is then, how can I force a date to take the system settings date so no matter what date I have it will always be Access friendly.

E.g: Here's an example

1) User settings short date: d.M.yy

2) Format (Now, "mm/dd/yyyy") returns

8.4.02 and NOT 04/08/2002, which is what Access expects.

Date$ reads the system settings date but can it be used somehow to force a user settings date ???

This is urgent. Many thanks.

Mike

Problem Reading Current NIC Settings From Registry
Can anyone help out here?
I am trying to read out the current NIC settings from the registry by iterating through all subkeys in this location: HKLMSystemCurrentcontrolsetControlClass{4D36E972-E325-11CE-BFC1-08002be10318}
The problem is that it will return the values that I want from every key other than the currently active one. This isn't a problem in a simple VBScript that I wrote, but I would prefer to have a nice GUI interface for users to see what the current setting is from a remote location.
Here is the code currently in place:
Private Sub btnReadCurrent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReadCurrent.Click
strComputerSystem = lstTargetSystems.SelectedItem
For Index As Integer = 0 To Key.SubKeyCount - 1
Try
RemoteSubKey = Registry.LocalMachine.OpenRemoteBaseKey(RegistryHive.LocalMachine, strComputerSystem)
SubKey = RemoteSubKey.OpenSubKey("SystemCurrentcontrolsetControlClass{4D36E972-E325-11CE-BFC1-08002be10318}" + "" + SubKeyNames(Index), False)
strSoftware = SubKey.GetValue("DriverDesc")
strSpeed = SubKey.GetValue("SpeedDuplex")
ListBox1.Items.Add(strSoftware & vbTab & strSpeed)
Catch ex As Exception
End Try
Next
End Sub
I am, however, able to pull the settings out if I specify the exact subkey (in this case 0008) - but iterating through just won't work, and since not all of our systems carry the same NIC cards and/or registry entries, it wouldn't be helpful to statically refer to a specific subkey...
Any help would be greatly appreciated..

User Profiles List? Current User Logged In?
how can i get a list of all users who login into the PC and their default settings folder paths?

thanks!

Tech Question - How To Save Your Current Drivers And Settings To A Folder??
It took me FOREVER to get my cable modem working because of my crappy motherboard. Im going to format soon, and i want to back up all my drivers and the settings windows uses for all my hardware. does anyone know how to do this, or can suggest a good program?

Color Settings
same application shows different colors in win 98 se and win xp home edition . I am using pallete colors for designing forms in vb .

Any solutions ?

Thanks

Help Needed To Set Desktop Settings Through VB
How to set Desktop wallpaper to None?

How to set Screensaver to None?

How to set Screensaver to 3D Text with "wait 5 mins and on resume Password protect"?

How to set Power Options -> Turn Off Monitor After 10 Mins

Thanks in Advance

Window Color Settings
I know this is not a VB question, but please help me out.

You know the color setting for the display? Is it save into a file? I want my new Window Environment to have the same setting as the old one rather then coming in and have to set the colors again.

Thanks

How Can I Know If The Current User Is Admin User?
Hi
How to get the parent process name in OCX file?
Thanks

MSFlex Grid Color Settings
I am trying to color cells from an MSFlexGrid and I need to color the cells with different colors. I activated each cell and used the following VB instruction to color it:

MSFlexGrid.CellForeColor = color

"color" is a ColorIndex Value, but it doesn't work! It works if I use the QBColor function:

MSFlexGrid.CellForeColor = QBColor(color),

but I need more than 16 colors (since QBColor only supports 16, EGA)

Does anybody know if it is possible to use a standard color (from the color index) to color a FlexGrid cell or do I need to use the hex value of the color?

Thanks a lot for your help!

Determine Windows Color Settings
Can anyone tell me how I find out what Windows color settings are set to? What I mean is I want to know whether the computer has 16, 256, 16-bit, 24-bit or 32-bit color enabled.

Cheers.

Edit -
Don't bother. Have found what I need. If anyone else interested then just post here and I'll put what I've found here.

How To Overwrite The System Color Settings In Vb?
We may change the system color via Display Properties/Appearance/Advanced from desktop property. I wander if there is any way in vb to overwrite the system color so that colors used in application level can be independent from system? Thanks for your inputs.

Changing Text Color In An RTF Without Changing The Current Texts' Color
I need to add multiple lines of text to a Rich Text box, all with differnt colors.

Now if say, i have an line of text colored orange, and i add a line of text colored as red, the orange line becomes black (default) and the last line is red.

I need to keep the orange line orange, while the new line red

i will attach the code of the test example i wrote:

You will need to add the Microsoft Rich Text Box v6

Here is the code i did in the command button (Command1)


Code:
With RTB
.Text = .Text & Text1

.SelStart = Len(.Text) - Len(Text1)
.SelLength = Len(Text1)
.SelColor = Val(Text2)

End With

The form contains a rich text box (RTB) a text box where you input the text to be added (Text1) another text box where you enter the color of the new text (Text2) and the command button to add (Command1)

Default Color Scheme And Display Settings
I have soem VB experience and I need to amke a simpel program for my friend:

She has accidentally set some unky colors and cannot see anything and the border size is way too bog. Thus she cannot get into the control panel and change it back.

Are there default registry settings I can set to make everything go back to normal? I'm looking for setting the "color scheme" back to default or, Windows Standard I think it's called, anything along those lines so she can see what's going on inside the windows once again.

She has Windows 98

Change System Color Quality Settings...
Hello everyone, I was wondering if it is possible to changed the system color quality settings for example I want to change it from 32-bit to 16-bit or vice versa with a click of a button.

My OS is windows 98SE and I'm using tv-output, I don't know if this is normal but 98 just changed it color settings without prompting me rarely during startup (32-bit down to 256 colors). And it is very annoying if you ask me.

I wanted to remedy this by adding a code to my app, so that it will prevent the OS to do such an act and force it to use only 32-bit color quality settings, only if it is possible. Hopefully it will somehow make my system stable. I hope you get my idea.

I will wait for your replies and hopefully I can get an answer soon. Any help would be greatly appreciated, thank you very much in advance. God bless and more power to everyone.


Regards,

J P X T R E M E

How To Get Color Palette Settings Of Desktop, In Windows ?
Hi

I need to get the Color palette setting of Displauy Properties (ie. 256 Color / 16 Bit / True Color )in Windows thr. VB 5.
How to change them thr VB

When we change manually, it asks for a Restart. Will it beheave the same way thr. VB ?

As I am using a control which does not allow some specific bit depth images. So I need to check and change Display PRoperties.

Anyone has info ?

Harshad
UK

User Settings
I'm comfortable with the way VB works and is ran. I've made a few small programs, for my benefit. I've just made an alarm clock for my PC, and I want it to save settings (it supports 5 different times.. and plays a music file (.mp3, .wav, or .mid) when the alarm is activated). I want it to save the file/directory (which is held in a Text Box) and also the times (which are labels).

I thought of, and tried, using a Sequential file.. but I can't get it to load in the label and textbox. Any ideas? I don't know how to write to nor read from .ini files.

Any help would be appreciated.

- RaGe

User Settings
G'day all

Not sure if this is the right place to post this so sorry in advance if I'm in the wrong spot.

To the question I'm trying to retrieve the email account settings from outlook/outlook express, POP3 server, SMTP server, email address etc.

I've spent most of the day looking through the registry with no luck and hoping someone can point me in the right direction.

Ta in advance
Garry

Word: Getting The Current Font Color
Does anyone know how to get the current color from the "Font Color" Control inside the "Formatting" CommandBar?

Code:Application.CommandBars("Formatting").Controls("Font Color").??

Tried looking in M$ VB for Apps and Shared Libraries Reference as well as M$ Word 2000 Language Ref

Tried looking in the Document object as well. No luck

Any help would be appreciated

v/r,
Chris

Get Settings Across Different User Accounts
Hi there

I have developed a program that should be able to run on different accounts, administrator as vel as limited accounts.
Regardless of user my application should use the same settings (both read and write).
I am using the registry to hold my settings.
How do I achieve that?

TIA

Saving User Settings
I am trying to save user selections of several checkboxes
or option buttons after the user exits and want to recall them on restart. I have been trying to use these registry functions with no luck.

Private Sub Form_Unload(Cancel As Integer)
SaveSetting "AppName", "Section", "Key", "Setting")
End Sub

Private Sub Form_Load()
GetSetting("AppName", "Section", "Key", [Default])
End Sub

How do you format the parameters of these functions?
Can you name you VB project (i.e. "C:someapp.vbp")
as the app or does it have to be an EXE file?

What are the "Section" , "Key", "Setting", and the [default] parameters?

Since "GetSetting()" returns a string, how can you set a checkbox value with this?

Multi-user Settings
How do I connect 2 computers to a common sql server database stored on one machine. What should be the connection string and what software (operating system) should be installed on the machine which has the database and the other machines which run the exe. I want to implement a multi-user system

Loading User Settings
I am attempting to load some user settings when my application loads. In vb6 I can do this by creating a DAT file usinf the code:

Code:Dim mfileSySObj As New FileSystemObject

mfileSySObj.CreateTextFile("settings.dat")


Is there any way that this can be done in eVB??

Any suggestions would be greatly appreciated

Accessing User Settings In Registry
My program needs to change an Internet setting (with the users permission of course), but the registry path, rather than having a username, has a very long number like "HKEY_USERSS-1-5-21-1078081533-1078145449-682003330-1003", how can I determine which is the current user?

Thanks

Colour Control And User Settings...
I have written a little application that is used by about 20 members of my team... Now it has been suggested by several different people, that it would be nice if they could customise the colours of the forms and text. Sooo here's my question.

Does VB allow you to access the Windows Colour Palette or do I have to code a basic one manually?

Also, How can you apply the changes to the whole form in one hit so you don't have to code?

frmControlPanel.BackColor =
lblBackground.BackColor =
lblForeground.BackColor =
lblText.BackColor =

etc, etc, etc.

Also, if they change the forms, can I create a file stored locally on their machine that will load the application with the saved colour scheme?

All Help Appreciated

Inno Settings For 'all Users' Or 'just This User'?
Hi,

Does anybody know if it is possible to get Inno to offer the option to install an app for 'all users' or 'just this user'.

As always, I appreciate any help.

Saving User Settings/preferences
Hi
What is the best way to save a user's settings/preferences in a vb program?
Any suggestions will be appreciated
thanks
Colin

How To Detect User Warning Settings
anyone know how to detect a user's personal warnings settings? I want to setwarnings to false while they run my Access application but want to be able to set them back to what they were before so that users that have them turned off by preference do not have them turned back on. (those warnings scare some users and I don't want to be responsible for people panicking and thinking they have done something wrong...."Oh my God I'm going to modify data!!!! Is that okay???? Call tech support!" Not the result I want!!!!)

How To Save Settings Enter By User??
i am doing a program that lets the user select the volume and other setting like zoom, focuz, mute..... by using sliders and option button. in the same form, i have a command button that is to save the new setting input by the user. is there anyway to write the code so that the next time the user runs my program again, the setting will remain the same? and when the user change some of the setting n click save command button, the new value of the setting will be saved.
thanx!

I NEED TO RESET A USER'S PROFILE SETTINGS!
Ok.......We all know abt a user's profiles ettings....but I've changed the user desktop through the HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders key..........how do i get the registry to indicate that change? I mean I want the change to happen on the fly..Please help me!

[Edited by Doomoo on 06-09-2000 at 02:25 AM]

Detect A User's Proxy Settings
Hi,

Can anyone give me the sample code to determine the proxy configuration (i.e the proxy server IP and the proxy server port) of the user.

Regards

Saving And Reading User Settings
I have a fully customizable program.

One of the items that needs to be customized is the company name.

I have the company name in a label, but i need the user to be able to go into the options form. type in what their company name is, and save that info somewhere.
Then when the main form is loaded again, it needs to call that information and type the company name they specified into the label.

How can this be done ??

I also, under the options form, i have a option on there to allow the user to minimize the application and it keep running in the systray instead of the taskbar.
I want to give them the option of turning this off, so thats another setting i'd have to be able to save, and recall at a later time.

Thanks in advance for any help.

What Types Of User Settings You Usually Allow In Your Application?
Hi, I'm a new comer in the VB team at MS. I'm on a project to create some classes in VB .NET that will hep developers save / load the applications' settings easier. Those settings can be UI - form size, font size, form position - or environment settings, any type of user settings you would allow. I really appreciate if you can list out the user settings that you had in your applications, I'm trying to build a list of possible pre-defined settings as well as customer settings.

Thanks for your help.
Huy Nguyen.

Current User???
i'm looking for a way to check running processes to see if there is a Project.exe (for example) ..

anyone?

Who's Current User
Hi
Can anyone tell me how to programmatically "know" the name of the currently logged on user in Win XP and/or any of the other Windows versions. Maybe I should say why I want to do this. The project is a delayed startup program to stop all the run programs from starting right away but to delay them so the user can get going and start working. Local Machine entries are fine - but I need to work with the Run entries for the current user.

Thanks
Robert

Current User?
Is it possible to get the name of the user that is currently logged on (on a WinXP system)?

Current User
In VB 5/6 ... how do I find out the current 'Full Name' of the user? I able to find out the 'UserName' but not the 'Full Name'...

Anyone know? Help would be appreciated!

Current User
hey,

i need some code to tell me in WinXP the name of the user that is currently logged on to the computer.

cheers in advance

Current User Name
Hello,

I'd like to extract the current logged in username (%username%)into a string, then insert it into a specific line in a text file. Any help would be appreciated.

Thanks,
Gabe

Current User For Ado
What is the best way to stop current user update same record. For example I have a record has fname, lname etc. If two user open this record at same time, the first one who update this record won't be saved. That certainly is not what I want. Can anyone help? Thanks

Current User
I have some API code for getting the currently logged on user, but I know I've seen some VB function used to get it in one or two lines of code. Does anybody know how to do this?

Help!!! How Do I Know The Current User??
How can i get the name of the current user logged in windows?? Please reply if you know...
Thanks in advance..

How To Know The Current User
Hello,

Could anyone tell me how to get the current user that is running on NT?

Thanks.

Marco

Current User
how can i get current os user into text box. I mean function. For win98 not connected with database. Only windows users.

Copyright 2005-08 www.BigResource.com, All rights reserved