|
Unfortunately, the good people who designed this application in all their wisdom thought it would be better to just set the colors from the designer. So no, I just have a bunch rgb values in doc file defining what colors should be used where.
Standards are great! Everybody should have one!
|
|
|
|
|
in windows XP:
Control Panel -> Accessibility Options -> Display (tab) -> Use High Contrast (Tick box)
Simon
|
|
|
|
|
Thanks, but that's not really what I meant, I just wanted to set high contrast colors for a single app. Besides, I'm not using the default system color panel, so this won't work with my application.
Standards are great! Everybody should have one!
|
|
|
|
|
Bekjong wrote: I just wanted to set high contrast colors for a single app
Oh, in that case, I don't think there is a easy setting you can change.
Bekjong wrote: I'm not using the default system color panel, so this won't work with my application.
Double ohh, Now there defiantly isn't a setting for it.
It is winforms or wpf?
Simon
|
|
|
|
|
It's Forms. Thanks again.
Standards are great! Everybody should have one!
|
|
|
|
|
You could look into the possibility of writing a custom control, that took the colour beneath each point in the surface, and inverted it. Effectively acting like a inversion filter, so you'd just display the control over the top of each of the apps form.
Not sure how easy/hard this would be, or even if possible.
Simon
|
|
|
|
|
I don't think it will work by putting new controls over old ones, but you did bring me to an idea:
I could use reflection to find all controls in my app, then find each field of type Color and invert it. That might do the trick. Think it will work?
Thanks for the inspiration.
Standards are great! Everybody should have one!
|
|
|
|
|
Yeah, that sounds like a pretty good idea. Nice one.
Simon
|
|
|
|
|
While this solution definitely isn't foolproof, you can still change the control colors at runtime by using code like this:
this.BackColor = Color.DarkGray;
this.ForeColor = Color.White;
foreach (Control c in this.Controls)
{
c.BackColor = Color.DarkGray;
c.ForeColor = Color.White;
}
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Yep, I realize that, but as I said, that will be loads and loads of work for this app.
Standards are great! Everybody should have one!
|
|
|
|
|
Bekjong wrote: Yep, I realize that, but as I said, that will be loads and loads of work for this app.
0) You're paid to work, though, right?
1) You must have had an idea that this requirement would come up. It's ultimately you're fault there's "so much work" involved in the change.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
0) Yes. Fortunately, there is more work to do. If this is something I can fix for this specific customer quickly I'll do it. If not, that's just a shame for this customer, who already bought product knowing this isn't a feature. Trying to fix it for the guy is just a matter of service. My employers won't make any money on it, they will if I work on something else.
1) No and no. You're assuming I wrote all this software myself and you're assuming this would be a reasonable software requirement for this product, which could hardly be less false. Please stop assuming.
Standards are great! Everybody should have one!
|
|
|
|
|
HI Friends,
I have a requirement to combine two xml files having different schemas to produce one xml file .Plz find the xml structures below:
The input XML is in the form
<EMPLOYEE>
<EMPFNAME>ANIL</EMPFNAME>
<EMPLNAME>JOSHI</EMPLNAME>
<EMPCODE>213</EMPCODE>
<MANAGEREMPCODE>211</MANAGEREMPCODE>
<SALARY>5000</SALARY>
<DEPT>FINANCE</DEPT>
</EMPLOYEE>
Assume that for each Employee in the company there is a XML of the structure above lying in a source folder.We have to read all the XMLs and create a single XML of the structure as below.
<COMPANY>
<DEPT NAME='FINANCE'>
<MANAGER>AJIT MAHUT</MANAGER>
<EMPLOYEE>ANIL JOSHI</EMPLOYEE
<EMPLOYEE>SRIKANTH SINGH</EMPLOYEE>
<EMPLOYEE>KAMAL ADNAN/EMPLOYEE
</DEPT>
<DEPT NAME='MIS'>
<MANAGER>SAM PITRODA</MANAGER>
<EMPLOYEE>ANIL KAPOOR</EMPLOYEE>
<EMPLOYEE>MANGAL PANDEY</EMPLOYEE>
<EMPLOYEE>R MADHAVAN</EMPLOYEE>
</DEPT>
</COMPANY>
How will I do this? How can we do this using ADO.net ?
Plz direct me.
Regards
A Sunil
|
|
|
|
|
please let me know how to get the keyboard cursor position in c#.net????
I want to give a feature like when the user enter data ;i want to create a popup window underneath the position where the last key has been typed.
Using the cursor class in .NET i get only the mouse cursors x and y posistions,but not the current keyboard focus posistion.
Is there any way to retrive the keyboard blink cursor pos?
Thanks
prasanth.k
|
|
|
|
|
Look for the GetCaretPos() WinAPI function.
Best regards,
Jaime.
|
|
|
|
|
Hello. I m stuck with a problem of graph at the end.
I downloaded a source to create a graph in VS 2005. When I run the source it works fine..
There are two ListBoxes in that source, 1st (ul_lbx_DataKey) containing String and 2nd(ul_lbx_DataValue) containing, Float as well as INT...
I want to add data on those listbox from my SQL Server through ADO.NET ... I can add those successfully, but unfortunately, when i click on SHOW GRAPH button, Error Throws..
*There are two listbox 1 and listbox 2
*Datakey = listbox 1 ,, value == listbox2
*No problem in ListBox 1
*Problem in listbox 2.
*When I add STRING item in listbox2, It throws and INCORRECT FORMAT error ////////// --- According to programming this is correct.
*When I add INT item in listbox2, NO error ////////// --- According to programming this is correct.
*When I add FLOAT item in listbox2, NO error ////////// --- According to programming this is correct.
*In database, I changed the datatype of the column binded in listbox 2 .. First I did varchar == ERROR // According to problem, this is correct
*Second, int == Throws Error /// This is WRONG.
*Third FLOAT == Throws Error // This is wrong either.
----------------------------
System.FormatException was unhandled
Message="Input string was not in a correct format."
Source="mscorlib"
StackTrace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Single.Parse(String s, NumberStyles style, NumberFormatInfo info)
at System.Single.Parse(String s)
at GraphV1.Form1.ui_btn_Show_Click(Object sender, EventArgs e) in C:\Documents and Settings\nt_virus - Dell\Desktop\temp\GraphV\GraphV1\GraphV1\Form1.cs:line 46
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at GraphV1.Program.Main() in C:\Documents and Settings\nt_virus - Dell\Desktop\temp\GraphV\GraphV1\GraphV1\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
---------------------------------------------
I would be very glad, if you will please solve this problem for me.. I wasted my 2 days in it...
Please download the source of that graph from here -- http://is.gd/1dT1
Also, please download my modified graph source from here -- http://is.gd/1dT8
If needed, my small database for test purpose from here -- http://is.gd/1dTc
|
|
|
|
|
|
Point[] points = (Point[])list.ToArray(typeof(Point));
If you can use .NET 2.0 and higher, then I suggest replacing ArrayList by the typesafe List<T> class, like this:
List<Point> list = new List<Point>();
list.Add(new Point(0, 0));
Point[] points = list.ToArray();
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Get a Graphics object from the image, then you can draw with the graphics object:
Graphics g = Graphics.FromImage(pictureBox1.Image);
g.DrawXXX();
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thank's for your Help. Its working.
|
|
|
|
|
Hi
Can a UserControl be used in a Column headercell? What I would like to try is create a UserControl containing a label and a NumericUpDown control. This I would then like to use in the HeaderCells of the columns.
Can anyone point me in the right direction please.
Thanks.
Kobus
|
|
|
|
|
If you apply correct padding in the header cell, you place the header text anywhere in the cell. Then probably you can make a NumericUpDown control at the desired location in the cellpaint event.
I havent tried this so not sure if it would work.
|
|
|
|
|
dsProductTableAdapters.productTableAdapter pa = new EBMS.dsProductTableAdapters.productTableAdapter();
int result = pa.InsertQuery(tbxProductName.Text,tbxDesc.Text,Convert.ToInt32(tbxModelNumber.Text),Convert.ToDecimal(tbxMSRP.Text),Convert.ToDecimal(tbxRetailPrice.Text),1,0,1);
the int results return 1. which shows its successfully insert. but inside my access database file does not show the new row..
how do i commit the changes
|
|
|
|
|
Hi,
my application runs some code in each interval.
There the first line looks like int sec = Settings.Default.Intervall;
in my case, the interval setting doesn't change and holds a value of 20, so every 20 seconds Settings.Default.Intervall; is accessed.
the problem is, that sometimes an exception occurs. this happens once a week or so. any idea what the point could be?
FATAL 02.08.08 06:07:52 [ thrCounter]: Ein unbehandelter Fehler ist aufgetreten (sender: Name:Umm.exe
There are no context policies.
, exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at System.Configuration.SettingsPropertyValueCollection.get_Item(String name)
at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
at Umm.Properties.Settings.get_Intervall() in D:\VSSTools\Umm\Entwicklung\Properties\Settings.Designer.cs:line 31
at Umm.App.Controler.runIntervallWaiting() in D:\VSSTools\Umm\Entwicklung\App\Controler.cs:line 213
|
|
|
|
|