|
thanks for answer.
But some times some users want to be source code so they choose open source program. For example goverment change OS system which is windows to linux after 2000 in Germany. It's related about security criteria. I know windows different than c# )) I want to point this is not licence ( in this case licence using for funds concerns) problem.
Thanks for interest and relevance,
Best Regards...
|
|
|
|
|
dataminers wrote: users want to be source code so they choose open source program
We wanted the sourcecode for our spellchecker. It's not open-source, but the company sold us the sources for a fair price. That's proprietary software, and we are not allowed to sell the source
dataminers wrote: It's related about security criteria.
That was related to politics. The EU doesn't want to depend on an American company, especially since most companies have a limited lifespan. Other reasons include politics
dataminers wrote: I want to point this is not licence ( in this case licence using for funds concerns) problem.
True, it's not about the price of Windows, since the TCO of a Linux-machine (for Desktop use, with Office) is comparable.
I are troll
|
|
|
|
|
.Net source code, as you know, can be viewed - including most of the stuff in the framework. It is NOT open source, Microsoft decided to release some of it in readonly format.
There is no guarentee that they will continue to do this with future versions of the framework, or that future versions will be able to be decompiled with reflector, or any other tool.
They currently produce 'free' express versions (a few minor limitations for every day users) of each language. Again, they may not do this in future.
If you want to work with an open source version of .NET, then you should use Mono[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
dataminers wrote: Thus it became open source, will you?
No. I will not become open source, will you?
|
|
|
|
|
led mike wrote: I will not become open source
Too late - I've already downloaded and modified a version of you under the Creative Commons license.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
thankfully I had just swallowed my coffee before that email loaded.
|
|
|
|
|
Could you explain open source basically?
|
|
|
|
|
There you go[^]. Float your boat.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
How interesting . I didn't know it so far
|
|
|
|
|
Hi
I've written a little app that uses FileSystemWatcher to wait for a new *.jpg file to be written to a folder, then loads the image into the picture box.
It works perfectly for the first file, but subsequent files fail with a message about "invalid parameter".
Oddly, this consistantly fails like this EXCEPT when debugging and stepping through the code where it works for about 5 files before it blows up.
This is the relevant code:-
pictureBox1.WaitOnLoad = true;
Bitmap bmp = new Bitmap(e.FullPath);
pictureBox1.Image = bmp;
Any ideas? I've tried putting .dispose() statements all over the place but that makes no difference. I've run out of ideas now.
It does seem strange to me that you have to tell it the file is a bitmap when it's actually a jpg file, but I don't know of any other way to "attach" to image file to the control. Could this be what's causing the error?
btw I'm fairly new to C# although I'm a long-term VB6 mug, so this could well be me getting hold of the wrong end of the stick
Cheers
Sam
|
|
|
|
|
It could be caused by the file still being written to the disk. The FSW fires it's event when the file is created, not when the app writing the file is done writing it. So, try to open the file DenyShareAll, and if it fails, Sleep for a second, then try again. If the file opens, then you can safely create a Bitmap object from the filestream, close the file, then assign the bitmap to the PictureBox's Image property.
|
|
|
|
|
Ahh, of course. Now you've said that, it's obvious why it worked when when stepping through the code as opposed to running... I was slow enough to allow the file write to complete before going onto the next step.
Not sure how to create a bitmap from the filesteam as you've suggested but I'll think around that. In the meantime I worked around it by looping-and-sleeping until the filestream opened, then closed the filestream and created the bitmap directly from the file (if you know what I mean).
Anyway thanks for the prompt.
Sam
|
|
|
|
|
Hello everyone
Hope you all well. So I am a newbie to the world of programming and I am loving it of course - who wouldnt!
I wonder if anyone out there can help me with app that i would like to write for myself in C#. I work with a lot of emails, and I need to respons to the clients via emails and projects that need be completed. (I know there stuff you could buy for this but hey why be a programmer and buy??)
Anyway I just need some advice and a push in the rigt drection how to do it, so here goes:
Basic start up app, gives me completed tasks for the week, and those that I should try to get to today. Those I didnt finish of I can click a button and send a 'sorry' email to the client. I would like the app to pop up on starting up - no excuses of oops forgot to open my outlook. I tend to do that... :/
Anyway love the site and hope to be as brilliant as all of you in the near future!
Live Brave!
|
|
|
|
|
geoNeo_ wrote: So I am a newbie to the world of programming
How much so? because you may want to start somewhere more basic. But you will want to look at some of the following
Databases
DataGridView or simliar control
Event Handlers
Notification Icons
Timers
And some sort of email API or you can talk to outlook yourself
etc...
geoNeo_ wrote: Those I didnt finish of I can click a button and send a 'sorry' email to the client
I assume you dont rely on recommendations or repeat business to keep your job going then
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hey
Well newish - all the components I understand and more less how to use them, what I sort of dont really know is what commands to use or how actually go about it.
I mean for example wat units to use, how the I/O is utlised or joined onto the local machines email program stuff like that.
Thanks for your prompt reply, is just something I really like to take on as my firts full fledged app.
Your help is greatly appreciated
|
|
|
|
|
Hi All,
I'm trying to chenge the color of my ProgressBar without building a new component from scratch.
I tried inheriting from System.Windows.Forms.ProgressBar and use the code below (which I found in several forums), but it's not working (if relevant, I'm working on vista 64).
Any ideas?
class MyProgressBar : ProgressBar
{
[DllImport("User32.Dll")]
public static extern int SendMessage(int hwnd, int wMsg, int wParam, int lParam);
public const int PBM_SETBKCOLOR = 0x2001;
public const int PBM_SETBARCOLOR = 0x409;
public void SetProgressBackColor(Color c)
{ int a = Convert.ToInt32(c.R.ToString());
int b = Convert.ToInt32(c.G.ToString());
int d = Convert.ToInt32(c.B.ToString());
int tot = Convert.ToInt32(ColorTranslator.ToOle(Color.FromArgb(a, b, d)).ToString());
int j = this.Handle.ToInt32();
SendMessage(j, PBM_SETBKCOLOR, 0, tot);
}
public void SetProgressForeColor(Color c)
{ int a = Convert.ToInt32(c.R.ToString());
int b = Convert.ToInt32(c.G.ToString());
int d = Convert.ToInt32(c.B.ToString());
int tot = Convert.ToInt32(ColorTranslator.ToOle(Color.FromArgb(a, b, d)).ToString());
int j = this.Handle.ToInt32();
SendMessage(j, PBM_SETBARCOLOR, 0, tot);
}
}
Thanks!
|
|
|
|
|
eyalbi007 wrote: int a = Convert.ToInt32(c.R.ToString());
Seriously, why would you do that? Its effect is equivalent to that of int a = c.R; , but a lot slower.
Oh and your SendMessage signature is incorrect.
Use:
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
static extern IntPtr SendMessage(IntPtr hWnd, Int32 Msg, IntPtr wParam, IntPtr lParam);
|
|
|
|
|
I think this would be the best option...
int a = (int)Double.Parse(Convert.ToInt32(c.R.ToString())).ToString();
... Actually that mind need a little work still (wheres the 'ive wet myself with laughter' smiley???)
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Give me a break, it's just a code I copied fom the web...
|
|
|
|
|
Well, change it..
It needs to be changed anyhow, because of the required IntPtr's. They are actually required here because you trying to run it in 64 bit mode which is expecting 64 bit arguments and you're passing 32 bit ones.
I wouldn't trust such badly written code at all
|
|
|
|
|
Well, still not working...
|
|
|
|
|
Well, show us the codez.. and tell us what it's doing (if anything)
|
|
|
|
|
Here's the code (that indeed does nothing).
What I was hopint it'll do is paint the prorgesss bar in different color than green (the Windows default color), by pressing button2. button1 simply advances the bar.
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern int SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
public const Int32 PBM_SETBKCOLOR = 0x2001;
public const Int32 PBM_SETBARCOLOR = 0x0409;
public void SetProgressBackColor(Color c)
{ int a = c.R;
int b = c.G;
int d = c.B;
int tot = ColorTranslator.ToOle(Color.FromArgb(a, b, d));
IntPtr j = this.progressBar1.Handle;
SendMessage(j, PBM_SETBKCOLOR, 0, tot);
}
public void SetProgressForeColor(Color c)
{ int a = c.R;
int b = c.G;
int d = c.B;
int tot = ColorTranslator.ToOle(Color.FromArgb(a, b, d));
IntPtr j = this.progressBar1.Handle;
SendMessage(j, PBM_SETBKCOLOR, 0, tot);
}
private void button1_Click(object sender, EventArgs e)
{
this.progressBar1.Minimum = 1;
this.progressBar1.Maximum = 10000;
this.progressBar1.Step = 1;
this.progressBar1.Value = 1;
for (int i = progressBar1.Minimum; i <= progressBar1.Maximum; i++)
{
progressBar1.PerformStep();
}
}
private void button2_Click(object sender, EventArgs e)
{
SetProgressBackColor(System.Drawing.Color.BlueViolet);
SetProgressForeColor(System.Drawing.Color.Red);
}
|
|
|
|
|
Well for one thing, the SendMessage signature still isn't correct. You absolutely have to use those annoying IntPtr's otherwise it won't work.
But then there's something else, I once heard (not sure how true it is) that progress bars in Vista may only be green yellow or red and that they have a special (different) message to change it. May be worth investigating.
|
|
|
|
|
Just make your own control, you can prob do in less code then you using to change it lol
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|