|
|
Hi Colin,
I read the link 2 months before, but I do not think it answers my specific question. In more precise, I do not think float has enough significand to represent 9 decimal digits, it has only 7.
Any comments?
regards,
George
|
|
|
|
|
Possibly the answer is here [^]:
By default, a Single value contains only 7 decimal digits of precision, although a maximum of 9 digits is maintained internally
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thanks CPallini,
Good to see you again. I am confused what means "internally" -- what debugger shows? Any definitions for the term?
regards,
George
|
|
|
|
|
Is that from the IEEE spec, or an artifact of x86 implementing 754 by keeping extra digits as the cheapest way to maintain the needed precision.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
When i call FolderBrowserDialog.ShowDialog() - i see that the FolderBrowserDialog appear in the right corner of the screen.
I want to control on the appear position of this Dialog - but i don't know how.
I want to set the position in the middle of the screen.
Thanks.
|
|
|
|
|
I have created a Bar chart. Where On x axis I need to show labels retrieved from database..
But as the no of labels from database increases, Bar chart started to drop some labels , and show only few .....
How to solve the proble... As I needed to take data dynamically to plot on Chart... Is it a sizing problem ?
My code snippet:
double[] y= { some data}
BarItem myBar = myPane.AddBar("Sales Analysis", Null,y ,Color.Red);
string[] x = {some labels }
myPane.XAxis.MajorTic.IsBetweenLabels = true;
myPane.XAxis.Scale.TextLabels = x;
myPane.XAxis.Type = AxisType.Text;
Any help would be appriciated.
Thanks.
|
|
|
|
|
Hi,
I am creating a meeting request using the smtpmail message and sending it through smtp client. It working fine for meeting invite and meeting update. But when I send a cancel meeting request it is going as an update meeting request on the lotus notes ( working fine with the outlook) instead of a cancellation of meeting request.
Please help me.
Thanks in Advance
Alok...
|
|
|
|
|
Hi,
Can you post or send an email of the code - how to send meeting request using smtpmail message and sending it through smtp client. Even i have same requirement in my project.
It is urgent so kindly send me as soon as possible.
Thanks in advance.
With Regards,
vmtv
|
|
|
|
|
Hi,
Can provide the code for doing this task. Thanks in advance
Mathew
|
|
|
|
|
Can you recommend a case study source for ASP.NET 3.5 and AJAX please?
I would like to start going through a sample project from start to finish with the mentioned skills.
Thanks
|
|
|
|
|
|
* knock * knock *
brain test.
nope, thought not.
|
|
|
|
|
Hi,
i've got a Dll and a Header in c
this is Function From The Header :
const char* __cdecl GetFieldDescription(const char* sFileName, short iMessageIndex, short iFieldIndex);
Ho do i Declare it using C# , i've Tried :
private static extern StringBuilder GetFieldDescription(string sFileName, short iMessageIndex, short iFieldIndex);
When I Call The Function I keep Getting an Exception:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Where Do I Go Wrong?
Have Fun
Never forget it
modified on Wednesday, June 18, 2008 7:03 AM
|
|
|
|
|
A few guesses: 1. When the function returns, it attempts to write the char*, which goes into a StringBuilder object, which is protected memory.
2. Ditto for the first parameter. Also string is not the same as char* for two reasons: a) char* uses 8-bit chars and C#'s string uses 16-bit chars, and b) C#'s string is preceded by an integer length. I think a C# string is the same as a C++ BSTR. There are C++/Microsoft functions for converting to/from a BSTR.
|
|
|
|
|
Thanks
Have Fun
Never forget it
|
|
|
|
|
Hello...
I'm using remoting function to connect between client and server.
Are there any possibilities to connect one client to many servers ?
If yes, are there any sample for that ?
Thx...
|
|
|
|
|
hi
I think its possible.if you use two different Sockets you can connect to two different Servers.
Regards
Joe
|
|
|
|
|
Hi,
This is embarassing to ask, but I just can't figure it out. Why is it that when I run my application by double-clicking the .exe from windows explorer, it will load but it will stay behind the windows explorer window?
I think the problem lies on the splash screen which I call from the Main Form's constructor. I am calling it here because the splash screen displays the progress of the application start-up ("Initializing components...", "Loading user settings...", etc.) at the bottom of the splash screen.
After this closes, I then do a this.Activate() or this.Focus() in the Main Form's constructor.
What is wrong? :-s
Rafferty
|
|
|
|
|
Post some more code.
How are your loading, showing and closing your splash screen?
What does the apps entry point look like? (The "static void Main()" bit in Program.cs. There should be a line that says something like "Application.Run(new YourForm());")
Simon
|
|
|
|
|
This is going to sound sarcastic but it's not meant to Have you tried the BringToFront method for the form?
|
|
|
|
|
Can you try with
this.WindowState = FormWindowState.Normal
Software - Bundle of bugs covered with features.
|
|
|
|
|
Hi all,
Thanks to everyone who replied. I tried calling this.BringToFront() in the MainForm's constructor and Load event but it still didn't work.
Here are some code:
Program.cs
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
MainForm.cs
public MainForm()
{
Splasher.Show(typeof (ProgressSplashForm));
Splasher.Status = "Initializing components...";
InitializeComponent();
Splasher.ProgressValue = 80;
ApplicationSession.Instance.PercentHoursBeforeAlert =
Properties.Settings.Default.PercentHoursBeforeAlert;
ApplicationSession.Instance.PercentHoursBeforeHighAlert =
Properties.Settings.Default.PercentHoursBeforeHighAlert;
Splasher.ProgressValue = 85;
ApplicationSession.Instance.DbManager = new MsAccessDbManager(Application.StartupPath);
RefreshAvailableFunctions(false);
Splasher.Status = "Initialization completed.";
Splasher.ProgressValue = 100;
Splasher.Close();
this.BringToFront();
this.Activate();
}
private void MainForm_Load(object sender, EventArgs e)
{
this.BringToFront();
this.Activate();
}
I also noticed that the this.IsHandleCreated and this.CanFocus properties are false in both the constructor and the load event.
*Note: The Splasher class is inspired by cncx's article[^] about splash screens. Sufficed to say, the Splasher.Show() method displays the splash screen by running a new application (Application.Run(_splashForm) ).
Any ideas?
Rafferty
|
|
|
|
|
I forgot, this is the sequence of events:
1. (Window explorer on top) Double-clicks the app.exe file.
2. Splash screen displays on top of windows explorer
3. Splash screen closes
4. Windows explorer activates ?!
5. Main form loads BEHIND the windows explorer, Main form does not activate (the focus is still on windows explorer).
Rafferty
|
|
|
|
|
There doesn't seem to be anything unusual in your code. There are some odd bits in that splasher article though.
1) In the close method the code just totally swallows up all exceptions. This is very bad. something maybe going wrong and you won't know about it. Put some code in here to do something. (At the very very least, write to a log file so you know something went wrong. Ideally, Display an error message and shutdown the application)
2) The article uses Application.Run to start a new message pump from inside a separate thread. Seems a bit weird, not sure what impact this will have. .ShowDialog may have been a better way of doing it. This creates a nested message pump. (Maybe there is no difference, I'm not sure about this)
3) It uses reflection to manage the splash screen. Again, bit weird, he knows it's a form, why not just use a form object. Don't think this has any real problems though, it's just a bit of an odd way of doing things.
Let me try the Splasher stuff out and I'll get back to you in a bit.
[Edit: Yes, I get exactly the same issue with that splasher article code...Hang on...]
[Edit 2: Think you just need to abandon this article's method. The problem is something to do with having two message pumps running. When the first closes, the focus returns to the explorer window, even if you ensure the main form is fully loaded and displayed before letting the first message pump stop. I played around with it a bit, but it always causes exactly the same issue.
The reason that all those active/bring to front methods don't work is because they all rely on an api call that was changed with windows XP. It was decided that applications should not be allowed to steal focus because it annoys the user if they are working on something else.
I would suggest reading this[^] article. It describes a technique of using a ApplicationContext object to load two forms. Ignore all the stuff in there about reading/writing the window state to disk. Just use the appcontext to show your splash screen, do your initialising, show your main form and close your splash screen.]
Simon
modified on Thursday, June 19, 2008 4:56 AM
|
|
|
|