|
Hi, friends! I want to do a graphic toolbar , but how could I do a rebar ? thx!
|
|
|
|
|
I have a plugin that exists as an API for Acrobat. This plugin converts PDF's to HTML. I need to access this plugin to automate the process of conversion in my application. Can anybody help me with this??
Cheers,
slnarasimhan
|
|
|
|
|
Is this API available as a DLL or a COM Control.
If its a DLL and exposes the API as a exported function, you can try through P/Invoke to perform the conversion, if its a COM object, add to your project as reference and call the functions through the proxy class generated to visual studio.net.
Cheers,
Kannan
|
|
|
|
|
You can use System.Runtime.InteropServices to call Native Code
from C#/.net
See PInvoke in MSDN.
Deepak Khajuria<pre>
|
|
|
|
|
Thanks ppl but the main problem is i don't know where this API resides(in which DLL). All i know is that it is a plug in available for the Acrobat.
Thanks,
SLN
|
|
|
|
|
If it is exported function, then you can use Depends utilty ( comes with visual Studio ) to find out which dll exports it.
Otherwise if it is a COM API, there is no need to find out, just import in into the project.
Deepak Khajuria<pre>
|
|
|
|
|
It is definitely not a COM api... I am searching for the depends utility.. Wld be great if you cld tell me where to find this utility.
I tried dllimport with a dll called plugin.dll.. thought this wld contain my required api.. but i am not able to define the entry point to this...
Regards
Laks
|
|
|
|
|
|
Thanks Deepak. I tried it out with depends but could find out nothing definitive. Almost all the DLL's appear on the depends tree for this API.
However i found an entrypoint to a function within the api.I shall try to call this function somehow but i dont know anything about this, the parameters etc.. is there a tool to view this information too???
Moreover 'depends' highlights this api's subsystem as GUI so i don't know if i could really use it for my purpose. Thanks anyway i have definitely learnt a lot.
Regards,
laks
Yours Truly
SLNarasimhan
|
|
|
|
|
Hi,
This was what i found out. I tried to import the API and call the function, but i get a System.FormsException on returning from the function. And nothing happens on the function call.
Regards,
Laks
|
|
|
|
|
I'm developing a C#/WinForms application which features a desktop control (Panel) that contains child controls (also Panels). The child controls may contain Buttons.
Sometimes I need to draw arrows between a Button in one child control to a Button in another child control. This arrow drawing is handled by the desktop control's OnPaint method. In the current implementation, the arrows are behind all of the desktop control's child controls. What I would prefer, though, is for the arrows to be drawn in front of the child controls, i.e. above or on the child controls.
How can I do this? Do I have to trap for something in desktop's WndProc, and then paint the arrows after Control.WndProc handles it? Would that work? Is there a better way?
|
|
|
|
|
Sounds like just the arrow paint is happening before the children control's OnPaint().
I think you can fix it by modifying the order in which the OnPaint() handler's occur.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Hmm, that's what I thought...
I had:
<br />
protected override void OnPaint(PaintEventArgs pe)<br />
{<br />
base.OnPaint(pe);<br />
<br />
}<br />
But that didn't work. Any other ideas?
|
|
|
|
|
Hi there,
I met the same problem as yours, would you please give me some suggestions?
thanks.
|
|
|
|
|
How can i create a Xor Pen.
|
|
|
|
|
dichen wrote:
How can i create a Xor Pen.
I don't beleive this is directly available in GDI+.
-Nick Parker
|
|
|
|
|
You could consider using System.Windows.Forms.ControlPaint.DrawReversibleLine(), or look into importing SetROP2() and using that. There's an article on CodeProject for the latter.
|
|
|
|
|
GDI+ does not support raster ops. What are you needing an XOR pen for, BTW?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I have a override of the Panel control where I draw a dotted-line grid in it. But the painting is really slow whenever the control needs to redraw.
This is the paint code:
protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
if (ShowGrid && !this.DesignMode)
{
this.SuspendLayout();
Graphics g = pe.Graphics;
Pen pen = new Pen(Color.Black, 1);
pen.DashStyle = DashStyle.Dot;
Point p1 = new Point(0,0);
Point p2 = new Point(0,0);
for (int x = BorderSize.Width; x < this.Size.Width - BorderSize.Width; x += GridSize.Width)
{
p1.X = x; p1.Y = BorderSize.Height;
p2.X = x; p2.Y = this.Size.Height - BorderSize.Height;
g.DrawLine(pen, p1, p2);
}
for (int y = BorderSize.Height; y < this.Size.Height - BorderSize.Height; y += GridSize.Height)
{
p1.X = BorderSize.Width; p1.Y = y;
p2.X = this.Size.Width - BorderSize.Width; p2.Y = y;
g.DrawLine(pen, p1, p2);
}
this.ResumeLayout();
}
}
|
|
|
|
|
Have you tried using ControlPaint.DrawGrid ?
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
ah thats much better. thanks.
|
|
|
|
|
Hi,
I would like to make a custom form class in c# (think Winamp). I am not sure where to begin; how low in the class hierarchy should i inherit to override the windows container?
I haven't found any attempts at this yet, but any direction to such would also be great!
|
|
|
|
|
I think Terrarium[^] will be a good start.
Cheers,
Kannan
|
|
|
|
|
Not sure what I did but the form controls in the Toolbox have dissapeared. The only remaining control is the pointer.
I am using Visual c#.net.... 2003 edition.
Does anyone know how to correct this ???
Thanks,
Ken
|
|
|
|
|
ken-l1 wrote:
Does anyone know how to correct this ???
Make sure you have a design surface active
<a TITLE="See my user info" href=http:
|
|
|
|