|
Take a look at this[^] then check if the click is inside the pdf control.
Hope this helps
|
|
|
|
|
While this can tell me everything about the mouseclick, i can't find how it will tell me anything about a button being pressed... There's no way for a mouseevent itself to convey what button was pressed. It seems that the original problem of not being able to identify a button in a PDF is the problem... Maybe I should repost the question in that manner...My subject title is misleading now that i know more about the subject. Thank you for the reference to this tool though. I can see it being useful for me in the future.
jpc
|
|
|
|
|
Hi
How to convert System.Type to Form ?
i wrote this code :
FormsCollection forms = new FormsCollection();
foreach(Type t in types)
{
if (t.BaseType == typeof(Form))
{
Form frm = (Form)t;
forms.Add(frm);
}
}
but, the following error message display :
Cannot convert type 'System.Type' to 'System.Windows.Forms.Form'
How to solve this problem ?
Thanks
|
|
|
|
|
I don't understand what it is you are trying to do (what is types?) but you could consider if (t is Form) forms.Add(t as Form);
|
|
|
|
|
You will need to instanciate a new Form in your if block, a Type is a Type, not an object so it can't be cast.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
DaveyM69 wrote: a Type is a Type, not an object so it can't be cast.
Type is an object (System.Type[^]), just not an object of type Form.
|
|
|
|
|
A Type describes the class (or enum, or whatever). It is not the class itself. You need to use Activator.CreateInstance in order to get the actual class
|
|
|
|
|
Hi guys!
I'm new to network programming so i'm sorry if this question is a little noobish. I started using the WebBrowser Control in c# and so far it has done my purpose. But I want to know if there is a way to utilize this same control (so I won't change my code) without the visual display. Is it possible to "hide" the control but letting it stay active? Or is there a usable base class where the WebBrowser inherits its properties and methods?
Thank you guys!
|
|
|
|
|
You could try setting the Visible property to false. You could instantiate it, but not add it to the Controls collection. If you wanted to, you could even use a HttpWebRequest to get a webpage's source
|
|
|
|
|
My first intuition was to set the visibility to false, but then it turns out that doing so disables the whole control and thus the rest of my code wont work. What do you mean by "You could instantiate it, but not add it to the Controls collection"?
Btw, I tried to instantiate it instead of adding it the control from the designer by the code: webBrowser webBrowser1 = new webBrowser(); However, it didn't work in this manner. I also can't seem to find a property that would let it not display.
I also have a code using HttpWebRequest and HttpWebResponse, but its a lot longer and I don't know how to send multiple posts and how to activate a button click...
|
|
|
|
|
I got it, there was this code: this.Controls.Add(this.webBrowser1) that adds the control to the windows form, All I had to do is comment it out.
Thanks for the help!
|
|
|
|
|
Hi,
I would like to know if I can include a progress bar when I'm trying to copy files from one location to another with :
1. The file count unknown to me.
2. The size of each file is unknown to me.
For the above conditions, I'm able to get the normal progress bar which shows progress between the starting and final positions repeatedly.
The question is whether I can use a progress bar that shows the overall progress, just like the windows file copy progress bar...
Can anyone help me on this?
Thanks in advance,
ramzg
|
|
|
|
|
if you don't have the numeric information, you can't show progress information, all you can do is indicate it is still busy.
so figure out what you mean by progress, and once you know how to do it by hand, you can create some code that does the same.
|
|
|
|
|
Hi Luc Pattyn,
Thanks for the reply.. Ya, it is not possible to show progress information here... But I forgot to include this in my question... Would I be able to get the animation that windows uses (with a transparent background, so that I can place it on my form) to indicate that the files are being copied? Or do I have to create my own animation?
Thanks,
ramzg
|
|
|
|
|
|
ramzg wrote:
I would like to know if I can include a progress bar when I'm trying to copy files from one location to another with :
1. The file count unknown to me.
2. The size of each file is unknown to me.
For the above conditions,
If you know the source of file the what is problem with counting file or File Size.
ramzg wrote: The question is whether I can use a progress bar that shows the overall progress, just like the windows file copy progress bar...
Use BackgroundWorker to show step by step process. Ref
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi,
i want to call explicitly picturebox_paint(object sender,painteventargs e) event on the buttun_click event,how we can call this method on button click,because paint event is automaticlly call on formload and i also want to use paint method parameter on the time of calling...
plz suggest me best method for that.
thanks in advance...............
|
|
|
|
|
picturebox.Refresh() should do
|
|
|
|
|
please how can i load rgb image data to array and then print it to screen from array using c#
i appriciate your reply
thank you
|
|
|
|
|
That seems like an odd thing to do.. But well, you could make an uint[] and use LockBits on a Bitmap and fill the array using unsafe code, then make a new Bitmap use LockBits again and then write the pixels back (unsafe code) to the new bitmap and then display the bitmap. Why? Because you asked.
Alternatively you could fill the array of uint s with whatever else you want.
|
|
|
|
|
I'm new to C#.
I am using WebBrowser control in a form. I have a 'Back' button on the toolbar. I would like to disable the button based on 'webBrowser.CanGoBack' property. However, when browsing, I do not know when someone has clicked a link to a new page and I do not know how to create an asyncronous callback to check the property (other than using a timer; which I don't want to do). MFC C++ has MS custom WM_KICKIDLE message which could be used for such things. Can someone suggest a preferred method to do this?
thanks.
|
|
|
|
|
Sorry all. I figured out how to do it.
Thanks
|
|
|
|
|
Hi All,
There is an interesting Article "Nav Autoupdate with c#" under Library section
Link:
http://www.codeproject.com/KB/library/AutoupateNAV.aspx
Thanks
|
|
|
|
|
Please, stop spamming the board. Your article is very good, but you don't do it any justice by posting about it every four hours or so
|
|
|
|
|
Makes me think of the "hey I found this site.." posts spam on usenet - that is not a good thing
|
|
|
|