A user places the cursor in a table cell and clicks on "Table > Background Color" to edit the current background colour.Currently I have been able to detect the current colour (for instance a light blue) and set that colour in the ColorDialog (Colour swatches are correct and RGB values are correct).What I would like to do is enable the user to click on the "Add to Custom Colors" to save the colour. Problem is, it sets the first square in the custom colours area (which happens to already be filled in with another custom colour), rather than finding the next square that is white and set it there instead.
i am trying to set one of the custom colors of the colordialog to be the current background color of the form. i am doing it like this: ColorDialog1.CustomColors(0) = Form1.BackColor.ToArgb it is not working. note that i only need a specific element to contain the color. not necessarily 0, but perhaps 9 or 15
I am making a program with 2 players and I want both of them be able to select their color somehow. I know there is a ColorDialog tool but I dont know how to use it, does anyone know how to make a color selection box?
If you are working on a project that requires non-standard colours for text, it is possible to choose your colour by specifying the RGB components in the boxes on the colorpicker or by moving the mouse around until the desired colour is obtained. This can be put into one of the custom colour boxes and used until the program is shut down. Is it possible to save that colour to the custom colour box so that the next time the project is run, the chosen non-standard colour re-appears in the custom colour box?
I want to be able to isolate an area of my desktop (similar to a screen capture snip) and evaluate if it is changing. In this particalr case it is an appliacation I have (not mine) that flashes an icon upon completion
What I want to do is make a small app that will detect change when I am away and perhaps perform a specific action (the action is not relevant really - i can take care of that) Again,this is NOT hugely important, but if someone has an idea or has seen an app that does this, it would be useful for me...
I put this in the VB.NET forum because I write 75% of my code in VB.... so I chose this instead of a general area !!
Im developing a web browser and i got an idea of changing the background color of the form 1 so i made a form 2. created 1 combobox and 1 button. The idea was to change color of background and then when i start the program after closing it it will remember what color and start up same color as before? Here is what i did but it doesnt work:
I have a array of pixels. And I would like to Quantize them.
FF00FF,00FFFF stuff like that, but most are custom colors and are not a standard 256 color palette. So I need code to convert a color to a 256 color. I dont have any idea on how to do this, but thats why I came here. I do not want to use System.Graphics.Image.Palette or anything like that as this project uses arrays for images. I would like to if at all possible be able to convert a R, G, B color to 8bit, 16bit, 256bit and possibly use the HSL or NeuQuant method or something close to that, or maybe even some other methods of doing it. I do need to be able to do this for a single pixel, but I will also need a method for a array of them.
I am rewritting my application to conform to ms standards. We used to save all settings to registry for user settings, servername, size and locations.so we are now saving them into My.Settings app.config the only problem is that each time there is an update clickonce will isntall the newupdate but now all settings are loist and user has to save everything all over again..
I am trying to follow the book here but it seems i keep getting stuck somewhere. registry has worked fine for years but i understand we must move on, but if stuff like this happens then i just wasted a long time converting all code to conform for it to not work..
I have a question of VB event handler and color picker. Now I have a label, and I want when user click it, it pops up a color picker dialog and let user to change the background color of the label. Not sure how to implement this, can anyone give me a direction?
I want the background of my form to be the same color as the window frame color that the user selects, even if that changes. I selected System->WindowFrame as my background color, but it always remains a dark grey, regardless of what I have my window color set to. How else would I achieve what I want? I assumed I was doing it the correct way. Do I actually need code that gets the system window color and then apply it?
how to reset user settings in My.Settings to the default value, because when i checked if the user settings works i have altered the settings so now i want the settings to go back to default, because i am going to distribute the software.
Within the application, I need to have two levels of access: Standard User and Power User,for example.These two levels can have the same access level within Windows.It is not my intention to elevate to administratoWhat is needed, is a way to have two different groups of users.ne group will be able to run the application while a second group has access to additional features within the application but not within the windows environment It is my hope that there will be two user account types: 1) Standard User and 2) some other user type such as Power User or something else that will distinguish it from Standard User
Recently while I was playing with VS 2008(VB), I have created an application for folder sync purpose... which is working fine. Then, I have created a windows service that does the same thing and it is also working fine(from application perspective). But, I have been trying to add some additional functionality to that new service. It keeps on running as long as System is ON.
But I would like to change the functionality to... as soon as user logs off Service should STOP, and should START when user logs into that PC. I tried to find some useful info online(related to my task) and all I could come up with was to add OnSessionChange(...) method to the service. But for some reason it is not working out for me(when I've logged off or other system events such as 'system lock').
After running the following code (which locks the computer), what code must I be applying to see if the user has successfully logged into the computer and that "Lock Screen" I'd so called has disappeared?
Private Declare Function LockWorkStation Lib "user32.dll" () As Long Private Function LockComputer() LockWorkStation() End Function
I will call "LockComputer", after that what do I do to see if the Lock screen so called by this function (after say 2 minutes) has disappeared or is still there asking for the password from the user.
I have a Windows vb.net project that does an occasional "auto refresh" based on a 20 minute timer. I want to avoid any type of auto-refresh... if the user has manually had any interaction with the program (mouse move, click, keystroke, anything) in the past 5 minutes.
I added a global variable "Dim g_LastActivity As Date" so the timer can detect that 5 minute mark.
Is there some place to put my "g_LastActivity = NOW" line that will ensure it will happen during ANY user activity? All mouse clicks, on all buttons, all mouse moves, anywhere, all keystrokes, basically EVERYTHING.
I am attempting to create an application in an attempt so it could be run as the user and preserve individual settings, by this what i am trying to achieve is when the application is installed, it is installed once but each user has their own settings saved within their own profile - a bit like Office applications. How could i start with this?
I'm trying to save a collection of key/value settings in my application's "user settings" (they're column widths), but while I see no errors, when I run the code (in the IDE) my collection in "My.Settings" is always nothing at startup. I do a "My.Settings.Save" when the application exits, and barring the "serializers not found" errors in the IDE, no other errors occur. When I run my application as an exe, it behaves the same way..
When I go to settings in my application/Program and on the form I have a ColorDialog1 want to to save the back color from the ColorDialog1 That I have chosen. And in my settings I have (Name: BackColor, Type: System.Drawing.Color, Scope: User)
I have a custom settings class which I use for Machine Wide Application Settings and save as a file. I use a custom file instead of the visual studio settings config because Int the settings to be machine scope or application scope which are normally unusable as they are readonly.I dont want the settings to be user scoped.
Imports System.Xml.Serialization Namespace My Public NotInheritable Class MySystemSettings
I have a Visual Basic .Net 2.0 program. I'm moving the settings from an older settings file, to an app.config program settings file. I'm trying to do this as nicely as possible.
So, I added my setting as shown in this image.
On load I do this:
If My.Settings.databaseConnectionSettings Is Nothing Then My.Settings.databaseConnectionSettings = New ArrayList() End If
So, the question is, how do I get that arraylist of my DatabaseConnectionSettings saved to persistent storage? I want to do this in the cleanest way possible. That is, I don't want to have to convert it to a string or save it to a separate file every-time I want to use it. I would like to be able to use the My.Settings accessor method.
I want to save a Custom DateTimePicker.Value in my Application Settings. The custom format is : dd/MM/yyyy hh:mm:ss, instead of dd/MM/yyyy The field i've created in the application settings parameters is LASTSAVE (DATE / APPLICATION)
When I try to link in the ApplicationSettings/PropertyBinding ... VALUE with my field LASTSAVE, i have an error :
The Value '01/01/0001 00:00:00' is not valid for 'Value'. 'Value' mustbe ... 'MinDate' et 'MaxDate'.
Name of the parameter : Value
I then entered the MIN and MAX date in the properties of my control DATETIMEPICKER. I have also put into the properties Value a start date like 23/11/2011 12:00:00 ;
However, when i retry to link in the ApplicationSettings/PropertyBinding ... value to LASTSAVE / I have the same error (The Value '01/01/0001 00:00:00' is not valid for 'Value'. ). I've saved all, do a process that put a value in the datetimepicker.value, but it's not saved, cause not linked.
In Visual Studio 2005 or 2008, when adding any User Controls to a Windows Form or other User Control in a Project that implements and is using a custom settings provider, a "Failed to create component" error is displayed. If all references to the custom settings provider are removed from settings.settings and that file is saved then User Controls can be added to Windows Forms and User Controls. However, if the custom settings provider is referenced again in settings.settings, then opening the designer of a Form/Control which includes a User Control results in a "One or more errors encountered while loading the designer..." error message.
I have had a very difficult time in tracking down the root cause of this issue because I assumed it had to do with my code and not the IDE. I am working within the context of a large project which uses User Controls heavily and have written a custom settings provider to persist user settings to a SQL Express database. This settings provider works properly, however if I want to open any Forms or User Controls in designer view I must first manually remove all references to my custom settings provider in setting.settings and then re-add them after the changes are done which is inconvenient to say the least. This problem is not present if the Project is in C#.
(using VB.Net 2008) I am trying to save one of my custom types to the application settings. I've read a variety of opinions on the internet about whether this possible.
When creating an app setting, none of my types appear when browsing. However, previously I needed to save off one of my datasets, and it worked simply by hand-entering it as the setting type (ie, I just typed "MyProjectName.DatasetName"). However, when I try the same trick with another custom type that isn't a dataset, I get a "type was not found" error. So I'm a little confused, can the program "find" some custom types and not others?
I was just wondering what is the Quickest way to set up custom settings, every software has settings that are created and saved, Example a Hotel Software has rooms, roomtypes etc that are used in combination with other things, an Accounting software has Account type, Employee Software will have Full time,Parttime, or anything else, An Employee time Clock would have departments, Tax Brackets.
I would like to be able to specify exactly where the My.Settings file gets saved. It bugs me how it gets saved off in the middle of appsettings nowhere, and I would prefer it gets saved where the executable is. If anyone knows how to do this, that would be great. (P.S; I'm using VB.Net.)