|
Hi,
I want to capture url chages in IE browser using a c# application. Can you tell me a method to capture it?
Thanks !
jayasshc
|
|
|
|
|
uow... it seems very complicated. what are you trying to do? why? doesn`t exist another aproach?
obs.: are you using ASP.NET (in yout page, if exists) or just writing a plain C# app?
|
|
|
|
|
Hello
Well, you can't do that directly using C# only. You'd have to make API calls. Two suggestions:
1- Track changes in the Windows Title of the IE window. Once It chanages the URL would have changed. This will give you the title of the page, but not its URL.
2- Capture the handle of the Address edit control, and get it's text periodically -eg. each second or so-. This will give you more percise tracking of thepage's url, but of course this is much harder.
Regards
|
|
|
|
|
Thanks
I prefer the first solution Could you pls give me a sample code line. I tried to find an exaple, but could not.
Thanks !
jayasshc
|
|
|
|
|
Hello
Well, here is an article about exactly what you want:
Click Here[^]
Regards
|
|
|
|
|
Thanks Nader,
Best Regards!
Charith
jayasshc
|
|
|
|
|
If I have a WinForms application, and I want to store an image in the project, but
- I don't want to bloat the executable (imbed the image there)
- I don't want the image to be an external file (for safety, so other programs can't easily change it)
What are my best other options?
|
|
|
|
|
Maybe, if you add the image as a resource (in a resource.resx file) in another project (other than your executable project) and then compile it as a dll. Thus, your executable project would call whatever you want from this dll.
I don`t know exactly if this works, but give a try.
good luck
|
|
|
|
|
Hello
Beside what has been said, another way is to aggregate several images in a file -call it for example .isf-. Make a project called "Image Packager" for exaple to store these images knowing exactly their sizes by bytes. Now in your main project you can access them by their Filename:Byte location. Read each image in a filestream, then use this stream to make a bitmap object.
PS.
One simple trick is to store them in different names only without aggregation. Like renaming "MyImage.bmp" to "Rfgh.dat". no one will know this is an image file. Stupid, but sometimes works!!;P
Regards
|
|
|
|
|
Hello,
I have the following method to help me in installing some COM
components onto the machine...below is a snippet that is causing the
problem...
Type objType = null; <br />
COMAdminCatalog objCatalog = null; <br />
COMAdminCatalogCollection objApplicationsColl = null; <br />
COMAdminCatalogObject objApp = null; <br />
try <br />
{ <br />
objType = <br />
Type.GetTypeFromProgID("COMAdmin.COMAdminCatalog"); <br />
objCatalog = <br />
(COMAdminCatalog)(System.Activator.CreateInstance(objType));
It is part of setup application...so when I run the setup on my
machine, it works fine....
However, when I try to test it on one of our servers.....I get a
Specified Cast is Invalid exception from this line objCatalog =
(COMAdminCatalog)(System.Activator.CreateInstance(objType));
I am guessing its a problem with either one of the last two
line....forgive me, im new to COM
Thanks in advance
|
|
|
|
|
Hi!
Did you verify that objType is correct on the server?
Is the COM class registered correctly on the server?
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
i make ContextMenuStrip
i add four ToolStripMenuItem in ContextMenuStrip
now on run time i want to make for loop to list all ToolStripMenuItem in the ContextMenuStrip
foreach (Control c in this.Controls)
{
if (c.GetType() == typeof(ContextMenuStrip))
{
foreach( Control m in c.Controls )
if ( (c).Name.Substring(3).Equals(cellid.ToString()) )
{
(c).Enabled = boolenvalue;
}
}
}
the problem now there is nooo thing name {{ c.Controls }}
Palestine
|
|
|
|
|
what i can do ??
Palestine
|
|
|
|
|
ContextMenuStrip has specific purpose and capability. What is your purpose of using it?
Best,
Jun
|
|
|
|
|
Hello
What I understood is that for some reason you want to iterate through MenuItems present in a ContextmenuStrip. Here is the code:
foreach(TooStripItem MyItem in MyContextMenuStrip.Items)
{
}
If I were wrong, post me some details of what you really wanted.
Regards
|
|
|
|
|
|
I have three projects...
1) An interface definition dll as Project1.
2) An object definition dll as Project2.
3) A test application as Project3.
Class1 in Project2 implements the interface defined in Project1.
The test application uses Class1.
For some reason, I have to add a reference to the interface dll in both Project2 and Project3! I thought it would only be necessary to reference the interface in Project2, and that it would not be necessary to reference the interface in the application that uses Class1 in Project3.
Is this the expected behaviour?
|
|
|
|
|
Have you declared an interface pointer in Project3 code?
Best,
Jun
|
|
|
|
|
No... Project3 creates an instance of Class1.
|
|
|
|
|
Search the boards. I remember that the exact same question was asked not long ago.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
I have a generic class: myclass<T> where I put T as either a float or a double. However whenever I compile I get the error:
Cannot convert type 'T' to 'float'
I know that any of the types I use can be converted to a float. How can I tell the compiler this?
thank you
|
|
|
|
|
You didn't give the code so I'm guessing here...
Did you do an exlicit cast?
myclass<float> x = new myclass<float>(5.6);
double y = (double)x.value;
If that fails, you could always do something uglier:
float z = x.value;
double y = (double)z;
|
|
|
|
|
Use the where clause to add a constraint to the generic type T , so that it has to implement the IConvertible interface. Afterwards you can use the ToSingle method to convert instances of the generic type T to Single (float ) type.
class myclass<T> where T : IConvertible
{
private void Test(T q)
{
float x = q.ToSingle(null);
}
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
|
Problem 1...
I now have the same problem, but the other way round. How can I convert a float to type T (which is either a float or a double and is iconvertible)?
I get the error:
Cannot convert type 'float' to 'T'
Problem 2...
The error:
Operator '*' cannot be applied to operands of type 'T' and 'T'
when I multiply two numbers
What can I do about this? Does float inherit from some class that defines basic mathematical operations?
All help is greatly appreciated.. I feel the end is in sight!!
thank you
|
|
|
|