Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
W

Weckmann

@Weckmann
About
Posts
11
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • using windows service to copy file through network(LAN)
    W Weckmann

    You need to install your service itself under a domain user account. This is done in the ServiceProcessInstaller, search for something like: this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.User; this.serviceProcessInstaller1.Username = "abcd@mydomain.com"; this.serviceProcessInstaller1.Password = "mypassword"; This would already be the working version. You probably have a ServiceAccount.System or something else. And null values as username and password. Try it this way.

    -------------------- Bertram Weckmann www.svizzer.com --------------------

    C# sysadmin question

  • Getting default PDF viewer
    W Weckmann

    You can use the Shell32 dll to get the executables for certain extensions... [DllImport("shell32.dll", EntryPoint="FindExecutable")] private static extern long FindExecutableA(string file, string directory, StringBuilder res); There is a nice tutorial somewhere in Codeproject if I remember right...

    -------------------- Bertram Weckmann www.svizzer.com --------------------

    C# tutorial question

  • Can't run windows service
    W Weckmann

    My experience with Windows services is that you have to login the service with a user account to use any network operations. So try to change this: //# Service Account Information serviceProcessInstaller.Account = ServiceAccount.LocalSystem; serviceProcessInstaller.Username = null; serviceProcessInstaller.Password = null; into: //# Service Account Information serviceProcessInstaller.Account = ServiceAccount.User; serviceProcessInstaller.Username = yourusername; serviceProcessInstaller.Password = yourpassword; With the correct values of course...

    -------------------- Bertram Weckmann www.svizzer.com --------------------

    C# csharp database asp-net com graphics

  • drag and drop issue...
    W Weckmann

    OK now Im trying to understand what you originally wanted. ;-) The AllowedEffect has to be set at the beginning of the drag/drop operation. Afterwards it is read-only. But nevertheless you can imitate the behaviour of Word: Start the drag/drop operation with the allowed effects Move AND Copy. Just fill the data in, but dont remove it yet from the source. Then just set all target controls to allow ONLY Move and design the DragDrop event handlers in a way that the data is actually moved, so remove it from the source. Now if the user drags it out of your application almost every other application will pick the copy effect because they dont have any drag/drop handler for a move operation from anything coming from somewhere else. And since you left the original data where it was at the beginning, everything done by other applications will be a copy operation. And there is your Word behaviour. Inside your application you have a Move, outside you have a Copy. Got you this time? ;-)

    -------------------- Bertram Weckmann www.svizzer.com --------------------

    C# help beta-testing question code-review

  • Getting Disk Drives
    W Weckmann

    I would put the listBox1.Items.Add... in a try/catch , because you probably are asking your DVD-drive to tell you the VolumeLabel and if there is no DVD in it you will get an exception.

    -------------------- Bertram Weckmann www.svizzer.com --------------------

    C# question

  • drag and drop issue...
    W Weckmann

    Well, when you start the dragdrop operation you can set the effects which are allowed. After that point it is up to the component over which the cursor is dragged which of these effects are shown. So if it is a component which does not belong to your application, you can only give it a set of effects and which of those will be chosen is up to the application. I made a very very simple example: http://g10.wilde-edv.de/PublicStuff/DragDropTest.zip There you can drag the Button1 to the text field or to the button2. I set the allowed effects to copy and move. The button2 only accepts move and the text field only copy. So the icon is changed to the appropriate effect as soon as you drag over the control. When you drag outside the form the other applications will pick either the copy or the move effect, or none if they do not accept the data. Hope that helps.

    -------------------- Bertram Weckmann www.svizzer.com --------------------

    C# help beta-testing question code-review

  • drag and drop issue...
    W Weckmann

    Almost every component has a few drag/drop events which can be used to switch the allowed effects. In your case you should use the DragLeave event to change the effect when the mouse leaves your form for example. As long as the mouse hovers somewhere in your application you can do whatever you want with the DragEnter and DragOver events of each component that is under the cursor. -------------------- Bertram Weckmann www.svizzer.com --------------------

    C# help beta-testing question code-review

  • ODBC - Getting table names ?
    W Weckmann

    Hello all, I want to get access to some databases which are registered in Windows with ODBC. I already managed to get the registered database names, files, servers... everything. What I am now missing is how I could get the table names of those databases?? I can open an OdbcConnection to any of those databases, but I cannot read anything out of them because I dont know the table names which are in those databases. So, how can I programmatically get the table names of a database where I already have an OdbcConnection successfully established and open? Thanks for any help. Best regards, Bertram Weckmann

    Database question database help

  • Problem with blocked file access
    W Weckmann

    Unfortunately I do not know what the DLL exactly does. But anyway, I already tried using the GC with no success. Even with the WaitForPendingFinalizers method. Even with the Marshal.ReleaseCOMObject method... Any other idea?

    C# question csharp com collaboration help

  • Problem with blocked file access
    W Weckmann

    Hello all, I am using a foreign dll to read some data out of a certain file. The problem is: This dll somehow doesn't release the file once you open it to read the content with the dll. So after reading the data out of a file it is blocked for write-access until I completely close my whole application. My question is: How can I release these files? What I already tried: - setting all involved objects null - calling the GC manually - simply waiting some time hoping that .NET will release the file Nothing helped. Any ideas? Best regards, Bertram Weckmann Development Team G10 Software AG www.svizzer.com

    C# question csharp com collaboration help

  • Getting properties of a MS Word file
    W Weckmann

    I want to read the properties of a MS Word file (like author, comments...) and I found two solutions: - by starting a word application class - by using the system32.dll The problem with the first solution is that it uses a lot of ressources and takes quiet a bit of time (you actually open up the whole MS Word Software only to get some properties). The problem with the second solution is that it doesnt work on Win2k or lower. It only works with WinXP or higher. The system32.dll of Win2k or below only gets the file size and creation dates and other properties but none of all those other MS Word specific properties. So can anyone give me a hint how to get those properties on Win2k without opening a word application? Thanks for any hints! Bertram Weckmann

    C# help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups