|
change "SqlDataReader myReader;" to "SqlDataReader myReader = null;"
and try again.
modified 27-May-14 5:30am.
|
|
|
|
|
Hai friends I am facing some problems while operating powerpoint using c# application. The problem is I was able to operate the powerpoint only when I am opening it or creating it by c# application. Does any of you have ideas on how to operate the powerpoint, which is already opened in the system.
|
|
|
|
|
vijay_varma86 wrote: Does any of you have ideas on how to operate the powerpoint, which is already opened in the system.
What do you mean by operating?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
OOPS! I mean moving the powerpoint slideshow back and forth
|
|
|
|
|
I am not sure that's possible. I know you can work with powerpoint using the office toolkit, in .NET, but I don't know if Office allows an external program to find instances already running, and control them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
This is the first time i've used a FileSystemWatcher, so i might well be doing something very basic wrong. The code below is what i use to start the FileSystemWatcher.
_fileSystemWatcher = new FileSystemWatcher(path, "*.sql");
_fileSystemWatcher.NotifyFilter = NotifyFilters.LastWrite;
_fileSystemWatcher.Created += new FileSystemEventHandler(FileSystemWatcher_Created);
_fileSystemWatcher.Error += new ErrorEventHandler(FileSystemWatcher_Error);
_fileSystemWatcher.EnableRaisingEvents = true;
But, i never seem to get an events raised. The path is set to the correct folder and i am creating files with an sql extension when my program runs, so i thought i would see some info.
I am running Win7, if thats any help...
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
I just try your code, it works if you remove the line with "NotifyFilter".
|
|
|
|
|
Cheers.
I changed it to "NotifyFilters.FileName", as i am only interested in new files being created.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Hi,
but filewatcher costs process overload.
why cant you try with API Hooking
you can track all the newly opened files and even you can block creating/edit/delete file activities.
unless i know the situation for what you are using filewatcher i cant suggest even hooking.
|
|
|
|
|
The app is going to be very small. All it does is watch a folder, if new files are created, alert the user and then the user runs something in the program.
At the moment it is using 11k of memory, so i dont think this is an issue. Its also an internal app, so i know what systems it will be run on, and they are fast.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
hi,
Ya fine ! you are correct,
i have given the situation where the file watcher is done for the entire system(all the logical and removable drives)
as you mentioned for watching one folder, it wont cost performance issues.
do proceed...!
|
|
|
|
|
hi guys,
I just came across a stupid "feature" of windows installer.
it can just create advertised shortcuts when installing your application which means, any file you delete for example gets "installed" again if you run your application by clicking on that advertised shortcut.
really wonder who gave their approval to crap like this ....but this is actually not my question.
first, I want to turn this "feature" off in my installation files. I learned this is not doable by visual studio 2008 itself, hence you have to download some sdk to do it? I havent figured out yet which steps are neccessary to do this.-.. is there an example out there how to do this?
and further and even more important, I need to change he advertised shortcut on existing installations into an non-advertised shortcut! -- is this doable and if yes, how? did somebody do this before?
thanks for suggestions
best regards
pirate
|
|
|
|
|
Piratenwichtl2000 wrote: I just came across a stupid "feature" of windows installer.
it can just create advertised shortcuts when installing your application which means, any file you delete for example gets "installed" again if you run your application by clicking on that advertised shortcut.
really wonder who gave their approval to crap like this
Actually, it's quite a useful feature when users screw up their applications for you. The next tiem they launch it, it repairs itself. It's also good for kicking off a process that needs to be run on a per-user basis, such as setting up a users profile for an application.
There is no way to turn this stuff off in the Setup and Deployment project in Visual Studio. You'ld have to use a third party MSI scripting tool, such as InnoSetup, Wise for Windows Installer, InstallShield, ..., to do this. Just take the shortcut out of the shortcuts table and add it back it as a file in the Files table. You'll, of course, have to make sure that the file ends up in the correct folder in the Directory table.
|
|
|
|
|
Hi Everyone, I am facing some kind of difficulty dealing with Microsoft Excel between version.
I am working on a program that open an excel file and write in it then close it.It works fine with excel 2007 version but giving me an exception with other version ( lower than 2007).
This is how I am creating the file.
Here my code:
Microsoft.Office.Interop.Excel.Workbooks workbooks = xl.Workbooks;<br />
Microsoft.Office.Interop.Excel.Workbook workbook = workbooks.Add(Microsoft.Office.Interop.Excel.XlWBATemplate.xlWBATWorksheet);<br />
workbook.SaveAs(System.Environment.GetEnvironmentVariable("AppData") + "\\TestFile.xls",Microsoft.Office.Interop.Excel.XlFileFormat.xlExcel8,<br />
Type.Missing,Type.Missing,Type.Missing,Type.Missing,Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,Type.Missing,Type.Missing,<br />
Type.Missing,Type.Missing,Type.Missing);
Thanks in Advance for your help
Jashim
|
|
|
|
|
First, use the formatting tags when posting code, it makes it more readable.
What version of the interop assemblies are you using? I believe Office 2007 uses version 12. For Excel 2000 you may need an earlier version.
only two letters away from being an asset
|
|
|
|
|
Hi Mark Nischalke,
Thanks for your response. I am using the intero assemblies 12.0 as you said.
But how do I make compatible for both version at the same time. For example, I am installing this program one computer that has Excel 2002 another 2000 and 2007. So, what should I do to work with all version, if I want to.
Note: sorry for not using code properly because I am kind of new with codeproject. Don't know how to do it.
thanks again,
Jashim
|
|
|
|
|
jashimu wrote: sorry for not using code properly because I am kind of new with codeproject
You were close, instead of using the 'inline code' as you did, use the 'code block'.
|
|
|
|
|
I would suggest using late binding. I had faced similar issues while working with Excel. You can use Type.GetTypeFromProgId and Activator.CreateInstance methods to create excel object and then invoke the methods.
PS: Not sure about method names. No Visual Studio in this computer.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi d@nish, I feel like I am not lucky because your computer doesn't have Visual Studio. Otherwise, I would ask you if you can be little more especific because I am not Expert yet. May be down the line I will not have to ask you details.
thanks for you respoonse.
Jashim
|
|
|
|
|
The code to get Excel through late binding is the following:
Type excelType = Type.GetTypeFromProgID("Excel.Application");
Excel.Application excelApp = Activator.CreateInstance(excelType) as Excel.Application;
Keep in mind that you could still get errors if you try to methods or parameters that are not available on older Excel versions.
|
|
|
|
|
bcp.exe blocked because some tables ware already involved in an other sqlTransaction
modified on Thursday, September 10, 2009 5:45 AM
|
|
|
|
|
Hello,
I have been working on a new project of a newtork game by this method:
http://www.codeproject.com/KB/game/eatergame.aspx
I have one server and one client. I am trying to add more than one client into the game but the server just ignores him. can someone explain me why?
|
|
|
|
|
Hi,
I guess the server is programmed for one remote client. Take a look at the server code to be sure. If you still have questions, you should ask the author of the article...
Regards
Sebastian
|
|
|
|
|
Hello,
I think you should check the code first, maybe there is some settings to control(Default settings), then you can modify them
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 22:01pm.
|
|
|
|
|
Hi All,
I am looking to develop a program that will map a network from a machine based on the number of hops from the workstation. However I need a starting point.
Am i going to have to find some way of sending/injecting a packet or are there special classes that have been created to do this.
Any reference code or articles would be greatly appreciated.
Apologies for the broad post but we all need to start somewhere!
Regards,
Deviao
|
|
|
|