|
Hi:
does dotnet/c# offer any smart and automated ways to preserve user preferences in GUIs such as controls users like to have checked or unchecked?
Thanks, smurfy
|
|
|
|
|
smurfy,
Not sure if .net has the ability, but saving control states in a database may be the way to go, depending on how many controls you are working with.
I hope this helps some,
Paul
|
|
|
|
|
VS2005 does. It saves initial values for just about any aspect of a component (control) in a app.config file, and stores user-specific and machine-specific settings in the application data directory in the appropriate profile directory. You can read, write and save settings anywhere in your application.
Mark
|
|
|
|
|
Cool, learned something new today
Paul
|
|
|
|
|
** You can read, write and save settings anywhere in your application.
Ok, in VB.net there's My.Settings, but how about c#, how do I do this in C#?
|
|
|
|
|
With BorderStyle set to Fixed Single, in the Paint method I tried to draw my own border color but the Paint would never get called for ListBox/CheckedListBox. Is there any difference from ListBox/CheckedListBox and other controls. I know that we need to override OnDrawItem , OnMeasureItem to customize the items in the ListBox but how do I change the border color of the ListBox itself?
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
if (this.BorderStyle == BorderStyle.FixedSingle)
System.Windows.Forms.ControlPaint.DrawBorder(e.Graphics, ClientRectangle, _borderColor, ButtonBorderStyle.Solid);
}
Thanks in advance,
VPMahank
|
|
|
|
|
You may have to handle WM_NCPAINT to do this since the border is not part of the client area.
Deus caritas est
|
|
|
|
|
i want a component that convert numeric of digit to alphbet digit
########################
|
|
|
|
|
amin saffari wrote: i want a component that convert numeric of digit to alphbet digit
You forgot the magic word, and could you explain a little more in detail what you are trying to accomplish?
|
|
|
|
|
|
Hi, Has anyone experienced this problem?
by VS2005 C#, i had made class library project contains custom control called "DynamicPanel" inherited from System.Windows.Forms.Panel, this "DynamicPanel" contains some child controls ..
now in my WindowsApplicationProject --> Form1 i'm Draging "DynamicPanel" from the toolbox and all properties was found in PropertyGrid .. but i want to be able to access the properties of any of the child controls in "DynamicPanel" by selecting them ( by clicking on them ) in design time. how can i do that?
I would appreciate your help ...
-- modified at 6:19 Sunday 19th February, 2006
|
|
|
|
|
Hi all,
I am using WMI to create a process in the remote system.But the problem is i cant able to see the UI in the remote system,but i can able to see the process in the task manager..Is there any way to get the User Interface??..PLease help
|
|
|
|
|
You can't do this. For security reasons, WMI can't create an interactive process remotely.
More on this can be found here[^], in the Win32_Process docs.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thank you for the reply sir...Do i have any other way to create an interactive process other than WMI?
|
|
|
|
|
Not an interactive one. The security restriction isn't with WMI, it's with Windows...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am writting a program that connects to an access database, queries employee names, stores these names in an ArrayList, and are added to the comboBox item list. Currently, I have the program querying the database after I change the selectedIndex of the comboBox but the problem is this, dupelicate names are being added to the comboBox which are out of the Array Index (I am using ArrayList.Clear()). The next thing I have tried is having the comboBox items cleared after the Selected Index is changed but this poses a problem, the current selected index is cleared and there is no telling what employee you are looking at. Are there any other solutions to this problem or do I just have to settle with the selected index being cleared?
Thanks in advance,
Patrick
|
|
|
|
|
Your question is an absolute mess. Just try reading it as somebody who does not have any background. First of all, if your program "queries the database on selected index changed", then question that comes to any sane mind is what was in the listbox before the database was queried (what was in it that resulted in selected index changed, and how it had come in the first place?). Next question is after selected index (of whatever), you query the databse - and then what? What happens to your existing combobox data? It all goes away? What kind of combobox is that - you click it and it gets refreshed? (My god!)
No doubt your question was not answered by anybody in so many hours. You are lucky that I logged in after a hard day's work looking for unanswered posts. I mean if you are still waiting for an answer! If you are not, grab a beer buddy...
Koushik Biswas
|
|
|
|
|
After I re-read my post I couldn't agree with you more on how messy it is, so I will try to clear this mess up.
Here's what the program does:
1)opens an access database and gathers employee information such as name, social security number, and a ref number that will be used to link the employee to corresponding images.
2)an arraylist is made and contains of the social security numbers.
3)the names and SSNs are added to the combobox.
4)when a name is selected a listbox fills with the employees documents.
a. when a document name is clicked on it is displayed in a picturebox.
5)when the name is changed in the combobox the whole connectToAccess procedure is run again, queries database, fills datasets/datatables, fills combobox, populates arraylist with SSNs.
you should get the idea now.
The problem is this:
Every time the employee is changed items are added to the combobox that are not indexed in the arraylist, thus adding items that have no index causing the program to crash. A few people I have talked with have said that I should just clear the combobox, which solves the problem above but creates another problem, clear the combobox and you clear the selected employee name, leaving the user of the program no reference to what employee they are looking at. It was also suggested that I create a var and store the selected employee's name in it, while this would work I would rather modify the ConnectToAccess procedure so that I can just read from the datatables I created and never actually query the access database again during the runtime of the program. I can send the code if it is needed.
Patrick
|
|
|
|
|
Hello communitiy,
I'm looking for diagramming software (written in C#) which is performant enough to manage a huge amount of shapes (1 - 50.000 shapes) with an acceptable speed. It should be able to render wihout flickering even while moving hundrets of shapes around or scrolling. Something like Visio but more flexible and faster.
Does anybody know such a software (no matter whether freeware or not)?
Any suggestion is welcome!
|
|
|
|
|
Is this "50" (fifty) or "50,000" (fifty thousand) objects? If latter, then I'd recommend that you draw them first on a separate image object and the load that image on your form. If you cannot, use double-buffering. Graphics are always expensive oeprations. You could always utilize OpenGL, Direct3D but dont have any expertise in this area.
- Malhar
|
|
|
|
|
Hello silverair,
Have you looked at the diagramming tool from Dundas? I don't know what kind of budget you have, but their tools are worth looking into.
Paul
|
|
|
|
|
Can anyone tell me how to create a time delay between my file copy operations or whatever
ie
voidcopy file.....
{
Copy file 1 code
wait 10 seconds < Time Delay
Copy file 2 code
}
Thank you
|
|
|
|
|
Thread.Sleep(milliseconds);
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Using System.Threading;
voidcopy file.....
{
Copy file 1 code
Thread.Sleep(10000);
Copy file 2 code
}
Good luck...
|
|
|
|
|
Hello,
what is the best way of generating PP presentations from code ?
Currently I have a template with textfields where I put the data ...
But in some versions of PP, when I change and save the template, the textfield names are changed and I have to rewrite the code (because i cannot set the textfield name in PP)
Maybe there is a better aproach to this
|
|
|
|