|
I am trying to find a setup application which is easy to use for
application written in .net 1.1 framework. Specifically it should
do setup under Winxx platform only.
1. Detect and install OS and framework dependecies.
2. installs the main application and its dependencies.
3. uninstall the main app.
Can you suggest some setup app ?
Thanks
Subir
|
|
|
|
|
Google for ".net 1.1 setup bootstrap[^]" and you'll find several setup bootstrapper applications.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I am trying to read two different lines from a text file into two seperate textboxs ie. line one of text file goes into textbox one and line two goes into text box two. Does anyone know how to do this.
Thanks
|
|
|
|
|
Here is one way:
'Declare a StreamReader object to read the text file line by line
Dim sReader As New System.IO.StreamReader("C:\MyTextFile.txt")
Dim strLine As String = String.Empty
'Read first line of text file
strLine = sReader.ReadLine
If Not strLine Is Nothing Then 'Make sure text file had a first line
txt1.Text = strLine 'Set first textbox
strLine = sReader.ReadLine 'Read second line of text file
If Not strLine Is Nothing Then 'Make sure text file had a second line
txt2.Text = strLine 'Set second textbox
End If
End If
sReader.Close() 'Close reader object to keep memory clean of garbage
|
|
|
|
|
Thanks you kindly for your help.
|
|
|
|
|
Hi,
I know its a long time since you posted this reply but I have one question. The text file I am reading the first line is blank. Will this code still work.
|
|
|
|
|
You may have to add another strLine = sReader.ReadLine to the code I gave you before. You will have to read in the first line (even if it is blank) but then just don't do anything with and read the second line right away. So in the spot where you read the first line of text, it would look more like this:
'Read first line of text file<br />
strLine = sReader.ReadLine<br />
<br />
'Don't do anything with the first line because it is blank<br />
'Read the second line<br />
strLine = sReader.ReadLine
Hope this helps.
|
|
|
|
|
I have a sub that is constructed to gather information from a number of XML-files. The XML-files are located in subfolders to the folder where Im running the sub. I have an XML for every website and if I get this code to work I can easely se all information in one Gridview. I can'tget it to work. I get an error at the row with "newRow = dsAllData.Tables(0).NewRow()". The errormessage is: "The reference for an object is not referencing to an instance of an object.". Does anyone have an idea? Se my code under. Im stucked ! Thanks for all help!
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim pathToFolder As String = ""
'Get the number of folders in pathToFolder and place the paths in Dataset
Dim dsAllPaths(200) As String
Dim k As Integer = Nothing
Dim j As Integer = Nothing
Dim s() As String
s = System.IO.Directory.GetDirectories(Server.MapPath(pathToFolder))
Do
If File.Exists(s.GetValue(k) & "\info.xml") Then
dsAllPaths(j) = (s.GetValue(k) & "\info.xml")
j = j + 1
End If
k = k + 1
Loop Until k = s.GetUpperBound(0) + 1
'ReDim array
ReDim Preserve dsAllPaths(j - 1)
'Places the right data in dsAllData from the info-file
Dim dsAllData As DataSet = Nothing
Dim i As Integer = 0
Do
Dim ds As New DataSet()
ds.ReadXml(dsAllPaths(i))
Dim newRow As DataRow
newRow = dsAllData.Tables(0).NewRow()
newRow.Item("Caption") = ds.Tables(0).Rows(0).Item(0)
newRow.Item("Status") = ds.Tables(0).Rows(0).Item(1)
newRow.Item("Information") = ds.Tables(0).Rows(0).Item(2)
newRow.Item("Buggs") = ds.Tables(0).Rows(0).Item(3)
newRow.Item("Wish") = ds.Tables(0).Rows(0).Item(4)
newRow.Item("Keywords") = ds.Tables(0).Rows(0).Item(5)
newRow.Item("Folder") = Replace(dsAllPaths(i), Server.MapPath("info.xml"), "")
dsAllData.Tables(0).Rows.Add(newRow)
i = i + 1
Loop Until i = dsAllPaths.GetLength(0)
'Bind datasource to gridview1
GridView1.DataSource = dsAllData
GridView1.DataBind()
End Sub
Best regards Richard Segerlund
|
|
|
|
|
You are referencing dsAllData.Tables(0)...but does your DataSet have a table in it yet? I'm not familiar with the DataSet.ReadXML so I wasn't sure if that would automatically setup the tables for you... I would set a breakpoint on the line that is causing the error and take a look at what your DataSet object contains.
Hope this helps.
|
|
|
|
|
I wish to persist some user settings such as a list of filenames and thought My.Settings would be the best way to go. However, the number of filenames in the list is unknown. For example...
Setting...
Name Type Scope Value
File1 String User "filename_1"
File2 String User "filename_2"
File3 String User "filename_3"
. . . .
. . . .
. . . .
Filei String User "filename_i"
Where 'i' is unknown at design time. Each time the app is run 'i' may get bigger or smaller.
Is it possible to add and delete user scope settings in My.Settings at runtime?
If not is there a better alternative?
Cheers
Tim
|
|
|
|
|
You are probably looking for the definition of an array!
simply have:
Dim Files() as String, NumberOfUsers as Long
Dim i as long
'Here write the code to get the number of users
Redim Files(NumberOfUsers)
For i=0 to NumberOfUsers
Files(i) = "filename_" & i
Next
|
|
|
|
|
Thank you for your response. Unfortunately you misunderstood my question.
Your response, however, did get me thinking what are the available data types in My.Settings and I found that there is a StringCollection type and this is exactly what I am after .
Thanks for the push in the right direction.
Cheers
Tim
|
|
|
|
|
Hi all
I would like to use the DirListBox, DriveListBox and FileListBox controls in Excel.
I used them in Visual Basic 6.0 (they are alsoa known as File System COntrols).
Do you know if it is possible and how to import these control in Excel forms without having Visual Studio or Visual Basic installed on the machine?
Regards
ManuStone
|
|
|
|
|
Without VB6, those controls don't exist. They come with VB6, so you'll have to get them off of a machine that has it installed. But, there may be a licensing issue here. I don't know if you'll be able to use the controls because of a possible designer license issue. You'll just have to try it and see. Copy the controls to the Windows\System32 folder, then register them using REGSVR32.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave!
Ach...I imagined it that could be an issue like this!!
Despite this I will do an attempt;
thank you very much for your response!!
Have a Nice day
Manu Stone
|
|
|
|
|
Hi,
I have an ASP page that draws up a report and display it to the user. If the user wishes to do so, he can click a "print" button which activates the printer dialog via javascript. This would be the same as if they selected "File > Print" from the browser menu.
My problem is that at hte top of the page, page numbers are added automatically, and at the bottom the URL of the page that was printed. Is there a way to get rid of this extra information, so that a "clean" document can be printed with only the results from the report.
Any help would be appreciated,
Thanks.
Mr.mark
|
|
|
|
|
You might get an answer if you ask this in the ASP.NET Forum. Your question has nothing to do with VB/VB.NET.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Problem:On Adding a control to designer at a specified Mouse Position
Effect: Control moves to some Default Position
Expected Result:Control should be placed on those specified co-ordinates where mouse pointer is pointing
Jhony
|
|
|
|
|
Drop all the "Problem, Effect, Expected..." garbage and just ask the question.
Are you seeing this with all the controls or just certain ones, which ones? Which version of VB.NET are you using? Are the controls snapping to a grid if you move them around with the mouse?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am working on a complex project. To make it easier I decided to produce some components in 4 different namespaces. These components were later imported in to the main project with an import statement at the top of the main project.
The program works well and i was considering writing all my projects as classes and components until this afternoon when i decided to deploy.
I produced the installer without error. I was able to install in another computer but the program just would not run in this second computer. The error message was
Processid=0x5e8(1512), thrad id = 0x2dc(732)
what does this mean and what did i fail to do.?
ihe
|
|
|
|
|
It sounds like your .DLL's for your components didn't get added to the installation, or are not installed where the Loader can find them.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
So what am i to do ?
The latest build history is :
------ Rebuild All started: Project: DriLCaLc Installer, Configuration: Debug ------
Building file 'C:\Program Files\NAWA\DriLCaLc Installer\Debug\DriLCaLc Installer.msi'...
WARNING: This setup does not contain the .NET Framework which must be installed on the target machine by running dotnetfx.exe before this setup will install. You can find dotnetfx.exe on the Visual Studio .NET 'Windows Components Update' media. Dotnetfx.exe can be redistributed with your setup.
Packaging file 'NAWADrilcALclLibrary.dll'...
Packaging file 'DriLCaLc.exe'...
Packaging file 'NAWADrilcALclLibrary.dll'...
Packaging file 'InstMsiW.Exe'...
Packaging file 'Setup.Exe'...
Packaging file '3box.ico'...
I noticed that the 'NAWADrilcALclLibrary.dll' is twice so i decided to prepare a merge module it made the matter worse. So what am i to do
ihe
|
|
|
|
|
Why are there two .DLL's with the same name in your Setup Project?? Where did both of them come from and where are they being installed??
If you're app is using 4 different library .DLL's, I only see one in this project. You're missing 3 of them. You'll have to straighten out your duplicate .DLL problem and add the other three missing assemblies to your Setup Project, at least.
Adding Items to a Deployment Project[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Because of the difficulty I experienced I decided to rewire the program a little
The original Windows Application had 4 Windows Control Library it needed to function properly.
I decided to lump all the user control inside a single WindowControlLibrary.
This is what I did:
I created a project in vb.net using a WindowsControlLibrary I called it NAWADriLCiLibrary.
It houses several user controls that are all used in a WindowsApplication1 I call DriLCalLc.
The database is in MS Access and is called Hydraulic.mdb
The database is in the window application.
The command buttons to save, edit, delete into the records of this hydraulic database are in the window application. These buttons are linked to methods and property of the user controls in the windowControlLibrary.
In my developer PC after I have produced the NAWADriLCiLibrary I build it, using the build menu – build solution on top.
Then I copied the NAWADriLCiLibrary.dll generated from the NAWADriLCiLibrary/bin/ NAWADriLCiLibrary.dll into the DriLCalLc folder. After this I set a reference in the code of DriLCalLc pointing to this. I did this by right clicking the add reference and selecting this .dll when the “add reference “box came up. To enable me use it in my code I then at the top of the code add an import statement
Imports System.Drawing
Imports System.Windows.Forms
Imports NAWADrilcALclLibrary
Public Class Form1
End Class
What am I required to do? How should I produce my Installer?
Also thank you for your guide I will read the text at the hyperlink now.
ihe
|
|
|
|
|
Do not set a reference to the .DLL file itself. Make your control library project part of the same solution as your application. In your application project, set the reference to the control library project. Do NOT copy .DLL's into the bin folders of your windows app project. This will lead to "unable to find version errors", or problems where you make a change to the library code and can't figure out why the changes don't show up in your windows app.
To this solution, add your installer project. Pick the Setup Wizard to make this a little easier and make sure you add the Primary Output from both the Windows application and Control Library projects.
That should about do it...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|