|
Good point...
I guess I was a bit too quick to look for answers without understanding my own question.
Anyway I had been thinking if there was a way to get XML DOM type functionality with an HTML source.
I've found an SGML parser which is doing most of the job for now. Although it does seem VERY slow.
The aim of my project is to download web pages, and re-serve them later. We have permission from the owners (various on-line versions of newspapers), but most of these pages have various embeded anti-copy constructions, which are of course a complete pain to overcome.
...No better than I ought to be...
|
|
|
|
|
I need to check if a .dll is registred at install time and if not I need to roll back the instalation
how can be done under vb.net ?
Thanks.
best regards ravin
|
|
|
|
|
This is standard stuff in MSI package builders like Wise for Windows Installer. The installation can have a list of prereq's so that if any of them fail, the install can roll install itself back, no code required.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
can you tell me how to do it ? I use vb.net to build the installation kit and i did not see any option for rolling back if.. smth.
the file .dll is declared as vital in the project install kit
|
|
|
|
|
Are you talking about in the Setup and Deployment project for your VB app? There, I don't think you can do this. At least, I've never tried.
In Wise for Windows Installer, it's simple. There's a wizard for adding a dependancy such as this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The MSI best practices advise not using self-registration of DLLs at all. Instead the package should write all the registry keys required by all components directly from the MSI Registry table.
The main reason for self-registration failure is the dll cannot load one of it's dependencys. Assuming you have all the dll dependent components in your package, this can still occur because there is no guarantee the dlls will be registered in the required order. This is why they advise writing registry keys.
Unfortunately, it is not that simple because you have to determine all the registry keys required by a DLL. You can find Registry spy tools that record any changes made to the registry and use these to determine what keys need to be added to the setup. It's still a tedious process and easily prone to errors, so you must test carefully on a machine with a clean Windows install to make sure the package works.
As far as checking self-registration success, you can add an Installer class as a custom action and write code in it to load the DLL. If this fails, you can raise an exception from the Installer class. This will cause the entire setup to be rolled back. The problem with this is if the setup fails one time it will likely fail every time so your user has a setup that essentially never works.
A better option is to write a custom action that registers the dlls in a specific order that you have determined will always succeed.
|
|
|
|
|
|
**I also posted this question in........ but do to the lack of response I moved it here. I realize I may get vb-biased responses so I am debating on also posting in the C# discussion board, but don't want to come across as spamming**
..many apologies if I am beating an extremely dead horse...
Well i recently migrated for VB6 a couple of months ago to VB.NET when I acquired a VS.NET Professional package. Thanks ,in part, to the outstanding responses I got about the migration. Well I havent made any serious apps in VB.NET yet. still doing alot of reading/learning..did I mention alot of reading? well anyways I have been doing a bit of online reading and have heard alot of bashing of VB.NET and high praise of C#. Is VB.NET really that bad? I am planning to be in the programming field for the rest of my life *awwww* and realize i need to learn more than one language. But which is a better language to pursue first VB or C#.
Sorry for the long read. And many thanks from a young, humble programmer in a tremendous community.
._._._._._.-.-.-.-.-._._._._._.-.-.-.-.-._._._._._.-.-.-.-.-
Spimoles.NET
clean and elegant. a beautiful craft
|
|
|
|
|
JoeySpimoley wrote:
But which is a better language to pursue first VB or C#.
Like anything else, it's a matter of preference. If you're going to learn both, neither is that much better than the other. There are some things that VB.NET supports that C# doesn't and there are things that C# supports that VB.NET doesn't.
For instance, I'm writing an application that has a front end written in VB.NET and all the image processing code behind it is written in C#. (Christian -> Thanks for the image processing articles! )
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
As the other reply stated, both are very close as far as features and power.
It really is a matter of style and preference. VB.NET will be easier for you since you have a VB6 background. On the other hand, C# is also very easy to pick up if you have a VB background.
To sum up the different styles:
VB.NET: Descriptive syntax and multiple syntax alternatives
C#: Concise and elegant code with virtually no ambiguous syntax
David Anton
Tangible Software Solutions
www.tangiblesoftwaresolutions.com
Home of:
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant J#: VB.NET to J# Converter
|
|
|
|
|
I think I am going to go with VB.NET then learn C# at a later time.
._._._._._.-.-.-.-.-._._._._._.-.-.-.-.-._._._._._.-.-.-.-.-
Spimoles.NET
clean and elegant. a beautiful craft
|
|
|
|
|
can anyone tell me how can i load data back onto treenode from access database ???
thanku
|
|
|
|
|
If you're adding a single level of nodes to the TreeView...assuming VB.NET...
TreeView1.Nodes.Clear()
objCon.Open()
adapter1 = New Odbc.OdbcDataAdapter("Select * from RemoteHost", objCon)
data = New DataSet
adapter1.Fill(data, "RemoteHost")
' This part assumes that a table called "RemoteHost" actually exists in the dataset,
' and the a column called "General" exists in that table!
Dim I As Integer
With data.Tables("RemoteHost")
For I = 0 To .Rows.Count - 1
Dim newNode As New TreeNode( .Rows(I).Item("General").ToString() )
newNode.ImageIndex = 0
TreeView1.Nodes.Add(newNode)
Next
End With
objCon.Close()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
still havin error on this line of code objCon.Open()
An unhandled exception of type 'System.NullReferenceException' occurred in tab.exe
Additional information: Object reference not set to an instance of an object.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
TreeView1.Nodes.Clear()
objCon.Open()
adapter1 = New Odbc.OdbcDataAdapter("Select * from RemoteHost", objCon)
data = New DataSet
adapter1.Fill(data, "RemoteHost")
' This part assumes that a table called "RemoteHost" actually exists in the dataset,
' and the a column called "General" exists in that table!
Dim I As Integer
With data.Tables("RemoteHost")
For I = 0 To .Rows.Count - 1
Dim newNode As New TreeNode(.Rows(I).Item("General").ToString())
newNode.ImageIndex = 0
TreeView1.Nodes.Add(newNode)
Next
End With
objCon.Close()
|
|
|
|
|
Uhhh...Did you actually create a Connection object?
Where is objCon defined? Was it actually created with a New? Was it assigned somewhere else, but not filled in with the connection details?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It is possible to open to an application NET (DLL) from a project VB6?
It would interest to send from an application VB a .NET form
Thanks
|
|
|
|
|
|
Thanks, but this was not exactly what I wanted. I have a MdiContainer form in a project VB6 and have an application (form) in NET. What I wanted I was to be able to call to the form of NET from VB6 doing it MDIChildren.
I have been able to call the form NET from VB6, but what with himself he is that habra like a new window and not like a MdiChildren.
Thanks in advance
|
|
|
|
|
Roirin wrote:
Thanks, but this was not exactly what I wanted. I have a MdiContainer form in a project VB6 and have an application (form) in NET.
You didn't post any specifications like this at all, in fact, you didn't post ANY specifications. You got links to documents that generally covered your very general specs.
Roirin wrote:
I have a MdiContainer form in a project VB6 and have an application (form) in NET. What I wanted I was to be able to call to the form of NET from VB6 doing it MDIChildren.
You have to do the very same thing that's covered in those documents. Your classes, and even a Form is a class, must be exposed to COM so VB6 can use it. Without that, you're sunk.
I've never done it, because I've never had the requirements to do it. In theory, it should work. But I there are potential problems, simply because VB6 and VB.NET manage Forms so differently.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I was able yesterday to do what wanted.
In this page http://www.codecomments.com/archive293-2004-7-228359.html they indicate like opening a form to you within another one, the only thing that I had to replace "hChild" by the "Handle" of the form NET For it I made a method I publish:
Form VB .NET in a project of libreria of classes
Public Function getHandle() As System.IntPtr
getHandle = Me.Handle
End Function
ActiveX Document
'To create the reference to the class .NET
Private Sub initialize()
Dim hChild As Long
Dim hParent As Long
Dim f As New ClassLibrary2.Form1
Dim b As Boolean
hChild = f.getHandle()
hParent = UserDocument.hwnd
b = SetAsParent(hChild, hParent) 'this function is in the Web
f.Show
End Sub
Thanks
|
|
|
|
|
Cool!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
can anyone tell me how to parse treeview
|
|
|
|
|
That all depends on what you mean by parse?
Parse a string returned by a TreeViewNode? Walk the Tree? What?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i m so sorry that i didnt mention ..
yeah i mean how to Parse a string returned by a TreeViewNode...
|
|
|
|
|
Parse the string to what end? are you tying to convert it to a number or what?
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|