yannickm's Q&A profile
Visual C# Not Freeing Memory
Hi, I don't know if anyone can help me. I am working with large png files, and finding the memory is not being freed after the object is disposed. Are there any know bugs on this issue Many thanks, Bruce Hi James, Thanks. I have had a look and can't seem to find GC.Collect() within the code. Running through the memory profiler, the garbage collector is collecting instantly after it previously freed some memory. To try and picture this, it starts off at the bottom left corner and increases rapidly diagonally up the screen freeing memory and then the app throws an out of memory exception, before the plugin dies. Its the first ...Show All
Visual C++ About unicode settings in visual studio 2005, it really puzzled me a lot
When I tried to open a file whose name contains non-english words by using ifstream in vc6, everything was OK. But in vc2005, any file path contains non-English words will never be openned successfully. How to do it the right way My code is as below: ifstream f; f.open("C:\\Documents and Settings\\Could\\桌面 \\hehe.txt",ios::in ); //f.open("F:\\My Cpp\\Projects\\__stl_read\\__stl_read\\hehe.txt",ios::in); assert(!f.fail()); __________________________________ I know that supporting Unicode is a big enhancement in vs2005, it's a good thing. But where can I find some guide to configuring this unicode featu ...Show All
Software Development for Windows Vista Running SQLPersistanceService examples on WWF Beta 2
Fellas, I have installed WWF B2 and its required extensions++. I could run some of the samples fine. There are a couple of demos that didnt work well and I think it was related to the use of SQLPersistanceService. I tried to look for the scripts at %SystemRoot%\Microsoft.NET\Framework\v2.0.50215\Windows Workflow Foundation\SQL but it is not there. The installed framework on my machine happened to be of v2.0.50727. So there I cannot create the schemas for the SQLPersistanceService. How do I get this to run with WWF B2 as well as the JanCTP Frameworks. Any hackarounds or advice is appreciated. Thank you You will find the scri ...Show All
.NET Development Saving type object to a file
How do I save a type object to a file and read it in again using c# Of course, like everything in life, that depends. You can use binary serialization to do it: Type theType = typeof ( RectangleF ); IFormatter formatter = new BinaryFormatter (); Stream stream = new FileStream ( @"C:\MyFile.bin" , FileMode .Create, FileAccess .Write, FileShare .None); formatter.Serialize(stream, theType); stream.Close(); stream = new FileStream ( @"C:\MyFile.bin" , FileMode .Open, FileAccess .Read, FileShare .Read); Type theNewType = ( Type )formatter.Deser ...Show All
Visual C++ C4293 only in .NET2005?
Compiler Warning (level 1) C4293 - 'operator' : shift count negative or too big, undefined behavior This warning occurred when the solution was compiled in .NET2005, but not in .NET2003. I tried searching C4293 in MSDN of .NET2003, and I can't find it. Is this warning error only in .NET2005 Thanks in advance! Sure that tis is the correct error number int i = 1<<100; // Should produce this error Shifting a value over the defined size of bits of this value produces and undefined result! ...Show All
SQL Server SQM Server Express / SQL Server Mobile
Hi, i need to make a synchronization between a sql server 2005 express and sql server 2005 mobile. I think this is not possible using merge replication and RDA. Was this right If so could anyone help and present a possible workaround for my problem Thanks in advance, Nuno Silva. ...Show All
Windows Forms BindingSource: Refresh data
How do i refresh the data of a BindingSource without fully reloading the data I have a DataGridView for showing my record, but each time i add, edit or delete a record i must fully reload the data from the database :( Also there seems to be some kinda bug in the DataGridView ... Before i start loading the data into the dataset again, i must remove the databinding to the datagrid or i get some out of index errors :( see if you are not working with selectedIndex property. I have same problem with out of index and think this is because I use it selectedIndex to select row. you can create yourown up ...Show All
Smart Device Development PocketPC SerialPort and turning off/on the device
Hi, Here a simple C# example that reads data from a GPS Device Assume two Buttons on the form and one Textbox. Further a SerialPort with the DataReceived Event handled in the form. public class Form1 : Form { public delegate void SetText ( string strPar); public SetText myDelegate; public Form1() { InitializeComponent(); } private void Form1_Load( object sender, EventArgs e) { myDelegate = new SetText (SetTheText); serialPort1.BaudRate = 4800; serialPort1.Handshake = System.IO.Ports. H ...Show All
Windows Forms Need to change TextBox border color
I have a need to change the border color on textboxes on a form. The textbox control doesn't have a bordercolor property so I'm trying to add one. The problem is, the textbox doesn't seem to be hooked to the OnPaint event. This is as close as I can come and it doesn't work. I know I'm missing something obvious, but I'd appreciate some help! public partial class dws_TextBox : System.Windows.Forms.TextBox { public dws_TextBox() { InitializeComponent(); } public dws_TextBox(IContainer container) { container.Add(this); InitializeComponent(); } private System.Drawing.Color _borderColor ...Show All
Visual C# Conversion Problems VB Terms Not familiar
Hi everybody, I have problem converting this vb.net ocdes into C#. Terms like shared, synclock and friend. What is their exact equivalent in C# I got this sample from another forum. I try to attached the codes. some codes: Code: What is shared in C# in method and variable Private Shared Function CheckWindowsNT() As Boolean ' ritorna true se e windows NT o 2000 o XP If Environment.OSVersion.Platform = PlatformID.Win32NT Then Return True End Function What is Friend accessor in C# Friend Sub Add(ByVal zone As CustomTimeZone) _Zones.Add(zone.ID, zone) End Sub What is replacement for SyncLock in C# If Zones Is Nothi ...Show All
SQL Server Object reference not found Error while generating the report
Hi, I am trying to generate a report. I am seeing below error after clicking on View report. I would appreciate any help resolving this issue. -Syam. Server Error in '/Reports' Application. Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: An unhandled exc ...Show All
Windows Forms Using More the One RowFilter in a Datagrid
Hi, How Can I Make a Datagrid which displays data according many RowFilter because I Have many comboboxes in my Form and any one or everyone can sort the data in my datagrid, dependig the meet criteria, How can I do to accomplish tihs Thank U Not 100% sure if this is what your asking, but hopefully it helps: you can bind&n ...Show All
Visual Studio Team System Using Resource files to support fxcop validation
Hi Everybody, Another question... I have to verify if some classes has in the composition of their names a specific Entity Name, like selEntityName, insEntityName, and so on. Well, I have a great number of Entity Names to search and compare to see if the name is valid. To be easy this process, I created a xml file with all my Entity names and put inside a resource file (.resx). This resource file has its property "Build Action" defined as Embedded Resource . So, I need to recognize this resource file inside my code, but unfortunatelly I got an error every time a try to read this file. The code is: Public Function LoadXML() As Xml ...Show All
Software Development for Windows Vista What do I need to get started?
Im fascinated with the cool glass effects of windows vista ui. And I'd like to develop one but I will run it under windows xp first. We still dont have a copy of vista beta or vs 2005. What I do have are just the express edition of visual c++ but Id like to start developing with what I have now before I obtain a copy. My question is where do I start How do I get those cool effects I already installed the winfs runtime, sdk and the vs extension, and now I want to know what will be my next step to develop my applications or what do I have to learn to start developing on visual c++. Can you enlighten me on this btw, i have heard of t ...Show All
Visual C++ Problem with templates
I am trying to write a template class for a simple double linked list. Posted below are the definitions. In the .cpp file I have the implementation. I know for certain that I am including the .h and .cpp files in the project, but I get an error when I try to build: error LNK2019: unresolved external symbol "public: __thiscall wcLinkedList<int>::~wcLinkedList<int>(void)" ( 1 $wcLinkedList@H@@QAE@XZ) referenced in function _main From my main() here is the code that is causing the problem: void main( int argc, char **argv) { wcLinkedList< int > test; getchar(); } Where am I go ...Show All
