|
Hi From Australia,
I Have a project that acesses an excel file that I have stored in the bin folder of my project. All I do is click a button and it opens excel - this works fine on the development computer but when I try it on other computers (Slightly Older) the file opens but is locked and read only saying that the file is already open. I can find the file through excel on the computer my program is installed on but not from my program. Any Ideas?
Fast Taxi
|
|
|
|
|
I'm confused. Does it open in a "locked and read only " state or is it that you can't find the file from your program? My guess is that your program is referencing one version of the Excel object on your development machine and the production machine has an older version installed. For example you may have Office 2003 installed on your dev machine (I believe its the Excel 11.0 object) while the production machine has Office 2000 (I think it is Excel 9.0 object). Check to see which version of excel is installed on each machine to see if they match.
"Half this game is ninety percent mental."
- Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
|
|
|
|
|
i am new at programming in Microsoft Visual Basic 2005 Express Edition.
i have a form (switchboard has multi button to ectain apps) which when i click a button it runs a .exe
(System.Diagnostics.Process.Start("C:\program files\World of Warcraft\WoW.exe")
it all works but i would like to able to put a button which adds apps whotout having to go in vb to edit.
i would also like to know how do i convert my .net v2 to be able to run on a pc without having to install .net v2 (windows xp and 2000)if possible
thanks Patrick
-- modified at 17:25 Sunday 11th December, 2005
|
|
|
|
|
patrick king wrote: i would also like to know how do i convert my .net v2 to be able to run on a pc without having to install .net v2 (windows xp and 2000)if possible
I can't understand why people keep asking this. If it wasn't required, why do you think you need to install it ? There are expensive ways of doing this, none that are cheap, free, or a good idea.
patrick king wrote: it all works but i would like to able to put a button which adds apps whotout having to go in vb to edit.
I guess you're saying you want to add buttons dynamically ? I would say the best way to do this is to add an XML config file which contains the paths to run and the button text you need, then iterate over it on startup and create buttons accordingly. A drop down list is a much better UI for this, no dynamic controls needed.
But why do you need an exe to do this ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
well i have made a form which has button on it which link to different .exe, but i want to be able to add more button when i need E.G. when i install a new game. without going in to Vb. i also want to know how to make this form once completed run when windows start up.
Thanks Patrick
|
|
|
|
|
patrick king wrote: i also want to know how to make this form once completed run when windows start up.
Place a shortcut to your EXE in the startup folder.
patrick king wrote: but i want to be able to add more button when i need E.G.
The best suggestion (without typing code here) is to tell you to take a look at the code that gets created when you add a control to a form in the designer. You have to do all the same stuff, just at run time.
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
Christian Graus wrote: If it wasn't required, why do you think you need to install it ?
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
Hello!
I need to show an image on a Form, and not on the designer, but from the code
itself...
How can I do it?
Thanks!
Have a nice day!
|
|
|
|
|
On the Form itself? You could use the BackgroundImage property.
VB.NET
Me.BackgroundImage = New Bitmap("filePath.bmp")
C#
this.BackgroundImage = new Bitmap("filePath.bmp");
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 19:46 Sunday 11th December, 2005
|
|
|
|
|
Managed C++:
this->BackgroundImage = new Bitmap("filePath.bmp");
C++/CLI:
this->BackgroundImage = gcnew Bitmap("filePath.bmp");
ps: I think you shoud use Namespace System::Drawing.
|
|
|
|
|
Say I have a project, a windows form project. In it I create one or more UserControl derived controls. I would think they automaticaly show up in the Toolbox, but apparently not. So how do I get them to show up? If i'm creating them within an EXE project (at least in VC++) I am unable to add teh EXE in the choose item when right clicking on the toolbox, so I'm wondering what the steps are to get the control on there in drag and drop fashion, without having to resort to hand coding it?
Thx.
|
|
|
|
|
I too had this same problem, but the Controls showed up after I compiled the app.
Simply Yuvi
Don't Argue with a Fool : People looking will not know the difference
|
|
|
|
|
Well, I've been trying to get the Size of a Folder with .NET without using Recursion. There dosn't seem to be any property for it and all my searches have given me only ways of getting them using Recursion, which I want to avoid at all costs. Any Advice, Guys ?
Simply Yuvi
Don't Argue with a Fool : People looking will not know the difference
|
|
|
|
|
The directory/folder structure itself is recursive and as far as I know there is no such information stored in any folder. Technically it could be done but if a file changes one should update this information of all the parent folders and that could make it quite expensive.
You could a tree structure containing this size information yourself and have it kept up to date by means of a service. Then you only need to ask that service for the size and you would have the answer immediately. But this is far more complex than the recursive algorithm. A unwanted side effect is that such service would take up CPU time and probably would decrease the performance of your disks. Do you have any requirement that ask for instantanious information?
If you just want to avoid recursion you could make an iterative directory walking algorithm but that would imply you should keep track on a stack where you have been. It might be a bit faster but it is harder to code.
regards,
rob tillaart
|
|
|
|
|
Thanks Rob.
But, Yes, My App does require Instantanious Information. It is something like (Treesize), but also adds that it can actually operate on the files and folders. And, Since it uses a Chart and by it's Very Nature, changes the information about directories often, it does need instantinous Information...
And, I suppose I'd be doing some benchmarks about the time required to get the size of them by Recursion and iteration, but I think that It'd take a lot of time, especially for rather big Folders like the Program Files folder....
Simply Yuvi
Don't Argue with a Fool : People looking will not know the difference
|
|
|
|
|
Well, I did run some tests, and it showed that it needs 1 minute 20 seconds to find the size of my primary partition, which is 13 gb full.... And, if i need to get the size of the Program Files Folder inside it, all the Files and Folders Sizes would be queried again! Sure, I could construct a Tree with the Folders and their Sizes, but i suppose there should be a better way....
Simply Yuvi
Don't Argue with a Fool : People looking will not know the difference
|
|
|
|
|
Hi Yuvi,
Two ideas:
1) Monitor 'hot' folders with an other frequency than 'cold' folders. The folder program files is big but does hardly change where the temp folder may be far more active.
2) Use WMI.
You can get all kind of events from the OS. Maybe you can subscribe to file (create append delete) events. Then you know where the changes are. I have no experience with it but check http://www.codeproject.com/csharp/WMIproviderGuide.asp[^]
for a good backgrounder.
regards,
rob
|
|
|
|
|
Thanks for the Ideas, Rob. Will Sure check WMI out....
Simply Yuvi
Don't Argue with a Fool : People looking will not know the difference
|
|
|
|
|
Hello!
I want to run another application from mine... How can I do it?
Thanks in advance!
|
|
|
|
|
Hi,
You do not state the language but in .NET you could use the Proces class and specific the start method. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdiagnosticsprocessclassstarttopic3.asp
for details or google: process class .NET
have faith,
rob
|
|
|
|
|
using this method Diagnostics.Process.Start(....)
<< >>
|
|
|
|
|
I create win32 service project, that creates Remoting service. After that win32 service running successfully, but remoting service doesn't work - I can't connect to it.
Also I must say, that in console programm this remoting service works well.
Is there anyone, who saw this problem? What is happening?
|
|
|
|
|
I have code that allows me to basically write the contents of a richtextbox to a bitmap (sending a EM_FORMATRANGE using SendMessage). This code works fine, but it always draws the text "normal size" regardless of the setting of ZoomFactor in the RichTextBox. How can I get the "zoomed" verison of the text into a bitmap?
Thanks in advance!
|
|
|
|
|
Hello, i'm doing sort of graphics editor.
I'm stunned with how to implement 2 things
a) draw a dotted line, or whatever not-solid
b) make a paint bucket tool - where i can fill closed curve, drawn with different primitives
|
|
|
|
|
hi all,
I would like to know whether windows application like c#.net be implemented using MVC Architecture.
Or any other architecture can be followed? if so please help me with sample of ur application.
hope i ll get help.
Regards,
Sarayu.
|
|
|
|