|
by creating Dataview from dataset u can filter the data
rahul
|
|
|
|
|
You can use select method or you might want to look at dataview class
|
|
|
|
|
hi
we have developed windows application with lots of controls. we are facing the problem with exceeding GDI counts. we tried lot of solution from the net but still the problem exist.
kindly direct us to right path or suggest any solution
prabu
|
|
|
|
|
i think proper disposal of objects can help u out
rahul
|
|
|
|
|
What sort of controls ? Are they on lots of forms ? Do you do any custom painting ? Do you load bitmaps or images anywhere ?
Your GDI count is increasing because you load a resource and do not call Dispose on the object that holds it, so it is never released ( well, it will be eventually ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
we are using lots of usercontrols, and loading it dynamically!
though we dispose the usercontrols gdi count is not decrementing.
thanks for reply.
|
|
|
|
|
hi all,
i write this code to draw line by mouse and the drawline method is in the onPaint() method,this code is working properly but has two problems so is there any other idea to code it
private void mainScreen_MouseMove(object sender, MouseEventArgs e)<br />
{<br />
<br />
if (lineFlag == 1 && !(mLineBeginPnt.IsEmpty) && nextLineFlag == 1)<br />
{<br />
Graphics grfx = this.CreateGraphics();<br />
Pen pen = new Pen(mainScreen.DefaultBackColor, 2);<br />
userInterface.handleMouseMove(grfx, ref lastPntOfLine,<br />
ref lastPntCounter, pen, ref mLineEndPnt, mLineBeginPnt, e.Location);<br />
pen.Dispose();<br />
grfx.Dispose();<br />
Invalidate(drawingFrame);<br />
}<br />
<br />
}<br />
----------------------------------------<br />
public void handleMouseMove(Graphics grfx,ref Point lastPntOfLine,<br />
ref int lastPntCounter, Pen pen, ref Point mLineEndPnt, Point mLineBeginPnt,<br />
Point location)<br />
{<br />
if (lastPntCounter == 0)<br />
{<br />
lastPntOfLine = location;<br />
lastPntCounter++;<br />
}<br />
else<br />
grfx.DrawLine(pen, mLineBeginPnt, lastPntOfLine);<br />
mLineEndPnt = location;<br />
Pen p = new Pen(Color.Black, 2);<br />
grfx.DrawLine(p, mLineBeginPnt, mLineEndPnt);<br />
lastPntOfLine = location;<br />
grfx.Dispose();<br />
pen.Dispose();<br />
p.Dispose();<br />
<br />
}<br />
what i made in this code is that i determine the last line drawen by nouse by getting its begin and end points from line object that i have then draw this line by background color to hide it and draw new line with black color to seen by user
(this code is an alternative for using XOR mode, if any one know how to use it with drawing lines please tell me)
thanks
Generator
-- modified at 4:12 Tuesday 8th May, 2007
|
|
|
|
|
HexaDeveloper wrote: Graphics grfx = this.CreateGraphics();
You don't say what your problems are, but you should NEVER do this, unless you want to draw something that will immediately disappear. As soon as your window is obscured, your line will disappear, you should always draw your lines within the paint event of your form and call Invalidate() to force a paint event.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi ,
my problem is that i donot know how to use XOR mode in drawing line
Generator
|
|
|
|
|
hi 4 all
some problem occured when i try to connect existing file ( help file ) with my application
i hope any one to help me
** open help file from my application without open file dialog
thanxxxxxx
|
|
|
|
|
|
Do you have a help file and want to open it from your application using the appropriate program? If so use System.Diagnostics.Process.Start()
|
|
|
|
|
Dear All,
In vb.net we can give like this for getting illustrator application
appRef = CreateObject("Illustrator.Application")
in C#.net what we can give for getting illustrator application
Thanks in Advance
Dana
|
|
|
|
|
Sorry I cant read vb, it hurts my eyez ..
try
System.Diagnostics.Process.Start("SomeApplication.exe");
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
Dear All,
How can I check wheather an application is intalled or Not
|
|
|
|
|
danasegaranea wrote: Dear All,
you are replying me
danasegaranea wrote: How can I check wheather an application is intalled or Not
installed means ? in what manner ? talking about which application ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I am trying to automate the illustrator.How can I do this (like MSWORD)
-- modified at 3:11 Tuesday 8th May, 2007
|
|
|
|
|
danasegaranea wrote: I am trying to automate the illustrator.How can I do this (like MSWORD)
Sorry dude not understand anything from it
What is illustrator ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Do you know Adobe photoshop.The Illustrator is the another release of Adobe.
No problem.Is there any method avl to autmate the Adobe Photoshop through C#
Thanks
Dana
|
|
|
|
|
danasegaranea wrote: appRef = CreateObject("Illustrator.Application")
This is VB for "create an instance of COM object Illustrator.Application". In order for this code to work you this COM object must be registered on the machine running the code.
You can achieve a similar thing in .NET using COM Interop (search google). If you are using Visual Studio it couldn't be simpler (as VS will generate a COM Interop assembly for you). Right click "references" in your project, goto add new reference. A dialog will popup which should have a "COM" tab. In this tab you should find an entry such as "Illustrator Application Object". Add this as a reference and your project should have access to a namespace like "Illusrator.ApplicationObject" which will have identical properties and methods used in your VB Application.
|
|
|
|
|
Dear J4amieC,
There is no method called CreateObject in C# ?
|
|
|
|
|
That's right. Now, read the rest of what he said - google for COM interoperability. CreateObject uses the registry to identify the locations of the relevant parts of the application that it needs to run with - it then (behind the scenes) calls the CoCreateObject, QueryInterface, other COM initialization routines. .NET provides this for you through Interop - read up on it, because people aren't going to spoonfeed you with the exact answer. You have to do some work for yourself.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
As Pete said, re-read my post.
I forgot one thing and that was to say that once you have added a reference to the right COM object you would use the "new" keyword to create an instance much like creating a normal object in .NET
|
|
|
|
|
Hi All
iam parsing text file into xml output.
when iam parsing textfile iam getting exception is
"Token StartElement in state Epilog would result in an invalid XML document"
why im getting this exception can anyone suggest me.
advancedly thank you for giving suggestions.
Thanks&Regards
RENU
|
|
|
|