I changed the icon of my VB.net program and now it is throwing errors.
I get this error when I try run the program:
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll Additional information: Exception has been thrown by the target of an invocation.
and it won't let me back into the designer to try and restore the original icon. It shows a page with this message on the Ford Design page:
To prevent possible data loss before loading the designer, the following errors must be resolved:
The parameter is incorrect
Instances of this error (1)
at System.Drawing.Icon.Initialize(Int32 width, Int32 height)
at System.Drawing.Icon..ctor(Stream stream, Int32 width, Int32 height)
at System.Drawing.Icon..ctor(Stream stream)
at System.Drawing.IconConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfoculture, Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
at System.Resources.ResXDataNode.GenerateObjectFromDataNodeInfo(DataNodeInfo dataNodeInfo, ITypeResolutionService typeResolver)
at System.Resources.ResXDataNode.GetValue(ITypeResolutionService typeResolver)
at System.Resources.ResXResourceReader.ParseDataNode(XmlTextReader reader, Boolean isMetaData)
at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader)`
Any suggestions? At this point I just want to figure out how to restore the old icon and get going on my program again!
Try
Remove the line Me.Icon = ....
In order to add new icon just go to your designer on properties window and add the icon you want.
Related
Exception thrown: 'System.Web.HttpException' in System.Web.dll
Additional information: Cannot use a leading .. to exit above the top directory.
I'm getting this error when trying to access a property of a control.
$('#<%= cboDenialReason.ClientID %>').change(function () {
showHideOtherDesc(this.value);
Note that the combox box is a Global.System.Web.UI.WebControls.DropDownList.
Not sure why it happens here, as I'm not making reference to my files?
I get sent a log file each time this error happens, so it is definitely happening, I just haven't been able to find out how to reproduce it, or why its occurring.
I merge a Word document with a .dat file (through vb.net), my code that does the merge is simple:
document.WordDocument.MailMerge.OpenDataSource(document.MergeFilePath, wdOpenFormatText, , , False)
document.MergeFilePath points to a local physical .dat file that contains a datasource for the document to use.
On certain clients, this (intermittently) causes an error, some errors are different, but most are Exception: Word was unable to open the data source.
I have tried checking the following properties, when the document is merging, to ensure that they are correctly set / in the correct state before attempting to set the datasource:
Application.PrintPreview | Changed the ActiveWindow.View.Type | (from wdReadingView) | Options.AllowReadingMode.
Again, on my side this is all working perfectly fine and I haven't been able to get any errors - although I know they are occurring.
My log file has this in it:
Office version: Office2013
Word ViewType: wdNormalView
Word PrintPreview: False
Word AllowReadingMode: False
Exception details:
Stack Trace: at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) at [PROJECT PATH].MergeDocument(Document& [document Object]) in [PROJECT Path]\FILENAME.vb:line 695
Things to note:
I've noticed it seems to only be on Office2013 (used to be all versions), but
seems the above changes fixed 2016).
I think it has to do with a document (or multiple documents) being
in a readMode state at some point
Something must be happening where it 'locks' certain properties and hence,
we are unable to update the datasource on the document.
Any help or a nudge in the right direction would be greatly appreciated.
I have a project in VB.NET that creates a byte array of an image input then creates a file of the image in .jpg format. Here is the code:
Dim fileWriter As New System.IO.FileStream(filePath,System.IO.FileMode.Create)
fileWriter.Write(imageBuf, 0, imageBuf.Length)
fileWriter.Close()
Once the code runs, I get the following error right after the second line executes:
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an invocation.
I did take a look at similar posts on this site, however none of them seems to be relevant to mine. I would appreciate your input.
Thank you.
I have the following code which used to work and now no longer works:
collectionUri = New Uri(txtServerName.Text)
Dim tpc As New TfsTeamProjectCollection(collectionUri)
workItemStore = tpc.GetService(Of WorkItemStore)()
teamProject = workItemStore.Projects(txtProjectName.Text)
When my application hits the line: workItemStore = tpc.GetService(Of WorkItemStore)() I get the following error:
ArgumentException occurred
A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll
Additional information:
Requested value 'Information' was not found.
{System.ArgumentException: Requested value 'Information' was not found. at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument)}
I have uninstalled and re-installed Visual Studio 2013 ... same results. I have tried the application on another computer and it works just fine so I know my code is good.
I haven't touched this app in a few months so I'm not certain what would have changed. Any ideas?
Thanks.
I'm trying to write a windows service. It installs fine, but fails when I run it with the following exception. I've searched for the string "MyNewProgramService", but I can't find any conversions that would throw this error. I've also added try/catch blocks to a bunch of code with custom exception handling without finding where this exception is occuring. I'm thinking it's somewhere in the auto-generated configuartion/setup code. Any ideas?
Event Type: Error
Event Source: MyNewProgram Event
Category: None Event
ID: 0
Date: 4/15/2010
Time: 12:48:34 PM
User: N/A
Computer: 20F7KF1
Description: Service cannot be started. System.InvalidCastException:
Conversion from string "MyNewProgramService" to type 'Integer' is not valid. --->
System.FormatException: Input string was not in a correct format.
at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value,
NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
--- End of inner exception stack trace ---
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
at TaskManagerFailureHandlerService.MyNewProgramService.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
it falls in method MyNewProgramService.OnStart, there Conversions.ToInteger is called somewhere. Just search for it in method. Then check parameter. It might come from config or something, thats why you don't see string in text.
Check your configuration file.
You might also check the account the service is running as. Just as a test go to the login tab in the services list and have it login under your own account. If the problem vanishes it's a permissions problem.