|
I have a pretty simply project that I'd like to deploy. I tried using the publish wizard. It published OK, but I can't install the resulting files. I get this error:
tia.
OPERATION PROGRESS STATUS
* [9/29/2006 11:29:42 PM] : Activation of C:\Mydocs\Program Files\Trade Director\Install\CS_Director_1_0_0_0.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [9/29/2006 11:29:42 PM] System.Runtime.InteropServices.COMException
- The referenced assembly is not installed on your system. (Exception from HRESULT: 0x800736B3)
- Source: System.Deployment
|
|
|
|
|
Your application is trying to use a COM-based component that is not installed on the machine. Whatever that component is, it has to be installed before your app will run. If you don't know what it is, you might be able to find out by looking in the References folder of your app's source project.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Well, I'm going a little nuts. I have this app which is written in vb.net (2003). My problem is that you can not shut down windows when this app is loaded. This app sits in the system tray and the form visible property is set to false. You have to close down the app and then you can shutdown windows. I've been searching for days and found WndProc. I tried this. It will terminate the app, but will not shut down windows. It looks like the end session message is not being passed along. The code is below. Does anybody have any ideas? It would be much appreciated.
Private Const WM_ENDSESSION As Integer = &H16
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_ENDSESSION Then
bolWinShutDown = True
Application.Exit()
End If
MyBase.WndProc(m)
End Sub
Private Sub frmLanPopupExMain_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
If bolWinShutDown = True then
e.Cancel = False
Else
e.Cancel = True
Me.Visible = False
End Sub
Thanks,
Dick Bellnier
|
|
|
|
|
You don't have to override WndProc to do this.
Does your app spawn any threads? This is probably the most common cause of this problem. Any threads have to be terminated before your app closes, unless the threads are tagged as Background threads.
Another is some people decide to handle the Form Close event so they can minize their form to the System Tray. But, it's usually not done properly because they forget that this event fires during Windows shutdown to close your application.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I'm new here and it has been several years since I've done any serious VB coding. I used to do a lot of VB6 development and have not really touched it in about 8 years. .NET is brand new to me as well.
I need to create a quickie application either in VB6 or preferably VB.NET that does the following:
Reads through a directory of .XLS files reads the contents of 2 cells and renames the file based on the contents of those 2 cells.
In the old day's I'd have whipped this out in a couple of hours, but I've discovered that I've forgotten a lot of my VB syntax etc...
Can any one help by providing me a sample to get me started?
Thanks
Craig
|
|
|
|
|
hi
i am developing a project in which i have a main form in which i open another form with the main form still in the background. on making changes on this new form and clicking the save button this form closes and again the main form is visible but the changes made just does not reflect. how to reflect the changes?
Praveen Kumar
|
|
|
|
|
Is this a Windows application or a web application?
---
b { font-weight: normal; }
|
|
|
|
|
When you return focus to the main form the FormLoad event does not fire. What you probably want to do is put all (or most) of the code that is currently in your FormLoad event handler and move it into a public subroutine. When you close the second form, first have it call this new public subroutine to reload the main form's data before returning to the main screen.
Hope this helps.
|
|
|
|
|
i've looked and tried fixin this problem until i'm ready to pull my hair out. hopefully someone has the answer.
i want a combo box to display names from a table. the table has 2 fields (CoordinatorID and Coordinator). the id field is sequential.
when i run the program, the combobox works but assigns the place in the combobox as index instead of the CoordinatorID as the index (see code below). if i don't sort the list (removing "ORDER BY coordinator") it works fine, but i have to have it sorted for the end user.
what am i doing wrong? any help greatly appreciated,
thanks, chris
Public Sub FillCBO()
rs1.Open "SELECT * FROM tblCoordinator ORDER BY coordinator", Conn, adOpenStatic
If rs1.EOF = False Then
rs1.MoveFirst
Do
cboCoordinator.AddItem rs1.Fields("Coordinator")
cboCoordinator.ItemData(cboCoordinator.NewIndex) = rs1!CoordinatorID
rs1.MoveNext
Loop Until rs1.EOF = True
End If
rs1.Close
Set rs1 = Nothing
End Sub
|
|
|
|
|
AFAIK, the combobox will show items in the order passed in, unless you have the sorted property set to true.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
HI all
i wanna to create an application that must use functions in another computers.my application is ntier.and the dataaccess layer is in another computer that implemets an interface with name IDataAccess ,in the client application (UI) i must use DataAccess 's functions that referece them with new so i have to use Client Activator .and i dont want to use proxy.
Is there anybody that can help me
regards
Maryam82
|
|
|
|
|
I have a datatable that I have retrieved from a database (w00t!)
now I am trying to add a column to this datatable, but the add command only allows me to add a datacolumn to the end of the datatable collection
I want to add my new datacolumn to the start of the datatable (or potentially at any index ) and I haven't been able to figure out how to do this.
Any hints?
Thanks in Advance,
Jason
|
|
|
|
|
You can't add a column at any index you want. Anything you add will always be appended to the end. Besides, a DataTable object has no visible component, so it doesn't matter where the column is appended... Why do you want to do this?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I'm setting it as my datagrid datasource.
I'm reading data from several sources in my database. Based on the type of data I'm reading (whether it is Contact data or Business data etc) I wanted to add an icon column to my datagrid. This works fine, except the icon is the last column in my datagrid, I want it to be the first.
I assumed that I would do this at the datatable level, not at the datagrid level.
Jason
|
|
|
|
|
The view of the data is maintained seperate from the data itself. The order of the columns in the datatable has nothing to do with the order of the columns in the datagrid. In order to do this, you'll have to create all your columns, in the order you want, and add them to the grid.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
so how is this done? I already have my datatable (tblMergedContactsAndCompanies). I want to add a new column at index 0 and then read through all the rows in my datatable and assign an icon depending on Type (Contact or Company) and then display this in a datagrid.
I can add the icon column to my datatable, but when I display it in my datagrid, it is at index(datatable.columns.count).
Dave Kreskowiak wrote: In order to do this, you'll have to create all your columns, in the order you want, and add them to the grid.
Are you saying that I have to create a new datatable, read the columns from my original datatable in, and then read the data in?
Jason
|
|
|
|
|
No! You create the DataGrid columns manually and specify which columns they map to in the data source.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I am using the following code in codebehind file for creating a saveAs dialog box in webApplication in VB.net.
Dim filename As String = Session("DateTimeStampZip")
Dim fullPath As String = Server.MapPath(ConfigurationSettings.AppSettings("ServerDownload")) & "\" & filename
Dim dataStream As FileStream = New FileStream(fullPath,System.IO.FileMode.Open)
Dim fileLength As Integer = System.Convert.ToInt32(dataStream.Length)
dataStream.Close()
dataStream = Nothing
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Disposition", "attachment; filename=" & filename)
Response.AppendHeader("Content-length", fileLength.ToString())
Response.WriteFile(fullPath)
Response.End
My problem is that when I run the above code, I am getting a saveAs DialogBox with (checkbox:Always ask before opening this type of file.) shown in disabled mode..
With disabled I mean, in non-editable mode i.e; I am not able to check or uncheck the box.
When i click on open button in the box, same box pops up second time with the checkbox in enabled mode. Now i am able to open the file.
I want this saveAs dialogBox with the checkbox in enabled mode when I run the code first time and not after I click on open button in the dialog box.
Can anyone workout a solution to my problem..
PLease its urgent...
or any other way to create the dialog box using code in vb.net...
-- modified at 5:57 Friday 29th September, 2006
|
|
|
|
|
This is a question best asked in the ASP.NET[^] Forum.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I haven't posted a question before so I hope that this is the right forum.
I am developing a windows app in vb.net (2002) that I want to have an xp theme. I have read quite a few web articles describing the process for incorporating this and have indeed been successful at getting my .exe file to run with an xp theme. However, I have not been able to deploy the application with an xp theme.
My progress so far: I built the assembly manifest, given it the right name, called it “RT_MANIFEST” and an ID of 1. I then added it into the .exe file located in my ‘release’ folder manually, and when I then execute the .exe it works fine. I know that I have to manually add the manifest every time I build the project.
When I then come to deploy the app it does not keep the xp theme, even when I test run it on an xp PC set up to run xp style. I am not rebuilding the app project, just the deployment project so I don’t think a rebuild is the reason.
I have tried embedding the manifest into the .exe located in the ‘bin’ directory, but when I try to run this .exe I get an error message saying that the assembly is incorrect.
Any help would be really appreciated as I am completely stumped.
Thanks,
Ash
ash
|
|
|
|
|
I'm messing about a bit with Enums and combining them via (bitwise) OR and AND so I can assign multiple values to the Enum-types, but I am having some conceptual problems. I noticed in the msdn documentation that there was a <Flags()> attribute which could be set to your enum.
If I look at the msdn for <Flags()> it states: Indicates that an enumeration can be treated as a bit field; that is, a set of flags.
However my code seems to be indifferent to whether i assign <Flags()> to my Enum or not, hence my confusion? It seems to be able to handle both the OR and the AND with and without <Flags()>.
Can anybody give a quick explanation or point me to an article/ressource which explains this?
Thanks in advance
---------------------------
127.0.0.1 - Sweet 127.0.0.1
-- modified at 4:13 Friday 29th September, 2006
forgot to ignore html tags
|
|
|
|
|
Alsvha wrote: However my code seems to be indifferent to whether i assign <flags()> to my Enum or not,
It would help if we could see your code and what you're trying to do!
Combining flags is always done with an OR, not an AND. To check to see if a bit is turned on, you use AND:
Public Class Form1
<Flags()> Public Enum AccessOptions As Byte
None = 0
Read = 1
Write = 2
Delete = 4
Query = 8
Sync = 16
End Enum
Private Sub Button1_Click(blah, blah) Handles Button1.Click
Dim MyOptions As AccessOptions
' Turn on multiple options
MyOptions = AccessOptions.Read Or AccessOptions.Write Or AccessOptions.Sync
' Now check for each option being turned on. There are a few different ways
' of doing this!
Debug.WriteLine("None : " & (MyOptions = AccessOptions.None) )
Debug.WriteLine("Read : " & ((MyOptions And AccessOptions.Read) > 0) )
Debug.WriteLine("Write : " & ((MyOptions And AccessOptions.Write) > 0) )
Debug.WriteLine("Delete: " & ((MyOptions And AccessOptions.Delete) > 0) )
Debug.WriteLine("Query : " & ((MyOptions And AccessOptions.Query) = AccessOptions.Query) )
Debug.WriteLine("Sync : " & ((MyOptions And AccessOptions.Sync) = AccessOptions.Sync) )
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey.
Thanks for the reply, but my issue is that it doesn't seem to matter if I use the "<Flags()>" or not:
<Flags()> Public Enum AccessOptions As Byte
None = 0
Read = 1
Write = 2
Delete = 4
Query = 8
Sync = 16
End Enum
seems to work like
Public Enum AccessOptions As Byte
None = 0
Read = 1
Write = 2
Delete = 4
Query = 8
Sync = 16
End Enum
for my bitwise comparison and funtionality. Thus me being somewhat puzzled.
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
How do you represent both Read and Write allowed in your second example?
|
|
|
|
|
I have made this example to mess about with it, which was where I found this issue: (please ignore bad naming as it is just a test project )
I have this enum:
Public Enum MyType As Integer<br />
TypeA = 1<br />
TypeB = 2<br />
TypeC = 4<br />
TypeD = 8<br />
TypeE = 16<br />
End Enum
(withouth <Flags()> )
I then "OR" some choices together and place them in a variable of the type of MyType.
This then results in some interger value depending on the choices.
Then I can check if a type is added to my object:
Dim result As MyType = mEnuType And examineType<br />
Return result = examineType
where mEnuType is the combined type variable and examineType is the one I try to check if contains.
I can remove added types by using XOR and all that, and all seems to work flawless. Withouth using the <Flags()> with my Enum, hence my confusion.
If I read the documentation (msdn) for <Flags()> it seems to indicate that I need it to do these bitwise functionalities, however this testing seems to indicate I do not, and I can't figure out what I am doing wrong?
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|