|
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) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
This sounds as if it could be for something naughty.
But I don't care, today, so:
BitMap bm = new BitMap(1, 1);
bm.Save("C:\Windows\Temp\NefariousBitmap.bmp");
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks
I am needing this to prevent MS Access from bringing up it's splash screen when ms access loads.
Since you need to place a bmp file in the same directory as the mdb file with the file names being the same just the extensions different.
|
|
|
|
|
I have developed an application that works with xml files. I have allowed users to open an xml file with my application. This I have done using the Main(String [] args) function. But the problem is the application name is not being displayed along with the application icon when the user right-clicks and chooses "Open With" in windows explorer. Would I need to make any registry entries for this to happen, or is it something I can do within the application itself? I'm currently working with the Microsoft Visual Studio .NET 2003 IDE. Please help.
|
|
|
|
|
|
Thank you so much for your response. but is there a way to do this within my application? and not on registry
|
|
|
|
|
You can write to registry using C#. Please search it in MSDN.
|
|
|
|
|
OK... I have successfully written to registry, my application is assocciated with all xml files on the computer and by default my application opens when you double click on an xml file
However am still having the same problem. when you right click on an xml file and select the "Open With Menu" my application is listed with my application icon but my application name is blank...
How can I get the application name to display beside my application Icon On Open with menu?
could this be a setting on .Net?
Please Help........
|
|
|
|
|
Hi There,
I have a background worker thread on my Form.
In 'DoWork' A call is made from the thread to pump data out to Excel. The visible property of my Excel Application is set to false until 'RunWorkerCompleted' (there may be a lot of data and the users don't want to see it being churned out) when visible is set to true, I also use the .Activate method :
excelApplication.Visible = true;
((Microsoft.Office.Interop.Excel._Workbook)excelWorkbook).Activate();
Everything works fine except the Excel appears behind my form - not the front.. annoying .. in addition its only happening on my tester's machine (typical!) and not mine. It is the last code that executes.
excelApplication and
excelWorkbook are in a different class which I suspect is the root of the issue, also it needs to be inside the thread so the UI is not affected when the form is moved around and such like.
Any ideas?
Thanks very much
Jon
|
|
|
|
|
Hi there,
I don't see why you need the below call, just setting visibility to true works fine for me:
((Microsoft.Office.Interop.Excel._Workbook)excelWorkbook).Activate();
You are right that you should not have the application and workbook objects in different classes. I doubt that is causing the sheet to appear behind your form though.
Have you tried a simple send to back call on the form after you make the sheet visible?
Cheers,
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
|
|
|
|
|
Thanks Mark,
I will try the back call.
Sorry, was a rather vague there, my Application and Workbook objects are in the same class (Excel class) which is not in the Form class (obviously).
Thanks very much for the help,
Jon
|
|
|
|
|
|
Hi Everyone-
I have built a help-desk application that allows agents to create tickets with issues that our technicians are dispatched to resolve. Our company for the most part operates in three states. What I am looking to do, is have a section in the application that displays a map of our region, with the three states visible, with markers or pins on them.
The idea is a new call comes in with a problem in a city. The dispatcher can look at the map and see markers/pins of all of the technicians and where they currently are. The dispatcher can then make a determination "Steve is only 10 minutes away, lets send him after he is done with his current call".
I am wondering if anyone knows the best way to go about doing this for a C# Windows Forms application. I was tossing around the idea of having a browser window somehow interfacing with Google Maps to tell it the area I want to display along with the pin/marker information, but was wondering if any of you could point me in the right direction! I would really like to accomplish this without the need for a local web server if that is possible.
TIA!
|
|
|
|
|
If the PC is always online, the use WebBrowser control, open google maps, and put some coordinates in it. That is the easiest way.
|
|
|
|
|
That's exactly what I would like to do! I have been searching for a little while as to an easy way to open google with coordinates. Everything that I have found so far requires custom web pages with all of that jazz. Any suggestions as to easy way to add points/coords to google map from within a browser in C#?
|
|
|
|
|
|
Hi,
Can someone tell me a MODULO algorithm like google's, typical calculator's, excel's, etc?
Because, they all return 0 for:
4029800 mod 100
But C# (and java I think) return -10
|
|
|
|
|
4029800 % 100 gets 0 for me
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) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Quake2Player wrote:
But C# (and java I think) return -10
Could you show the code? That really isn't what should happen, not in Java either.
|
|
|
|
|
Your code is bad somewhere. For two positive integers, modulo is never negative.
|
|
|
|
|
Random r = new Random();
int key = r.Next(0, 10000);
int prime = r.Next(key, key * 999);
int a = r.Next(1, prime - 1);
int b = r.Next(0, prime - 1);
Console.WriteLine(key);
Console.WriteLine(prime);
Console.WriteLine(a);
Console.WriteLine(b);
Console.WriteLine( ((key*a + b)%prime) % 1000);
Console.ReadLine();
For example:
In google: (((8 568 * 4 974 445) + 2 820 002) % 7 661 773) % 1 000 = 563}
In c#: (((8 568 * 4 974 445) + 2 820 002) % 7 661 773) % 1 000 = -732
|
|
|
|
|
Quake2Player wrote: 8 568 * 4 974 445)
using 32-bit signed arithmetic (as in int) this results in an overflow, that is where the negative stuff is coming from. Nothing wrong with the modulo operator.
test: declare long variables, initialize them, and use those for your expression, instead of numeric constants. (decimal should work too).
|
|
|
|
|
Beat me to it!
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) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
|
It's because of the overflow in the first part of the calculation. Make one of the values a double and you get the correct result.
(((8568 * 4974445d) + 2820002) % 7661773) % 1000)
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) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|