|
I am building a progam in .net that uses MSCOMM.ocx. I used the Setup Wizard to create a msi file. When I install the program on my develoment computer everything works fine. But when I install on my customers computer I get an application exception. I have installed the .net framework 1.1. I can remove the reference to mscomm and the program loads correctly, but when I include mscomm the program crashes.
I've also tried downloading a msm file but the dependencies (COMCAT and OLEAuth32) have errors. Any help would be great. I need to get my customer up and running soon.
Thanks
|
|
|
|
|
If your customer is using Win2K or higher the "COM" family of DLLs - ole32, oleaut32, etc. should already be installed, and there are known bugs in the merge modules that will cause the setup to fail on OS versions that have file protection. But you should not need these in your setup for those systems anyway.
As far as the MSComm problem, I don't know what to tell you. Have you tried manually registering MSComm on the machine where it fails, and then seeing if the app works?
You can also get a verbose log of what you setup is doing by running it on from a command line with a /l*v switch like:
msiexec /i "C:\MySetup.msi" /l*v "C:\MySetup.LOG"
which may or may not give you some insight into if there is a problem with the install.
|
|
|
|
|
Thanks for your input. I solved the problem. The issue was that I referenced the ocx using the References in the IDE but I didn't place the object on my form. Instead I used 'Dim WithEvents'. Once I place the object on the form and modified a little code everything worked great.
Thanks again!
|
|
|
|
|
Hello I have been dealing with this issue for a week and a half and have been unable to come to an answer.
I am building a windows form project that will sit in the system tray, unviewable to the user. The program will query a database to determine if any new reports need to be ran. if yes then it will pull the required data and manipulate the data into a readable format (the database contains some udf fields that need to be separated into columns) and placed into a datatable which is then added to a new dataset. An xml file is then generated (which is my prebuilt report source, the structure of the report never changes, only the data contained within) and is saved to the harddrive. I then declare a new reportdocument and load the report from the harddrive to the reportdocument. I then specify the default printer name and tell it to print. When i tell it to print it throws a logonexception error. It also does this if i try to export the report.
I have tried using a crystal report viewer to load the report and print, which works fine, but it brings up the print dialog which i cannot have. the reports need to load, print, and close behind the scenes without interaction from the user.
If anyone has any idea why i'm getting this logon exception error even though i'm using an xml file, or how to get past the crystal report viewer showing the print dialog (maybe by forcing the ok button) please let me know. I've been at this for awhile.
CODE:
'add datatable to dataset <br />
dsUDF.Tables.Add(udfData) <br />
<br />
'write xml doc for crystal reports <br />
createXmlDoc() <br />
dsUDF.WriteXml(myXmlWriter, XmlWriteMode.WriteSchema) <br />
<br />
loadReport() <br />
printReport() <br />
<br />
DS.Clear() <br />
dsUDF.Clear() <br />
<br />
Public Sub createXmlDoc() <br />
xmlOut = New System.IO.FileStream("C:\Program Files\HunterReports\ParsedData.xml", IO.FileMode.Create) <br />
myXmlWriter = New System.Xml.XmlTextWriter(xmlOut, System.Text.Encoding.UniCode) <br />
End Sub <br />
<br />
Public Sub loadReport() <br />
report = New ReportDocument <br />
report.Load("C:\visualStudio_Projects\myReports\Youth_Inq.rpt") <br />
report.PrintOptions.PrinterName = Printing.PrinterSettings.InstalledPrinters.Item(0) <br />
End Sub <br />
<br />
Public Sub printReport() <br />
try <br />
report.PrintToPrinter(1, False, 0, 0) <br />
Catch ex As Exception <br />
MsgBox(ex.Message) <br />
End Try <br />
End Sub
|
|
|
|
|
I'm creating an application which uses localization to switch between 2 languages (english or spanish) according to the operative system's language, actually everything works fine except for the YesNo buttons from the message box (it seems not to work in spanish), anyone knows if there's a way to change the culture of the message box using code, or a way to edit YesNo buttons to display something else?
Thanks
|
|
|
|
|
The MessageBox should display in the language local to the O/S Regional Settings Control Panel. If this isn't happening, I'd check what the language setting is in the Control Panel.
The only other way around this is to develop your own MessageBox class.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a question about your answer, I made a class form which all other forms inherits, this base class has certain properties, among them I set the culture of the application (in case the user whishes to set a default language), so I suppose that the message box only checks for the regional settings and not the culture set to the application, am I right?
|
|
|
|
|
Yes, MessageBox only uses the system regional information, not the app's. MessageBox wraps the Win32 API MsgBox function.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hye there
I am working on a Document Management System and my client is looking for one requirement. like when user right clicks on any file inside any folder in windows. with other options like Properties, Send to Zip file , Delete etc there should be one option like "send to MyApplication". I have no idea how to add this in windows right click menu. Can any one guide me on this issue
thanks
|
|
|
|
|
I have found the solution. so thanks for nothing.
|
|
|
|
|
Rizwan Bashir wrote: so thanks for nothing.
WOW! What arrogance! You gave an all-volunteer-effort discussion site 7 whole minutes to answer your question! If this is how rude you're going to be when we don't get around to answering your questions fast enough, take your questions, and your "holier-than-thou" attitude somewhere else.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It looks that I put the bone in front of hungry dog and take it back with out letting him eat.
|
|
|
|
|
No, you didn't. What you said is VERY insulting.
"so thanks for nothing" means that you think you didn't get an answer fast enough or you didn't get the answer you wanted.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry for insulting words. I think I should not have to say this. Please accept my appologies on my words. but you should also be sorry as you said take your questions some where ellse . When Ever I have any problem I used to ask here and also keep on searching the solutions and since I find the result mean while So I said omit the question though I could delete it even. but let it there as some one could also have this problem and I was right.
|
|
|
|
|
Please post your solution.
Thanks
|
|
|
|
|
Click Start then click Run then write "SENDTO" click ok
now the folder you will get is the list of shortcuts. put shortcut for your application over there and then right click on any file in windows and in sendto option you will get your shortcut as an option.
|
|
|
|
|
Is there anything special you have to do to get the application to handle the event? I'm a newbie and want to do the same with my word processor project that I am currently working on.
Thanks
|
|
|
|
|
yes you have to define an array. and you will get the file name as parameter. and the first one is by default the path of the running Exe ( shortcut you created) so if the length of array is more then one then it means the application has some input. put this code in the load of startup form of your exe project.
Dim strArray() As String
strArray = System.Environment.GetCommandLineArgs
If strArray.Length > 1 Then
Dim count As Integer
For count = 1 To strArray.Length - 1
msgbox strArray(count)
Next
End If
this will prompt you one or more files/folder path selected.
|
|
|
|
|
hi ,
Any one please tell me
How to populate combobox form database using
1)datareader and 2)dataset,
I'm using mysql database.
|
|
|
|
|
Anyone have an Idea on how to program VB6 to have a Visualisation of the sound
like the one in Winaamp ( Those little green bar that move up and down according to the frequency of the sound) I'd like to build one that have a lower frequency than Winamp cause it start a 1000Hz and each bar have 1000 hz)
Thanks a lot to all.
Men1999
|
|
|
|
|
This is done using a FFT (Fast Fourier Transform) algorithm. Warning! This is a VERY CPU intensive operation. The more bars you want, the more CPU horsepower you're going to need to calculate the spectrum.
The web is full of examples. Just Google for "vb6 FFT". You can probably get some good ideas out of this[^] sample on PlanetSourceCode.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am pretty new at this, so how would I link the SQL Connection with the Datagrid so that when I want to search for say, a part number, it will bring back all the parts with that number?
|
|
|
|
|
This would normally be done in your SQL statement, something like
SELECT field list FROM table WHERE PartID = @PartID
You'd have to pass the ID that your looking for to the SQL stored procedure using a parameterized query. You can read up more on this and why it's a good idea in Colin Mackay's article, SQL Injection Attacks and Some Tips on How to Prevent Them[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am trying to get the LDAP root from a domain..
LDAP://DC=Company,DC=Com,DC=au
Found many apps that let me browse a LDAP structure but i want the root DC from the domain.
Can get the domain and was going to load into array and pull out each value building a string but this is not really the best and I hope someone has a better solution using the directory service .dll.
Dim mydomain as string()
'Get domain fill mydomain
'Loop through mydomain
Dim LDAPString as string
LDAPString = "LDAP://DC=" & Array1 & ",DC=" & Array2 & ",DC=" & Array3
Hope this makes sense.....
When people make you see red, be thankful you're not colour blind.'Get
|
|
|
|
|
'// I don't have AD Running here at the moment
'// to test this, but it should be
'// something like this:
Imports System.Runtime.InteropServices
Public Shared Sub dsRootPath()
Dim dsbi As New LibWrap.DSBrowseInfo
Dim return As Integer = LibWrap.DsBrowseForContainerW(dsbi)
' see DSBrowseInfo structure
Debug.WriteLine("Root Path: " & dsbi.rootPath)
End Sub
Public Class LibWrap
' Declares a managed prototype for the unmanaged function.
Public Shared DSBI_ENTIREDIRECTORY As Integer = &H90000
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
Public Structure DSBrowseInfo
Public structSize As Integer
Public dlgOwner As IntPtr
Public dlgCaption As String
Public treeViewTitle As String
Public rootPath As String
Public path As String
Public pathSize As Integer
Public flags As Integer
Public callback As IntPtr
Public lParam As IntPtr
Public returnFormat As Integer
Public userName As String
Public password As String
Public objectClass As String
Public objectClassSize As Integer
End Structure
Declare Unicode Function DsBrowseForContainerW Lib "dsuiext.dll" ( _
ByRef info As DSBrowseInfo) As Integer
End Class 'LibWrap
Hope that helps
|
|
|
|