|
Hi floodlight.
The answer to this really depends on the HTML to parse. For a parser to work there would have to be some sort of standardisation in the HTML pages parsed. i.e table styles would have to be known in advance so that you could extract the table contents etc. Writing an HTML parser is definitely not a trivial task. Once you have a string representing the rows and columns of a specific table then you can still use the split method to retrieve the cell contents. If you could give me a more complete example of your HTML then maybe I could help you further.
|
|
|
|
|
Hi again Zimvbcoder,
I can give you the exact string I will be parsing.
You will see that some of the string contains the fields you helped me with in an earlier post...
Okay, here's the string (it's one row from a HTML table) it's a little long lol, so you may need to paste into a HTML editor so you can see it clearly
<tr><td class="aws"><a href="http://www.goauto.com.au/mellor/mellor.nsf/adredirect?readform&admodel=outlander&unid=3f98ba22ac6414b7ca2576e00004bad6&make=general%20news&model=&time=0&client=1&adtype=useful&page=news&site=va" target="url">/mellor/mellor.nsf/adredirect?readform&admodel=outlander&unid=3f98ba22ac6414b7ca2576e00004bad6&make=general%20news&model=&time=0&client=1&adtype=useful&page=news&site=va</a></td><td>9</td><td>1.59 KB</td><td>9</td><td>9</td><td class="aws"><img src="/icon/other/hp.png" width="261" height="4"><br><img src="/icon/other/hk.png" width="249" height="4"><br><img src="/icon/other/he.png" width="261" height="4"><br><img src="/icon/other/hx.png" width="261" height="4"></td></tr>
|
|
|
|
|
Hmmm. This will be quite complicated and will take more time than I am unfortunately able to give right now. Your best bet is to try a loop first splitting the string by <td> and then by <td/>. This theoretically should give you an array of the table columns, although this is going to be messed around by property declarations in the column definitions i.e <code>class="aws"</code>. This is going to be messy, especially with the double quotes in the html, so you won't be able to store this as a single string. Sorry I can't be of more help right now.
|
|
|
|
|
No worries mate, I appreciate you taking the time to look at it anyway
I'll keep plugging away at it and see what trouble I can get myself in to, haha!
|
|
|
|
|
How do I do a transparent label in Windows mobile vb.net 2008? Label.backcolor = color.transparent does not work. Thanks
|
|
|
|
|
No, it should work. May be you have to check some other thing.
|
|
|
|
|
Hi CodeProject ,
The problem is I am drawing a LineShape control from Microsoft PowerPacks controls .dll , I am also moving the line when MouseDown,MouseMove,MouseUp,
But i am not able to drag the line in the correct position like in VB.net 2005
MouseDown
fdragging =true
startx =0
starty =0
MouseMove
m_control.StartPoint = New Point((m_control.StartPoint.X + e.X) - startx, (m_control.StartPoint.Y + e.Y) - starty)
m_control.EndPoint = New Point((m_control.EndPoint.X + e.X - startx), (m_control.EndPoint.Y + e.Y - starty))
MouseUp
fdragging = false
& the things are i am not able to handle the MouseUp event also after mousemove the pointer is slipping from the line & not able move the line in the correct direction.
Regards,For1206
|
|
|
|
|
On the mouse down, does the startx, starty not have to be the point relative to the main form position? Then on the mouse move, you use the move offsets to relocate the line relative to startx and starty.
|
|
|
|
|
Hi Dave ,
I m using a split container.On Panel1 i created a panel and on that i am drawing the line .& trying to move on the MouseDown ,Move,Up for LineShape Controls.
But i am not able to drag the line while placing the cursor at any position on the line due to the logic problem exactly & loosing the grip of the line while placing the mousepointer & dragging the line not firing the MouseUp .
Regards,For1206
|
|
|
|
|
See code below, i have just tried this and it is fine. Form, with SplitContainer, and A PowerPack Line in the right Panel
Private _lineDrag As Boolean = False
Private _x As Integer = 0
Private _y As Integer = 0
Private Sub LineShape1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles LineShape1.MouseDown
If e.Button = Windows.Forms.MouseButtons.Left Then
_lineDrag = True
_x = e.X
_y = e.Y
End If
End Sub
Private Sub LineShape1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles LineShape1.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left And _lineDrag Then
LineShape1.X1 = (LineShape1.StartPoint.X + e.X) - _x
LineShape1.X2 = (LineShape1.EndPoint.X + e.X) - _x
LineShape1.Y1 = (LineShape1.StartPoint.Y + e.Y) - _y
LineShape1.Y2 = (LineShape1.EndPoint.Y + e.Y) - _y
Me.Refresh()
End If
End Sub
Private Sub LineShape1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles LineShape1.MouseUp
If e.Button = Windows.Forms.MouseButtons.Left Then
_lineDrag = False
End If
End Sub
|
|
|
|
|
Hi Dave ,
Thanks its moving fine .
1) But my LineShape controls is slipping from the mouse pointer while moving . So not able to drag the line in a correct way ,Freely .
2) I am able to get the traces of line if resized on the Start point or End Point handles . & i have to refresh the Panel i.e., Parent of the Shapecontainer .
My way of doing the things .
SplitContainer -> Panel1 -> New Panel at runtime -- This Panel is parent for the shape controls .
The Same problem also coming for RectangleShape & Oval Shape also.
I have to press the mousebutton very forcefully & drag the control otherwise slipping from my mousepointer .
What to do ??For1206
modified on Friday, February 19, 2010 12:43 AM
|
|
|
|
|
Question?
I developed an application in vb6. Application is on 2 separate computers. I have SQL Server 2005 on 1 of them. My question is?
When i Add, Change or Delete data in the base i what that other application see the change that i made.
Something like a real-time. Can that be done?
Thanks.69 best number
|
|
|
|
|
you can refresh the active screen(form) using timer which will execute the DB updates, so the latest changes will be there.
|
|
|
|
|
I was thinking 2 use a timer.
But is there a function that will trigger the updates
|
|
|
|
|
|
Dear friend;
I want to print 1000 lines in one paper sheets using POS printer. How to do it? I need Vb.net Source code.
thanks
C.Kumarasinghe
|
|
|
|
|
You posted this question just 31 minutes ago, and just 12 minutes ago someone gave you an answer. Its rude to keep posting the same question, particularly when you have not bothered looking at the answer given. Bob
Ashfield Consultants Ltd
|
|
|
|
|
How to print 1000 line in one page? How to change Paper height? Please help with tested Answer
Printer is POS or any
Paper Roll or Continues paper
thank
C. Kumarasinghe
|
|
|
|
|
If the printer is a POS device that uses a roll of paper, I suspect you can just open the printer connection and just keep
printing lines until you have finished the output and then just close the printer device.
It maybe a case of referring directly to the developer info for the device available from the OEM.
|
|
|
|
|
If you want to print with a windows driver see the folowing link:
http://support.microsoft.com/kb/322090
A POS printer is not a graphical printer.
You have to send the data raw.modified on Thursday, February 18, 2010 1:24 PM
|
|
|
|
|
Hi,
I have a user control developed using C#. The user control class implements two interfaces.
How can I create an instance of C# user control in VB6.0 and call functions from the two interfaces.
It is possible for me to create the control and show it on the form using Controls.Add but then I am not able to typecast the variable for the control to an interface object.
I think I am missing something but don't know what exactly.
I am new to VB and project requirement asks me to do this using VB6.0
Any help or guidance on this front is appreciated.
|
|
|
|
|
You can use the .NET stuff from VB6 using the Interop Toolkit[^] from Microsoft. You can easily add both UserControls and Forms from the .NET environment to the VB6 environment.
There's also a CodeProject article[^] available with examples in C# I are Troll
|
|
|
|
|
Thanks for the link. I went through the article and am not very clear about whether existing controls from C# can be hosted on the VB Form. I have a few questions regarding the same.
1. Will I have to write the entire C# .NET code (for existing user controls) or can the exising controls be ported using the toolkit directly and used from VB6.0
2. Will it be possible to create instances of .NET controls dyanamically?
3. Will I be able to handle events from the C# controls? [Got the answer to this. Yes]
4. What would be the other broad issues that one can face while using this toolkit and regarding COM Interop.
5. Any application deployment issue that one can face and dependency of the toolkit being installed on the deployment site.
|
|
|
|
|
Q2A wrote: 1. Will I have to write the entire C# .NET code (for existing user controls) or can the exising controls be ported using the toolkit directly and used from VB6.0
There's some extra code required to communicate between the C# UserControl and VB6. You can use the templates that come with the toolkit to create a new UserControl, that way all the required code will be added automatically. You can also copy these routines to an already existing UserControl.
Q2A wrote: 2. Will it be possible to create instances of .NET controls dyanamically?
Yup
Q2A wrote: 3. Will I be able to handle events from the C# controls? [Got the answer to this. Yes]
4. What would be the other broad issues that one can face while using this toolkit and regarding COM Interop.
That's possible, but it's a bit slower than a .NET event.
Q2A wrote: 5. Any application deployment issue that one can face and dependency of the toolkit being installed on the deployment site.
You should be fine as long as the toolkit is installed I are Troll
|
|
|
|
|
Thank you for your response. This will help me in the implementation.
|
|
|
|