|
Hello,
I'm extensively using the Webbrowser control and everything is almost fine...
Actually I found a strange problem.
I crawl to a page containing the following code:
When using the IHTMLAnchorElement and asking for the 'href' property, I get the following result:
http://pubs.mgn.net/event.ng/Type=click&FlightID=6121&AdID=17734&TargetID=1165&Segments=108,143,292,365,382,1035,1227&Targets=273,1165&Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&RawValues=&Redirect=http://www.fnac.com/Shelf/article.asp?PRID=1391122&Origin=2003.2.10.12.24.24.0&OriginClick=yes
But If I issue an HTTP GET request, I get a 404 error (after redirection, the web server is a Netscape Entreprise Server).
I know that if I use this URL instead (like IE does !), I will work:
http://pubs.mgn.net/event.ng/Type=click&FlightID=6121&AdID=17734&TargetID=1165&Segments=108,143,292,365,382,1035,1227&Targets=273,1165&Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&RawValues=&Redirect=http:%2F%2Fwww.fnac.com%2FShelf%2Farticle.asp%3FPRID%3D1391122%26Origin%3D2003.2.10.12.24.24.0%26OriginClick%3Dyes
The difference is that the second URL has HTML decoded all & but kept all URL encoded characters.
Using the debugger I found that because the WebBrowser control is misparsing the anchor, I also get wrong values for the 'search' property (of IHTMLAnchorElement) and so on.
Is it a bug ? What can I do to deal with this problem and get a perfectly parsed URL ?
Regards,
R. LOPES
Just programmer.
|
|
|
|
|
Hello,
Repost because the first URL was translated by the message board.
I'm extensively using the Webbrowser control and everything is almost fine...
Actually I found a strange problem.
I crawl to a page containing the following code:
<br />
<A href=\"/event.ng/Type=click&FlightID=6121&AdID=17734&TargetID=1165&Segments=108,143,292,365,382,1035,1227&Targets=273,1165&Values=31,43,51,60,72,81,91,100,110,150,206,213,237,474,601,625,763,934,938,940,1007,1009,1046,1253,1282,1448,1907,1963,2018&RawValues=&Redirect=http:%2F%2Fwww.fnac.com%2FShelf%2Farticle.asp%3FPRID%3D1391122%26Origin%3D2003.2.10.12.24.24.0%26OriginClick%3Dyes\" target=_blank><IMG height=63 alt=\"\" src=\"http://pub.club-internet.fr/Netgravity/Fnac/100x63_massive_070203.gif\" width=100 border=0></A><br />
When using the IHTMLAnchorElement and asking for the 'href' property, I get the following result:
<br />
http:
But If I issue an HTTP GET request, I get a 404 error (after redirection, the web server is a Netscape Entreprise Server).
I know that if I use this URL instead (like IE does !), I will work:
<br />
http:
The difference is that the second URL has HTML decoded all & but kept all URL encoded characters.
Using the debugger I found that because the WebBrowser control is misparsing the anchor, I also get wrong values for the 'search' property (of IHTMLAnchorElement) and so on.
Is it a bug ? What can I do to deal with this problem and get a perfectly parsed URL ?
Regards,
R. LOPES
Just programmer.
|
|
|
|
|
Hi,
I've created an "DLL" to place some controls of my own, but when I "include" them in a normal app ( I inherit a control to my own control), then it gives me the following error:
"The Item xxxx.resx does not exist in the project directory, it may have been moved renamed or deleted"
Do I have to import the resource of the base control to my windows form application project ? I think I'm doing something wrong here...
Thanks in advance, greetings
Braulio
|
|
|
|
|
From the minimum requirements it seems that FileSystemWatcher does not work with 98 or ME. So, I'm thinking about writing my own version that does. Any ideas? I guess detecting new files or files that have changed with different sizes is easy. How about detecting changes in files where the new and old file size is the same? Is checking the various date stamps the only way?
Thanks in advance
Andy
|
|
|
|
|
|
Hi
need some serious help with a regex pattern..
i have the following expression:
Regex regex = new Regex(@"(^(aa)*(?!a)(b))", RegexOptions.ExplicitCapture);
what it does (partially) and is intended to do is to match only when there is an EVEN number of A infront of B
like:
b -> match
ab -> no match
aab -> match
aaab -> no match
aaaab -> match
aaaaab -> no match
etc..
so far so good
what i want is to make it only return the "b" when a match is found.
and also i want it to behave the same way when there is text infront of the pattern , like:
helloB -> match
helloAB -> no match
helloAAB -> match
helloAAAB -> no match
anyone?
//Roger
|
|
|
|
|
Roger J wrote:
what i want is to make it only return the "b" when a match is found.
Won't this be in the 4th element of the GroupCollection that comes out of the match?
|
|
|
|
|
Evening,
I was hoping if anyone knows how exactly one would hook into Internet Explorer using C# (similar to Browser Helper Objects of C++).
Any starter information appreciated,
Thanks,
Nishant
|
|
|
|
|
suppose I want to deploy an application on a pc without a common runtime, I need to package it with dotnetfix.exe. But how do I package this seamlessly with my application. I created visual studio .net setup project, but need details on how to include dotnetfix.exe...
thanks a lot
|
|
|
|
|
|
Hello,
Is it possible to add a windows form as a control in another form. If possible how? (With out using MDI relation ship).
Chito
|
|
|
|
|
How would I find out if the following was a whole number?
As floats
10/6 = 1.666666666666667
10/2 = 2.0
|
|
|
|
|
You can do a modulus operation to find out if the remainder is 0:
10%2 = 0 (10/2 = 5 r 0)
10%6 = 4 (10/6 = 1 r 4) <-- not a whole number
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
Thanks that will work great.
|
|
|
|
|
Hi All,
How do I enable multiple selection in a TreeView?
cheers,
Donal
|
|
|
|
|
|
I try to display the shell context menu of a file. When I get the
IContextMenu, I want to track the selected menuitem with the
TrackPopupMenu API call.
Here's the call :
int num = TrackPopupMenu(<br />
menuHandle,
TPM.TPM_RETURNCMD | TPM.tpm,<br />
pos.X, pos.Y,<br />
handle,
IntPtr.Zero);
The declarations :
public enum TPM :long<br />
{<br />
TPM_LEFTBUTTON = 0x0000L,<br />
TPM_RIGHTBUTTON = 0x0002L,<br />
TPM_LEFTALIGN = 0x0000L,<br />
TPM_CENTERALIGN = 0x0004L,<br />
TPM_RIGHTALIGN = 0x0008L,<br />
TPM_TOPALIGN = 0x0000L,<br />
TPM_VCENTERALIGN = 0x0010L,<br />
TPM_BOTTOMALIGN = 0x0020L,<br />
TPM_HORIZONTAL = 0x0000L,<br />
TPM_VERTICAL = 0x0040L,<br />
TPM_NONOTIFY = 0x0080L,<br />
TPM_RETURNCMD = 0x0100L,<br />
TPM_RECURSE = 0x0001L,<br />
TPM_HORPOSANIMATION = 0x0400L,<br />
TPM_HORNEGANIMATION = 0x0800L,<br />
TPM_VERPOSANIMATION = 0x1000L,<br />
TPM_VERNEGANIMATION = 0x2000L,<br />
TPM_NOANIMATION = 0x4000L,<br />
TPM_LAYOUTRTL = 0x8000L,<br />
}<br />
[DllImport("user32.dll", SetLastError=true)]<br />
public static extern int TrackPopupMenu(<br />
IntPtr hmenu,<br />
TPM fuFlags,<br />
int x,<br />
int y,<br />
IntPtr hwnd,<br />
IntPtr rect);
The menu is always displayed on the left side only even if the x value
is greater than 0...
Note that I know that the declaration of the API call is false :
normally, there is a "int res" between the y and the hwnd parameters.
But when I add "int res", the menu is no more displayed.
I also tried to use TrackPopupMenuEx but the menu is also not showed...
I have Windows XP Pro SP1.
Thank you
|
|
|
|
|
Who can tell me how to reuse the Microsoft WebBrower control in C#?
I reference the method Navigate2,but the webpage opened didn't display images.
Below show my codes:
Object objUrl="http://www.yahoo.com";
Object obj=null;
axWebBrower1.Navigate2(ref objUrl,ref obj,ref obj,ref obj,ref obj);
Please help me!
|
|
|
|
|
Rather than setting the obect to null, consider using the System.Reflection.Missing value. Also, I use the Navigigate
method rather than Navigate2. Someone might tell us the
difference other than how the URL is passed?
object missingVal = System.Reflection.Missing.Value;
string address = "http://www.yahoo.com";
axWebBrowser1.Navigate(address, ref missingVal, ref missingVal,
ref missingVal, ref missingVal);
|
|
|
|
|
Can I get the Microsoft Windows Installer packaged separately if I don't have the visual studio.NET?
Jassim Rahma
|
|
|
|
|
Hi,
I've got a huge log-file, i'm intrested in displaying it with a ListView style control, the problem is that these controls can't handle alot of data.
My thoughts were:
1. Find a ListView control that knows to handle alot of rows.
problem: can't find one.
2. Create a "Virtual ListView", meaning, the ListView contains only a specific subset of the data, when the user scrolls, i read for the new data.
problem: not only that I don't have a clue how to do that, but i think it will be problematic when the user scrolls alot(it means i have to read fast).
Anyone's got an idea?
Thanks in advance,
Eytan
|
|
|
|
|
Answer 2 is the right one. You'll have to manage the scrolling itself, reflected by the WM_VSCROLL and WM_HSCROLL messages (along with combination of codes LINE, PAGE, ...). My recommendation is to download a Petzold sample called GDIDEMO2 (google!). That's old stuff from a MFC programming book, however that's the simplest and most reusable thing I can think of.
|
|
|
|
|
Didn't understand from your post:
Is the message loop and message handling exposed by .net, or are you suggesting i Write it with MFC?
Thanks,
Eytan
|
|
|
|
|
Any .NET winform control exposes a WndProc method and heavily relies on it. Override it and process the mentioned messages. Since scroll messages passing through .NET controls are exactly those from WIN32 controls, you can rely on ready-to-use code. Now, that's up to you...
|
|
|
|
|
Thanks alot,
I'd like to use your advice in another thing related to this application.
Again, this application is pretty simple,
There is a Log-file which is written in very high-rates.
My application(called LogMon) reads the Log-file when it changes and saves in its memory only the last 600 or so records.
When the user scrolls up and back down, i calculate the records that should be loaded and load them before he scrools up to them.
Anyway,
I thought that maybe the whole idea of reading from a file is pretty slow,and came up with the following idea.
I split the LogMon to 2 apps:
* LogMon File2DB
* LogMon Gui
LogMon File2DB:
---------
Reads lines appended to file, and inserts them into a local\remote DB.
LogMon Gui:
---------
Reads the DB and updates when DB has new records.
This makes the GUI much faster and much easier to implement the "virtual ListView".
Quetsions:
1. Will this be faster?
2. regarding the LogMon File2DB, say the parsed log-file has a changing format, meaning there can be some log-files, each one with different format, is there any way, maybe with XML of defining dynamically the structure of the log-file?
Thanks ,
Eytan
|
|
|
|
|