|
Can anyone provide me with some info obout this errormessage..???
"Visual Studio cannot save or load instances of the type Test because the type doesn't provide any supported way of saving or loading itself."
My problem is.. I have a class with a propety that get/set a collection..
In the designer/propertytab I can set the values to my colection in the collection editor.. -But when I leave the collection editor the code is not generated by the designer????? And I recieve this error message mentioned above..
Thx..
|
|
|
|
|
Hello everybuddy,
Listen! I have a bad bothering problem, I made a big effort to solve but no result yet. My project is going to be late and I have a short time.
It is a TCP/IP multithread socket based application. At some point after event I see the result of some action ok, after some seconds following exception occures in Visual Studio .NET (while in debug mode):
"An unhandled exception of type 'System.Xml.XmlException' occurred in Unknown Module.
Additional information: System error."
When I click "Break" it says:
"There is no source code available for this location"
What is XmlException ??? what the problem can be ???
I'd appreciate any help.
- Den
---
"Art happens when you least expect it."
|
|
|
|
|
Den2Fly wrote:
What is XmlException ???
An exception that occurs during the handling of XML. Does your code use XML anywhere ?
Den2Fly wrote:
"There is no source code available for this location"
That means that where it blew up is within the framework, but you should still be able to use the stack trace to work out where your code called the method that blew up, then look at what you passed in, which is bound to be where the problem lies. I hope.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I had one of these.
Try to set the CLR exception to break into the debugger.
In the Visual Studio .NET when a solution is open open the Debug menu and choose Exceptions.
In the dialog choose the 'Common Language Runtime Exceptions'. Then change the radio button below of the 'When the exception is thrown:' to 'Break into the debugger'.
This way as soon as the exception is thrown you break into the debugger and not in the place it is caught.
P.S. You can restore the exceptions to their default setting by pressing the 'Clear All' button.
Good luck,
Ami
|
|
|
|
|
I am building a Windows Application using C#. Some of my forms have a lot of controls and that graphics and that is causing me a redraw problems. How can I solve this problem?
|
|
|
|
|
|
I have been researching this, but I have not been lucky getting my hand on a good source of information regarding this topic. If you can point me in the right direction will be great.
thx
|
|
|
|
|
You can also try supressing lots of Layout events by using Form.SupressLayout() /Form.ResumeLayout(true) if you have drastic amounts of controls being added and removed at any time.
In general, if you have so many controls in a form that is causing problems with layout you might want to consider a redesign. The best way to speed up code is to throw out cruft.
|
|
|
|
|
I have a DataGrid with more columns than can fit in the client area. As expected a horizontal scroll bar appears automatically. I need to move the horizontal scrollbar all the way to the right programatically. I use:
this.HorizScrollBar.Value = this.HorizScrollBar.Maximum;
"this" refers to the subclassed DataGrid.
It moves the scrollbar all the way to the right indeed. However, it doesn't actually scroll the data grid, it just moves the scrollbar. It appears that the datagrid is not refreshing or something.
A subsequent click on the scrollbar by the user DOES refresh the DataGrid. But I would like to do it programatically.
I have tried this.Refresh() and this.Update(), but these seem to do nothing.
Any thoughts?
Thanks!
Mark
|
|
|
|
|
use this:
public void ScrollH(int newScrollValue)
{
base.GridHScrolled(this,new ScrollEventArgs(ScrollEventType.LargeIncrement,newScrollValue));
}
public void ScrollV(int newScrollValue)
{
base.GridVScrolled(this,new ScrollEventArgs(ScrollEventType.LargeIncrement,newScrollValue));
}
in ur case scrollValue=this.xxxxScrollBar.Maximum.
|
|
|
|
|
I have strings that are have RTF tags in them. I simply want to strip out htose tags. Could I use RichTextBox for this or must I use a regular expression. Please help - I know little about either.
|
|
|
|
|
Just load the RTF strings into a RichTextBox's Rtf property and then access it's Text property. The Text property gives you the plain text without formatting or RTF tags.
mav
|
|
|
|
|
|
I create my chart by the folloing Code:
Excel.ChartObjects charts = (Excel.ChartObjects)objSheet.ChartObjects(Type.Missing);
Excel.ChartObject objChart = charts.Add(100, 150, 400, 250);
Excel.Chart chart = objChart.Chart;
The ChartEvent_select event is defined by the folloing code:
public Excel.ChartEvents_SelectEventHandler Event_Select;
Event_Select = new Microsoft.Office.Interop.Excel.ChartEvents_SelectEventHandler(ChartSelect);
Then I try to add the event to the chart object, but I get no Select event for it. Other
events like chart.Rezise I got.
The VBA documentation says use the keyword WithEvents creating the chart object. But the
the Interop.Excel don't know this keyword.
Now my plan is gone and I need a little help.
Thanks in advance.
|
|
|
|
|
This code runs perfectly on Microsoft Excel 2003. I'm not sure it is backwards compatible.
using Excel=Microsoft.Office.Interop.Excel; //MS Excel Object Library v11.0
...
string objChartName;
Excel.Chart objChart;
...
private void initializeXLEvents()
{
objChartName=objChart.Name
((Excel.Workbook)objChart.Parent).SheetActivate+=new WorkbookEvents_SheetActivateEventHandler(xl_SheetActivate);
}
private void xl_SheetActivate(object sh)
{
Excel.Chart chrt=sh as Excel.Chart;
if (chrt!=null)
{
if (chrt.Name==objChartName)
Console.Writeline("caught");
}
I dont know if my Excel installation is faulty but I have encountered unexpected problems: If I try to run any method/property of any Excel com_object form the eventhandler xl_SheetActivate exlcuding the Sh parameter, Excel freezes and stops responding. Thats why I've created the objChartName string so I dont have to call objChart.Name inside the event handler.
First I tried using System.Runtime.Interop.Marshall.ReferenceEquals(sh,objChart) to figure out if the sending object was infact my chart, but this method failed. I'm not very sure what is going on while the eventhandler is running but as I explained above, something there is a little strange. If anybody has more info on this, please share. Thnaks
|
|
|
|
|
Hi All,
I want to convert the .NET application to ActiveX Control.
Is there any way to convert the Assembly to .ocx file rather than .tlb file.
Thanks
TusharM.
|
|
|
|
|
Hi All,
I want to convert my .NET Application to OCX rather than tlb file.
Is there any way to create .OCX file instead of .tlb file .
Thanks
TusharM
|
|
|
|
|
Hi,
I have a database named SchoolInfo in one server which has the IP eg: 192.168.1.106. I need to copy the datas from this server to the database SchoolInfo in another server which has the IP 202.168.8.101. I want this to execute every friday at 10 pm.
How can i do this?
Whether i need to write an application for this or can i do this as a job in the sql server itself.
Only by using username and password, i can connect to the destination server. how can i able to do this.
Regards
Mahesh Kumar V
|
|
|
|
|
|
I have been looking around on MSDN and have come across a few obstacles. I need to generate a file which will contain a GUID, an amount, and a 32byte[]. I will then need to import this. Firstly, do I use a binary or text writer? No one would need to view the contents of the file. If I used binary, how would I add additional rows? Would I add a newline or just write at the end of the last one?
How would I then load these values if I used the binary reader? I know with the text reader that you can load each line, and then split it as neccessary. Basically I am just trying to get suggestions.
|
|
|
|
|
I have a database field that stores a C++ struct as a binary array.
For example:
if the C++ struct was defined as
struct example
{
char szTag[8];
int nID;
double dValue;
char szMoreStuff[16];
bool bFlag;
}
I need to be able to read that from the db into a suitably defined C# struct (or class). I can get the data as a Byte[] array but I'm stuck on the best way to go from there.
Any advice would be welcomed.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Hi all,
Are there any notification class in C# which can be used to program user notification event or system notification event ?
Thanks
|
|
|
|
|
You can write to the Windows-System Eventlogs using System.Diagnostics.EventLog.
That way, you can create your own log or use one of the existing logs or even write to a remote log (log on another computer).
To notify a user of some problem, try using System.Windows.Forms.MessageBox.Show()
|
|
|
|
|
;PI want write a windows application that regularly polls a specific folder to see if any new files have been placed there. If a file is found, it must be displayed in a list within the program. The user then has the ability to select the new files one at a time and provide three text descriptions for them (e.g. Department to which the document must go, Recipient, and Description). These descriptions must be placed into an XML file with the same name as the original file (but with an .xml extension), and this XML file, together with the original file, must be moved to a new directory and removed from the list.
Lonwabo South africa
|
|
|
|
|
You gave a nice description of your task, but what do you expect from us; what are your problems with this task?
If it's only the polling of folders as the subject implicates you should take a look at the FileSystemWatcher Class, which listens to the file system change notifications and raises events when a directory, or file in a directory, changes.
www.troschuetz.de
|
|
|
|