|
Change your last writeline to:
Console.WriteLine("{0} = {1}", tmpproperties[tmppi], tmpproperties[tmppi].GetValue(O));
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Hi,
I was experimenting on the printing functions and found out you can get a lot of information about a printer trough System.Drawing.Printing.PrinterSettings. But I'm missing the minimum margins where the printer can print.
Most printers can't print to the edges of a page. These margins varies for eacht printer. Where can we find this information?
thx.
|
|
|
|
|
mistery22 wrote:
can we find this information?
Check out the Margins[^] class.
-Nick Parker
|
|
|
|
|
thx for the reply...
But the Margins class allow to set margins, but it doesn't get the minimum margins of a printer. What I need is really the margin where a printer can't print.
For example a HP OfficeJet d155 minimum margins are
Left: 0,34 cm
Right: 0,93 cm
Top: 0,00 cm
Bottom: 0,67 cm
How can we get this information in .NET?
thx
|
|
|
|
|
I’m using the MS DataGrid on a form. Each row displays the state of an
instance of a class. When I load this form it creates the collection of
these classes and spawns a maintenance thread that keeps these instances
updated with info scraped from a website. Each class instance has a
reference to the DataTable of the DataGrid and is able to update its own row
in the grid. This works fine. You can sit back and watch this grid
refreshing "in the background" while manipulating other elements of the form.
I ran into problems when I tried to have this thread delete a row from the
grid. Intuitively this makes sense since there is probably a race condition
between the form thread and the maintenance thread where the delete is taking
place. I got around this problem by having the actual grid row deleted on the form thread.
But I'm worried that there might be some hidden race
condition waiting to happen when I do my updates. Any comments would be
greatly appreciated.
Thanks,
Kevin
Here is the error I get when I delete from the Update thread.
=====
An unhandled exception of type 'System.IndexOutOfRangeException'
occurred in system.windows.forms.dll
Additional information: No value at index 2.
=====
Unhandled Exception: System.IndexOutOfRangeException: No value at index 2.
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
at System.Windows.Forms.DataGridRow.PaintHeader(Graphics g, Rectangle
visualBounds, Boolean alignToRight, Boolean rowIsDirty)
at System.Windows.Forms.DataGridRelationshipRow.PaintHeaderInside
(Graphics g, Rectangle bounds, Brush backBr, Boolean alignToRight, Boolean
isDirty)
at System.Windows.Forms.DataGridRelationshipRow.PaintHeader(Graphics g,
Rectangle bounds, Boolean alignToRight, Boolean isDirty)
at System.Windows.Forms.DataGrid.PaintRows(Graphics g, Rectangle&
boundingRect)
at System.Windows.Forms.DataGrid.PaintGrid(Graphics g, Rectangle
gridBounds)
at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,
Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.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.ComponentManager.System.Windows.Forms.UnsafeNativeMethods
+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason,
Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Track9.frmMain.Main()
|
|
|
|
|
For pixel access in C#, which method is faster , using unsafe mode to access and manipulate pixels or writing wrapper and calling Win32 API GDI functions???
In broader terms, which technique is faster, unsafe mode or calling native Win32 APIs?
Thanks
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
Unsafe mode (LockBits). You're getting direct access to the bit data via pointers, which is pretty much as fast as you can get.
"Have a heart that never hardens, a temper that never tires, a touch that never hurts." -- Charles Dickens
FLUID UI Toolkit
|
|
|
|
|
jdunlap wrote:
FLUID UI Toolkit
How about fixing all those broken links on the page (and that horrible menu grafix)?
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
leppie wrote:
How about fixing all those broken links on the page
Fixed! Those 3 pages don't even exist anymore, so I removed the links.
leppie wrote:
(and that horrible menu grafix)?
Which one? The one above the sidebar?
"To know what is right and not do it is the worst cowardice." -- Confucius
FLUID UI Toolkit
|
|
|
|
|
jdunlap wrote:
Which one? The one above the sidebar?
2 words: Anti-Aliasing
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
leppie wrote:
2 words: Anti-Aliasing
Yes, I know... that needs to be done. My problem is that the background of the image was white before I added transparency, so the antialiasing that was done was lighter than everything else, instead of darker. I'll fix that.
""It is impossible to rightly govern the world without God and the Bible." -- George Washington
FLUID UI Toolkit
|
|
|
|
|
Haha, it's pretty bad when the UI on the website for a UI toolkit is crappy. Makes you wonder... (Just kidding...I'm sure FLUID will be great )
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
That really is a concern though. I've waited far too long to do some changes that I had noticed earlier, because I was focusing on the project itself and the functional aspects of the site (which aren't complete yet). Since two of my main team members are away at present, I think I'm going to be working on improving the site this week.
"Blessed are the peacemakers, for they shall be called sons of God." -- Jesus
FLUID UI Toolkit
|
|
|
|
|
Take a look at it now. I still need to fix the edges of the big logo, and I'm also going to make the chevron look nicer. The one I have is a bit strange.
"Don't judge each day by the harvest you reap, but by the seeds you plant." -- Robert Louis Stevenson
FLUID UI Toolkit
|
|
|
|
|
jdunlap,
do u hold the fluid UI project?
regards,
jim
|
|
|
|
|
zecodela wrote:
do u hold the fluid UI project?
Yes, I am the project lead.
|
|
|
|
|
I use the bitmap class, with the pixels property.... But I think the windows api code is better
Greetings....
|
|
|
|
|
Is there any control in C# which similar like Outlook time schedule table or GravityBox control in VB 6 ?
I want to visualise a group of appointment.
An idea or link to source code are welcome.
Thx for your sharing, I will put your credit in my software.
"Courage choose who will follow, Fate choose who will lead" - Lord Gunner, Septerra Core
|
|
|
|
|
I see you can set the focus to a control with controlname.focus for a Window form, but I don't see how you can do this for a webform. Anyone have any ideas?
Thanks,
Glenn
|
|
|
|
|
IIRC you have to use client-side Javascript, which you can generate on-the-fly if necessary.
"Don't judge each day by the harvest you reap, but by the seeds you plant." -- Robert Louis Stevenson
FLUID UI Toolkit
|
|
|
|
|
Hi,
I like to bind a collection to a listview-control.
So the listview-control must behave like a datagrid.
Is there somebody who has some code (C#) to do that or to extends the listview-control?
Thanks,
Bom
|
|
|
|
|
Hi there:
Im going to insert an Image into MS-SQL Server 2000, could anyone give me a sample!
I use the code that I've useing for other tables but I guess I need something more for inserting Images to Database!
Bye the way Im using DataSet & DataAdapter.
Any help is appreciated.
Always ,
Hovik Melkomian.
|
|
|
|
|
|
Im really thankfull for ur help & fast reply!!!
please give me time to see that, I hope I can find my answer there.
Always,
Hovik.
|
|
|
|
|
u helped much dear! tnx;)
Always,
Hovik.
|
|
|
|