|
As I said before and Alan confirmed.
And if by any chance that is insufficient, then the next step would be to call the Win32 function SetWindowPos at the right moment and using P/Invoke. However I haven't needed that in all those years that I am using .NET
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
thanks man for all your help
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I am developing a mobile app using C#. After running app in Pocket PC 2003 SE emulator the application after about 5-6 minutes crashes giving error:
"A native exception has occured in abc.exe".
Exception code: 0xc0000005
and the debug output is:
'ABC.exe' (Managed): Loaded 'C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\Debugger\BCL\mscorlib.dll', No symbols loaded.
'ABC.exe' (Managed): Loaded 'd:\dotnetapps\ABC\ABC\bin\debug\ABC.exe', Symbols loaded.
'ABC.exe' (Managed): Loaded 'C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\Debugger\BCL\System.Data.dll', No symbols loaded.
'ABC.exe' (Managed): Loaded 'C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\Debugger\BCL\System.dll', No symbols loaded.
'ABC.exe' (Managed): Loaded 'C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\Debugger\BCL\System.Xml.dll', No symbols loaded.
'ABC.exe' (Managed): Loaded 'C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\Debugger\BCL\System.Windows.Forms.dll', No symbols loaded.
'ABC.exe' (Managed): Loaded 'C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\Debugger\BCL\System.Drawing.dll', No symbols loaded.
'ABC.exe' (Managed): Loaded 'd:\dotnetapps\ABC\ABC\bin\System.Data.SqlServerCe.dll', No symbols loaded.
'ABC.exe' (Managed): Loaded 'System.SR.dll', No symbols loaded.
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
A first chance exception of type 'System.FormatException' occurred in mscorlib.dll
A first chance exception of type 'System.FormatException' occurred in mscorlib.dll
The program '[6c91f87e] ABC.exe: Managed' has exited with code 0 (0x0).
Can someone please check this and help me to solve this issue. My app is continuously crashing because of it.
Thanks
_joseph_bashir
|
|
|
|
|
Member 115243 wrote: Can someone please check this and help me to solve this issue
And how can we do that, All you have posted is stack trace? All that can be done with this is confirm you have an issue with not having files, or the expected version of them, available to your application.
only two letters away from being an asset
|
|
|
|
|
There is an event ItemAdded that fires when an item is added but it do not fire when a sub item adds. eg.
ms.Items.Add();
ms.Items[0].DropDownItems.Add ();
Is there any way to do this ? Actually, I'm making a control using MenuStrip as base class and I need to execute some code(e.g setting ForeColor of new item) when any item adds in Menu or in its Items collection.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hmm, interesting. I've never needed to trap such an event so I don't know what's going on under the hood. Have you considered creating a custom event:
public class CustomMenuStrip : MenuStrip
{
//use this method instead of: DropDownItems.Add()
public void AddDropItem()
{
this.DropDownItems.Add();
OnDropDownItemAdded();
}
public event EventHandler DropDownItemAdded;
protected void OnDropDownItemAdded()
{
if (this.DropDownItemAdded != null)
this.DropDownItemAdded(this, null);
}
}
This maybe a shot in the dark but it may help you out.
Cheers,
Richard
If my answer has helped you, one of my articles may also be a help. Also remember that your best friend's name is google.
|
|
|
|
|
well, it will only work on runtime anyway I got something different that is I should add another Items Collection property like ItemsX that will have custom ToolStripItems collection
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi All,
I would like to be able to read and write directly to the NTFS and or FAT.
Can anyone point me in the correct direction to do this using c#, failing that c++
I wish to append extra information about the files and folders that is specific to my company.
many thanks for your help...
|
|
|
|
|
I dont know if this could be the solution to your problem (in NTFS anyway) but take a look at Alternate Data Streams[^]
A brief search gives this CP article ADSdotNET: A DLL for using alternate data streams from .net languages[^] in C++.
Maybe, if you have a bing about, you will find something in C#.
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
thanks for that, very interesting...
i'll have to see if there is a way of using this from c#
|
|
|
|
|
Hi!
I am new to programming with SQL so I really need help on this one. After I finish an application with no errors or bugs, i tried to launch it in different computers. However, most computers encouter SQL errors while loading the application, either a timeout error or the application simply crashes due to the inability to load the data from an SQL database.
My questions are the following:
1. Do you need an SQL server running in the computer where you will deploy the application? Though in some computers, the application worked even though they do not have an SQL Server.
2. Should I modify something in the connection string when I am already deploying the software? Is there a difference in the connection string when the program is running in my computer and in other computers?
My connection string is this:
"Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\MyDatabase.mdf;Integrated Security=True;User Instance=True";
I tried modifying the timeout but the error still remains.
3. Where could I have missed something?
Sorry if I am missing something trivial here.
Thanks in advance for those who will respond! You'll really be helping me a lot.
Thanx!
|
|
|
|
|
labdakos wrote: Integrated Security=True
I would start by looking at the integrated security. When set to true the currently logged in windows user account will be used to try to access the server. If you haven't given the individual accounts permission to the database security could be stopping you.
You could fix this by setting the integrated security to false and then specifying a specific SQL UserID and password.
Latest toy built for fun: Web Lens
Best feature: Full size images when using Google image search.
|
|
|
|
|
Also doesn't look like you are specifying your server name in the connection string. SQL will only have to be installed on your server but the other machines need to know where that is.
This is a pretty good primer on connection strings: http://www.connectionstrings.com/sql-server-2005[^]
Latest toy built for fun: Web Lens
Best feature: Full size images when using Google image search.
|
|
|
|
|
Hello all i have the following structure of an XML documet:
<br />
<?xml version="1.0" encoding="utf-8" ?><br />
<config><br />
<Item><br />
<relais>255</relais><br />
<tijdIn>12:00</tijdIn><br />
<tijdUit>13:00</tijdUit><br />
</Item><br />
<Item><br />
<relais>255</relais><br />
<tijdIn>12:00</tijdIn><br />
<tijdUit>13:00</tijdUit><br />
</Item><br />
</config><br />
i need a (c#) code to read to document and load the items: Relais, TijdIn and Tijd uit in a different collum in a datagridview.
Because im new to XML i need your help! thank You!
|
|
|
|
|
|
I have written code to export content of DatagridView to Excel using Strem. It works but in some case some texts are found missing. And Numeric Datas are not formatted(i.e. while adding or calculating from exported data, unable to perform calculation. My code is like this:
public class ExcelReport
{
#region
private string Heading1;
private DataGridView Grid;
private int ReportType;
private int StartCol = 0;
private int StartRow = 0;
#endregion
#region Constructors
/// <summary>
/// Report Type:Excel=1,HTML=2,Word=3 and All=4
/// </summary>
/// <param name="_heading1"></param>
/// <param name="_grid"></param>
public ExcelReport(string _heading1,int _reportType, DataGridView _grid)
{
this.Heading1 = _heading1;
this.ReportType = _reportType;
this.Grid = _grid;
WriteReport();
}
#endregion
#region Main Function For Exporting
private void WriteReport()
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
if (ReportType == 1)
{
saveFileDialog1.Filter = "Excel Worksheet files|*.xls";
}
else if (ReportType == 2)
{
saveFileDialog1.Filter = "HTML Files|*.htm";
}
else if (ReportType == 3)
{
saveFileDialog1.Filter = "Word Files|*.doc";
}
else if (ReportType == 4)
{
saveFileDialog1.Filter = "Excel Worksheet files|*.xls|HTML Files|*.html|Word Files|*.doc|All Files|*.*";
}
//Exporting To Different Formates using Stream
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
FileInfo fi = new FileInfo(saveFileDialog1.FileName);
StreamWriter sw = fi.CreateText();
sw.WriteLine("<table bgcolor='#FFFFFF' border=1 width='100%'>");
sw.Write("<tr>");
foreach (DataGridViewColumn col in Grid.Columns)
{
string FontName;
if (Grid.ColumnHeadersDefaultCellStyle.Font.Name.ToString() != null)
{
FontName = Grid.ColumnHeadersDefaultCellStyle.Font.Name.ToString();
}
else
{
FontName = col.DefaultCellStyle.Font.Name.ToString();
}
sw.Write("<th bgcolor='#ECE9D8'><FONT FACE='" + FontName + "'>" +ReplaceSpclChars(col.HeaderText) + "</font></th>");
}
sw.Write("</tr>");
//Fills cells of excel sheet by the content of grid view
int i=0;
for (i = 0; i < Grid.Rows.Count; i++)
{
sw.Write("<tr>");
for (int j = 0; j < Grid.Columns.Count; j++)
{
string FontName;
if (Grid.Columns[j].DefaultCellStyle.Font != null)
{
FontName = Grid.Columns[j].DefaultCellStyle.Font.Name.ToString();
}
else
{
FontName = Grid.DefaultCellStyle.Font.Name.ToString();
}
if (Grid[j, i].Value != null)
{
sw.Write("<td><FONT FACE='" + FontName + "'>" + ReplaceSpclChars(Grid[j, i].Value.ToString()) + "</font></td>");
}
else
{
sw.Write("<td><FONT FACE='" + FontName + "'>" + Grid[j, i].Value + "</font></td>");
}
}
sw.Write("</tr>");
}
sw.WriteLine("<b><Font Face='Shangrila Numeric' size='14px'>" + ReplaceSpclChars(Heading1)+ "</Font></b>\n");
sw.WriteLine("</table>");
sw.Close();
if (i > 1)
{
CrudeFx.MsgBoxNepali.Show(@";""rL PS;]ndf n}hfg] sfd ;DkGg eof] M", MessageBoxButtons.OK);
}
}
#endregion
}
private string ReplaceSpclChars(string fieldName)
{
fieldName = fieldName.Replace("<", "<");
fieldName = fieldName.Replace(">", ">");
return fieldName;
}
}
|
|
|
|
|
|
Thank you very much for your reply.
|
|
|
|
|
Hi all...
I'm trying to write to a file with the XmlDocument class. I used the Save(string) method which gets a file location and saves the XML to it. the thing is I get an exception:
"The process cannot access the file 'c:\scene.xml' because it is being used by another process".
What is the problem? how can I overcome this? (I want to load the file and then to be able to save on the that file)
some code:
this happens when loading of the file
_currentXMLFile = openXMLFileDialog1.FileName;
System.IO.StreamReader myXMLFileStream = new System.IO.StreamReader(_currentXMLFile);
XmlTextReader myXMLTextReader = new System.Xml.XmlTextReader(myXMLFileStream);
_myXMLDocument = new System.Xml.XmlDocument();
_myXMLDocument.Load(myXMLTextReader);
myXMLDocument is defined at the start of the program so it will have the program's lifespan.
this happens when trying to save the XML document into a file, and throws an exception:
myXMLDocument.Save(fileName);
|
|
|
|
|
Hi,
if you're running Windows Vista or higher, you are not authorized to create files in certain locations of your boot partition; the top level directory is one of them. So choose another location, there is an excellent way to get some here: Environment.GetFolderPath() Depending on the kind of file and data, look for ApplicationData or MyDocuments or ...
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Actually I'm using windows XP...
I tried the procedure (load and save) on many locations and it still throws the error.
it there a way to load and save the same file, did any one tried that??
|
|
|
|
|
Make sure you close the file where you load it, the "another process" part of the error message often is incorrect.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
ok, even though the System.IO.StreamReader is defined within a function?? (the function ends before the save action)
|
|
|
|
|
yes, you have to close or dispose of it explicitly, or use a using statement which is a way to get it disposed of automatically. There is no "stack semantics" stuff in C#, and the GC will only execute finalizers if and when new memory allocations cannot be satisfied without collecting first (and even then finalizers run on a low-priority thread), so that can take a long time to happen.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Closing the streamReader did solve the problem... you are awesome!
one more question on a relative topic:
XMLNode myXmlNode;
for (int i=0; i < 2; i++)
{
myXmlNode = new XMLNode;
}
will the GC collect the first two allocations of the XMLNode? and when?
|
|
|
|