ros_amir's Q&A profile
Windows Forms catching unhandled exception
Hi, Is there any way I can catch unhandled exceptions in my application Actually, my application is multithreaded and uses a third party control. Once in a while, very randomly, an error occurs in one of the controls and no matter how many try catch I add, I am unable to trap the exception. Is there any class or function or any way at all that can enable my application to catch any unhandeled exception Thanks, Sorry, I am on framework 2.0 running VB 2005 beta 2. That must be the difference. ...Show All
Windows Forms VS 2005 (no beta). DataGridView. Problems with RowHeadersWidth and .ErrorText
Hi ! I use VS 2005 (no beta). I think I found a Bug in the DataGridView class. I set the ErrorText property and could not see the red icon because I altered the RowHeadersWidth property. Then I comment this command and I could see the error icon and the error text on the row header again. It's amazing ! best regards, Joao Araujo this .dgrView.BorderStyle = BorderStyle .Fixed3D; // dgrView.RowHeadersWidth = 32; dgrView.MultiSelect = false ; dgrView.AllowUserToResizeRows = true ; dgrView.AllowUserToResizeColumns = true ; dgrView.AllowUserToAddRows = false ; dgrView.SelectionMode = Dat ...Show All
.NET Development Assign strong name to third part DLL
Hi, I am using third party dll like companentart.web.ui.dll which is not assigned as strong name. I can't have any code for modification so how can assign strong name to third party dll. So please help me by providing solution for third paty strong name. See the documentation on the Strong Name Tool (Sn.exe): http://msdn.microsoft.com/library/default.asp url=/library/en-us/cptools/html/cpgrfstrongnameutilitysnexe.asp ...Show All
Visual C++ passing arguments to a System(something.exe) function
Background : I have an MFC application and a c++ program (separate entities). I did a build on the c++ program, and copy pasted the resultant 'exe' formed in its debug folder into the MFC application's folder. Now in the MFC, I am calling the function "System(mt.exe)", which is a call to the exe that I had copy pasted. Question : This exe (ie the c++ program) uses a variable 'counter' at some point in its execution. Is it possible for me to pass an 'int' as an argument to the exe when its called from the MFC, so that the 'counter' within the exe takes that passed integer as its value So effectively, first time the exe is executed, ...Show All
Visual C# Detecting Internet Connection???
I want to make a program that will email to a given address automatically. I have setup everything required to send the email, like SMTP server etc. Now the problem is the program has to send the email only when the computer is connected to the internet. Hope u understand what I mean. Now can anybody tell me How Can I Detect Whether or Not the Computer is Connected to the Internet at some Instant Thanks! http://www.vsdntips.com/Tips/VS.NET/General.NET/466.aspx ...Show All
Visual C++ Crash in destructor
I'm using gtkmm 2.8.2 with Visual C++ 2005 Express to port a program from Linux to Windows. I'm using the win32 binaries from http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ , which were apparently compiled with MSVC 2003, therefore I have to use the option /vd2 ( http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ mentions this). Perhaps this causes my problem, but I don't know enough about the details of the C++ object layout that is used by MSVC. The problem is an access violation in a destructor. Anyway, here is an annotated disassembly of the destructor where the crash occurs: ; This is apparently just the usual prologue 00DC2600 pu ...Show All
.NET Development catching an exception from an unmanged DLL
Hi, within one of my DLL (using unmanged C++) I throw an exception of a user defined type (altenatively std::string - this caused the same result). In my .net solution that uses this DLL I've put everything into a try-catch block. The exception seems to be thrown correctly by the DLL, but the only thing my .net application receives is an exception of type System::Runtime::InteropServices::SEHException, accompanied by the message: "External component has thrown an exception." Does anyone know how this is done right Will it work at all Thanks, these blogs were really interessting - I think I should have a loo ...Show All
Smart Device Development Memory (Emulating SD card)
I wanted to install a program on my emulated Pocket PC, but the program told me I had insufficient memory. Is it possible to emulate an SD card or to emulate more memory than "normal"PDA's Thanks in advance, DJGIzbo Thank you so much. I had the same problem. Have been trying to emulate a pda, but (palm as well) but couldn't find a simple solution to get lot's of storage. Thx Marcel ...Show All
Software Development for Windows Vista workflow designer
Hi All, I wonder whether it is possible to host the workflow designer in my app. I thought it would be cool if I can have the workflow designer as my app's GUI. Thanks, DK Yes you can. I just saw a video with Scott Woodgate & team demonstrating the designer hosted in a winforms application ...Show All
Smart Device Development Dll can't work on real device!
I built a Dll that can work correctly on SP2003 SE emulator, but when I deploy it to real device(dopod 585), the phone doesn't load the Dll. I noticed that the function calling sequence is : ProcessInit ThreadInit ProcessUninit ThreadUninit It seems to return immediately, other exported functions doesn't work at all. I signed the Dll using "Smartphone 2003 Priviliged Test Signing Authority". So what's wrong Please tell me how to handle differences between emulator and devices!. Thanks! Since your DllMain code got called, it is not a signing issue (or your DLL would not be permitted to execute an ...Show All
Windows Forms designer can't load form. Where is 'more information'?
after going from beta2 to rc1, the designer all of a sudden cannot load my forms anymore. instead, i get the infamous window with the red top that says some errors may go away building the project, while other need code changes. needles to say: the file compiles fine, the form could be opened with the beta2 and vs2003 designers and obviously doing a rebuild doesn't help at all. now what the additional error message says; Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. ok - great. now how do i retrieve the loader exception property. how can i fix this where can i find more info ...Show All
Game Technologies: DirectX, XNA, XACT, etc. THANX
Hi everyone, i'm making my arcade 2d engine using d3d9 sprites, particles ditto. I have a problem with creating the device. First of all i tried all the ways i knew to make the hWnd handler which i guess is the problem. Any ways here's my code for creating the device. /* dx9.pD3D is basically our d3d object d3dpp is presentation parameters and dx9.pd3dDevice is our d3ddevice object.*/ if( FAILED( dx9.pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd ,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp, &dx9.pd3dDevice ) ) ) state = false; p.s. please give me a working source code for making a simple hWnd handler as well as the p ...Show All
Windows Forms Panel and ComboBOx Validating event BUG
Hello I have a panel and in it i have a ComboBox in the panel validating event I check if the ComboBox.SelectedIndex == 0 and if it does, I set the e.cancel = true. Like this : private void panel1_Validating(object sender, CancelEventArgs e) { if (comboBox1.SelectedIndex == 0) { e.Cancel = true; } } When I try to exit the form, the form is not closed, but I can open the ComboBox. What can I do about this OrM ...Show All
SQL Server Extracting month, day, year from dates
I need help in building a Select statement for an ODBC connection to an AS400 DB2 system. I am using this Select statement for SQL Reporting Services. Unfortunately 15 years ago one of the main datatables on the AS400 was set up splitting the transaction date into THREE FIELDS! One for Month, one for Day and then one for Year. I need to take yesterday's date and somehow use this in my WHERE statement to connect the transaction records that are in this AS400 table. This is what I have now that is not working: WHERE QS36F.BRDMST."BREED#" = QS36F.DOGOWNR.BRDCOD AND (QS36F.DOGOWNR.TMONTH = "MONTH"(GETDATE() ) AND ( ...Show All
Visual Basic Creating a byte array from a stream
How can I do this I've tried... Dim AccountToUpload As Byte() = System.Text.Encoding.Default.GetBytes(AccountUploadStream.ReadByte) ...but my result it -1. The stream is declared as... Dim AccountUploadStream As System.IO.MemoryStream = New System.IO.MemoryStream Any ideas The data stored in the stream is an XML document. Thanks. Try this code: Module Module1 Sub Main() Dim AccountUploadStream As System.IO.MemoryStream = New System.IO.MemoryStream( New Byte (99) {}) Dim ByteReader As New IO.BinaryReader(AccountUploadStream) Dim AccountToUpload As Byte () = ByteRea ...Show All
