Logging potential problems

Tagged Under :

I’ve been loggin potential problems in my programs so that if a problem occurs I can get a bug report back from the user. It will be full of details and I’ll be able to fix the problem.

Hopefully. However this isn’t alwats the case and I’ve been on the trail of some errors for months and months.

I’ve had a slowness in one of my program and I haven’t been able to firgure out why.
I went through a stage of putting log lines everywhere so I’ve find any possible problem.

But you’ve guessed it, I’ve just discovered why my program was slow in that area.
It was the logging lines.

So what do you do?

Do you have the log lines and a slow program and a program with problems.

Or no or few log lines, a fast program or a program with problems you may never fine.

Have fun making great looking masks with our Software!

by JM

Cold Coding Problems

Tagged Under :

This thread is aimed to provide an area for exhausted problems, where you’ve looked on various coding help sites and on the newsgroups and have come up with NOTHING. Maybe one of us may know the answer or maybe one day someone will see this posting on a search engine and come up with the answer.

So this thread COULD become quite big, so I will prune it where necessary to ensure only Questions and Answers are shown, feel free to add anything. As I say I will tidy it up as the need arises.

Get Color Depth

Forum Admin
Needless to say I have a problem…

I’ve managed to write my software with the need for only one API. Which infuriates me. Therefore I’m looking for a workaround.

My problem is that I draw my splash screens using System.Drawing. When a system uses 16 or 256 colors (colours) I use slightly different colours. The only way round this I’ve found is to use an API, apparently MS forgot to add this functionality to .Net.

Another idea I’ve had is to have a small image with all 32bit colors in it. Then calculate how many colors the system can handle.

Any Ideas?

However it occurs to me that there is at least one (possibly more) source which will be available to all platforms. Using Javascript. But that will no doubt cause a problem with virus software.

Apple Macs and APIs

Zaphekiah
I don’t have an answer to this, but another question…

I am really looking forward to seeing a version of the .NET Framework for Macs come out, at which point I will probably go out and buy one just to try and get my programs working on it.

I have also got a few APIs that I have not been able to cover using native methods. I know that when the day comes I will have to give these APIs up.

But there are other things I am not so sure about. An example is when you send and receive windows messages. Are message handles platform specific? For example, on a few of my apps I use very customised forms, using graphic skins and with no caption bar to move the form around the screen. In these cases I use code like this to move the form around:

Message MyMessage = Message.Create((IntPtr)this.Handle, WM_NCLBUTTONDOWN, wParam, hParam);
this.WndProc(ref MyMessage);

this tells the form that someone has clicked on the caption bar and is dragging the form around, even though they actually clicked somewhere else. What I wonder is whether anything like this will be portable?

Going back to the colour thing, do you think a significant number of people have systems that can only deal with those reduced colour sets? I would be tempted to just cater for the vast majority.

OS Specfic DLLs

Forum Admin
I too have been keeping an eye on other platforms, I didn’t know there were Mac efforts. I’d only heard about the mono project, linux framework. Which I look at from time to time.

Might be cheaper looking at mono, download RedHat etc.
Although I’m not sure whether it’s finished yet.

I’ve been setting up a separate DLL with API calls, with the intension that all I’d need to do if provide a different DLL for different platform.

Apart from the Windows messages, there things like MDAC and SQL Server. Although you would probably have a separate SQL server from your desktop / web server.

Thinking about the browser control, don’t MS IE for Linux & Mac. If so the SHDOCVW DLL would be available.

With my dotnet experience so far, I thought it was just wishful thinking (having other FX platform versions) but I guess MS would have left it fairly open.

Further investigation definitely required. Sounds like a big topic!

Page by Mail

Forum Admin
I’d like to have a button, which would enable users to send a email attachment.

I started looking at MAILTO, but that doesn’t support attachments.

I have got a working example which uses MAILTO then uses sendkeys to add attachments. But this is confined to outlook.

I can create and EML file for Outlook express as the EML format is text based.

Or, I could write something using MAPI and have an email created and put in the outbox.

But, I’d rather have a blank email message pop up with the attachment added, so the user can write a message and put in the subject and the recipient address.

What I can’t understand is that, this is a feature of IE, but it isn’t provided in SHDOCVW or MSHTML.

I’m beginning to think the only solution, is to somehow read in the default email program, then do something different for every email client under the sun.

Has anyone found a solution for this?

Word Wrap RTF / RictTextBox Tables

mindwarpltd
There seems to be a bug in the RichTextBox Control, which stops text from wrapping in tables.

If you produce a table in word, add some text to a cell, enough for it to wrap round, then you paste it into wordpad its fine.

If you paste / load the table / file into a rich text box it doesn’t wrap.

Therefore the bug, is in the interpretation of the RTF spec by the rich text control. Which seems odd, as wordpad is suppose to use this control, I thought.

I know the next problem after this would be to provide a means where tables can be resized. But I thought i’d provide a table properties dialog with a combo for the column, then plus and negative buttons. Also, a colour selection for the border.

But, without being able to wrap a column, it doesn’t seem point adding a tables feature to a richtextbox.

Anyways, if anyone has a workaround I’d be glad to hear about it.

High quality fashion jewellery at a reasonable price!

by JM