|
Look for code that calls a COM object, and set breakpoints to work out which one it is.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The exception is an "invalid typecast". I'm sure it is in my code. I don't believe it has anything to do with COM. Is there some sort of map file that that I can look at to find the method that contains the offending address.
I don't have the debugger on the target machine. An I'd rather not put it on the target. What if the exception happens out in the field? I'd like to be able to find the problem given the offending address.
|
|
|
|
|
If you have cought an exception, you should look at all the information it contains, by
dumping its ToString() result, not jsut its Message. That will give you, amongst others,
a full stack traceback (including file names and line numbers if it is a debug build
with PDB file available next to the EXE/DLL files).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
No, no, no... My app did not catch the exception. So I don't have any idea where to look in my app. The OS, or whatever catches unhandled exceptions, caught the exception and that dialog tells me the address of the where the exception occurred. Now I'm trying to determine where in my app that address is.
|
|
|
|
|
OK, then I suggest you improve the exception catching in your app:
- add a try-catch in your Main() method;
- handle AppDomain.CurrentDomain.UnhandledException event;
- and handle Application.ThreadException event.
Doing all this, you should catch everything except maybe a few drag exceptions.
For each of them, you could do a MessageBox.Show(...Excecption.ToString()...);
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Should be obvious, but what's the best way to find in a datatable the row index where Column C has Value "X"?
Thanks
|
|
|
|
|
Hi,
Dim sql as String = "SELECT ID FROM TABLENAME WHERE C = 'X'"
Dim cmd as New SQLCommand(sql, connectionstring)
... open connection...
Dim idx as integer = CInt(cmd.ExecuteScalar)
Msgbox idx.ToString
hope this helps
|
|
|
|
|
Im working on a screen capture program that records a movie of your desktop, using the article here:
Screen Capture
It works all fine and dandy, but is it possible to make a red circle follow the cursor? So, whenever the cursor moves, there is a red circle behind the cursor so whoever watches it, always knows where the mouse is. Would I use GDI+ or something? I have no idea. Or would I have to make another cursor, in say photoshop?
Any help is appreciated.
|
|
|
|
|
I imagine you'd change the cursor using a new Cursor file.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
I am doing development for a windows mobile device using Visual Basic 2005.
The customer want to be able to download the data from the main database and be able to work off-line.
So I have decided that all the data that is download will be written to a xml file that can be read by a dataset. Also use the dataset to write changes.
When the user goes online the changes they have made to the off-line xml file will need to update the SQL database, I will use the getChanges of the dataset to sync with the central database (SQL Server 2005)
However, the user will be using a wireless and I will need a condition in my code that will detect if the wireless gets disconnected so that they can use the off-line data in the xml file that can be read in by the dataset.
I am not sure how I would detect the wireless being disconnected, as this will disconnect from the sql server database?
Any advice would be most helpfull,
Many thanks,
Steve
|
|
|
|
|
Can any one send me the VB 6.0 / VB.Net code for closing a running exe application without promting confirmation? Thanks & Regards
Nasim Ahamed Munna
Programmer
|
|
|
|
|
|
i want to make such a programme that can detect hard drives of my computer.
but i gott some link by using folder properties.
---------------------------------------------------------------------------
My PC is having 4 hard drives >> C,D,E,F.
Now can i give command like >>
if there r 4 drives then store their name as DRIVE 1,DRIVE 2,DRIVE 3,DRIVE 4.
iF THERE r 3 drives then store them in DRIVE 1,DRIVE 2,DRIVE 3.
it means 1st it should detect drives.... n them store them in variables.
PLUS
how can i change the font colour of FOLDER??
Plz help needed as early as possible
--------------------------------------------------------------------------
( ( ( (
|
|
|
|
|
There's a property available that lists all available drives, find info here[^].
To change the details of how a folder is rendered, you create a config file that lives inside the folder. I'm not sure what is possible, I know you can set a bitmap for the folder.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian
So you got sick of asking people to Google the ? first - what a cool answer...
|
|
|
|
|
Hi all,
I'd like to make a bluetooth manager application (VB2005) but I can't find documentation in the .NEt 2.0 framework about how to connect to bluetooth devices and what kind of information and operations can be retrieved and done. Do you know any article that talks about it?
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
hi
can anybody help to me how to write report in vb.net 2005 ?
Thanks
bye
|
|
|
|
|
What type of report do you have in mind? Do you want to generate:
- Microsoft Access Report
- Crystal Report (.rpt)
- Generate Yourself and write it to print document
- Other type?
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
hi
i want to generate crystal report in vb.net . is there any inbulit facility of report writing except crystal report ?
Thanks
bye
|
|
|
|
|
Hi all,
I've created a form which is in English, and would also like it to be displayed French and Spanish via a combobox?
I have created a combobox(cboLanguage) and added English, Franch & Spanish too it and added the following code:
Dim Language As String
Language = cboLanguage.Text
If Language = "French" Then
Me.lblTitle.Text = ("Titre")
Me.lblFirstName.Text = ("Prenom")
Me.lblLastName.Text = ("Dernier nom")
Else : Me.lblTitle.Text = ("Title")
Me.lblFirstName.Text = ("First Name")
Me.lblLastName.Text = ("Last Name")
End If
This all works Ok, but can be very time comsuming esp if your doing muliple Languages on many forms.
Can anyone tell me if there is a simlpe way for doing this???
Many Thanks
Ian Wells
-- modified at 8:34 Sunday 9th September, 2007
Ian Wells
|
|
|
|
|
You factor out all of your display strings into a config file, and then create a different file for each language. Then, once your code selects what file to get it's values from, it's just going to work everywhere.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
A different solution could be:
- Use the visual studio designer to localize the form (search for "localizing vb.net forms" on google)
- Then set the System.Thread.CurrentCulture to the value you want in the combobox selection changed event.
- On every control you could reapply the localized resources: (translated to vb.net, not compiled so it may contain some small errors)
<br />
Dim resources as System.ComponentModel.ComponentResourceManager = _<br />
new System.ComponentModel.ComponentResourceManager(GetType(YourForm))<br />
For Each c as Control in Me.Controls<br />
resources.ApplyResources(c, c.Name)<br />
Next <br />
Regards,
Jelle Hissink
|
|
|
|
|
I am doing a recent files menuitem. I am using a zero based array of 4 items, which i have displayed everytime you load the form. The problem i have now is, how do i limit the datafile to 4 entries? i can append the data file, but thats it. Any suggestions would be most welcome.
Regards
Zeldacat
|
|
|
|
|
Well, just count how many entries you have, and once you have four, you drop one from the bottom when you add one at the top.
How do you store them ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
I am new to visual basics and I am taking a class in it. I am trying to write a code for this and I am so confused on what to do. If anyone could help I would appreciate it.
Here is the question in my book:
Write a program that requests a complete phone number in a text box and then displays the area code in another text box when a button is pressed.
Thanks if you can help..
|
|
|
|