-
- Alternative to command line args?
by Matt Wennerlund
- 8 Replies
- Last post
by OmegaMan
- I've built a small app (C# .Net 2.x) that will take the files I drop onto it from Windows Explorer, concatenate them, and save the combined file in a specific location. It works fine for up to 38ish files, but when I go beyond that number I receive an error: "Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item"
-
- Aborting FileSystem.CopyFile or File.Copy method
by J Andrews
- 6 Replies
- Last post
by J Andrews
- Hi all, I am copying a large file in a thread. When the file is being copied, I display a form which has a cancel button. Using this, the user can cancel this file copy operation. I am calling Thread.Abort on this thread. I wait until the ThreadState changes from AbortRequested to Stopped. I am observing that the copy operation is not really being cancelled. After the file copying is done, the Thr
-
- Extracting PRINTER_NOTIFY_INFO_DATA Problem
by ehabhassan
- 1 Replies
- Last post
by Martin Xie - MSFT
- Hi, i'm trying to catch the printer notification using the winspool.drv, my problem is how can i extract the PRINTER_NOTIFY_INFO_DATA from the resulting PRINTER_NOTIFY_INFO, by the way the count of the PRINTER_NOTIFY_INFO is (70015864140) and the Flags is (30399774226120704): //-------------------------- [DllImport("winspool.drv", EntryPoint = "OpenPrinterA", SetLastError = t
-
- Object reference not set to an instance of object
by bslim
- 3 Replies
- Last post
by Michael J. Brown
- Hi all,
I had created an array of labels and intend to add it to a panel.
But I am receiving the above error once I compile it.
Can anyone please explain Thanks
for ( int nodes = 0; nodes < op_node.Count; nodes++)
{
op_node_name[nodes] = op_node[nodes].Name;
Label [] lbl_arr = new Label [op_node.Count];
lbl_arr[nodes].Text = "Sample Label"
-
- Struct pointer to unmanaged code - exceptions generated
by Jerome Guilmette
- 5 Replies
- Last post
by OmegaMan
- Hi I'm importing in my C# program an unmanaged dll containing C functions. One of those functions needs a structure as an argument. This function gets a structure that has been sent on the network. The function was first designed to pass char*, so I used unsafe environment to pass my structure. Everything my code first works except that I got two exceptions coming out everytime the GetMsg functio
-
- Cursor Class
by Progman_6
- 14 Replies
- Last post
by Peter Ritchie
- I've just started learning C# after developing in C++ for the last 6 years. I've created a class to handle setting cursors while executing other code and then setting it back afterwords. I would like some feedback on this, am I doing anything dangerous or are there side effects this has that aren't obvious. Here is the code. class MyCursor : IDisposable { private bool m_disposed = false; p
-
- WH_MOUSE_LL in a Windows Service
by Traps
- 6 Replies
- Last post
by Traps
- This has been really bugging me. I figured I'd give c# forum a go, and see if anyone has any ideas.
I'm trying to implement a WH_MOUSE_LL hook in a Windows Service. My hook installs fine (i.e. returns a value greater than 0), however, my callback function is never called. All the code to install/uninstall/callback the hook is in a class in its own code file within its own namespace. I call
-
- Programmly close screensaver.
by _Megaman_
- 10 Replies
- Last post
by sirjis
- Hi,
I need my application to be able to close the screensaver on some events.
Once in a while my application receives a message and are supposed to display a message to human users. The problem is that some client computers have screensavers running when the message arrives and I need the application to close the screensaver so the users can be notified (by screen).
-
- if File size exceed
by Watashi_me
- 11 Replies
- Last post
by Watashi_me
- Hello, In my code, i am writing binary data to a file. Is there any event to notify the file size exceed error. In other words what will happen if the file size exceeds while writing to a file. If i want to create a new file when file size exceeds should i catch the error or is there any other method. Thanks in advance. Cheers.
-
- Username / Password storage
by MichaelGoldsmith
- 4 Replies
- Last post
by MichaelGoldsmith
- Hello all
I'm running a webservice which references dll's to control connections to a database. The webservice holds the usernames and passwords for connecting to another application and these are passed to the dll methods to establish the connection.
My current solution is to store strings of users names and passwords seperated by commas ( , ) in the AppSettings then when my connect method
-
- Debugging feature...
by Katzs
- 1 Replies
- Last post
by Katzs
- I was debugging a program just a second ago and there was this section at the bottom that showed the values of every single variable in the program at the point at which my program threw an exception. I detatched it from the bottom to look at it side-by-side with the code, and next time I debugged, it wasn't there, and I don't know what it's called or how to get it back... Any help
-
- Macro Tool - assigning text to windows fucntion keys..how?
by Puzzl3b0x
- 1 Replies
- Last post
by Brendan Grant
- Hello all:
I'm new to C# and programming in gereral. I'm trying to create a macro tool, that will display text when a key is pressed. In other words, I'm trying to figure out how to change windows functionallity for keys.
For example:
If the <key> is pressed (say 'F1'), I would like the text "asdf" to show up in a browser or messenger or something. I tried to find a soluti
-
- Reference issue
by DHooper
- 10 Replies
- Last post
by DHooper
- heres an example, i have four objects: Object start; Object mid1= start; Object end; Object mid2 = end; using mid1 and mid2, how do i make start and end reference the same thing(ie, when i change start, end changes also) is this even possible simply setting mid1 = mid2 does not work as it removes mid1's previous reference, essentially setting up this relationship: start=mid1=mid2 end(unrelated) a
-
- How to use c # to write shrinking algorithm?
by walking fish
- 14 Replies
- Last post
by walking fish
- Algorithm use c # language is described shrinking
Can write the code example
thanks
-
- Getting path of the folder which is currently open in explorer window.
by Utkarsh Shigihalli
- 2 Replies
- Last post
by OmegaMan
- Hi all, I open a folder in explorer window (without folder tree on left side) by double clicking it. It opens a new folder in a new window or in a same window depending on the settings on your system. I want to know how to get path of the folder currently open in explorer. It is like you have system monitor, which logs all the folders you have opened recently. Kindly let me know how. Utkarsh,
-
- IDE freezes for 5-10 seconds when saving a file
by Digero
- 6 Replies
- Last post
by aliostad
- I recently replaced my motherboard, and since then saving files in Visual Studio "freezes" the IDE for 5-10+ seconds. It displays the animating save icon in the status bar, but doesn't respond to keyboard or mouse input, and doesn't repaint if I move another window over it, until the save is done. This also happens every 5 minutes when Visual Studio auto-saves recovery information. I'm n
-
- How to re-use my assemblies
by xr280xr
- 4 Replies
- Last post
by xr280xr
- Hi, I've got an application designed (by someone else) to be able to totally diconnect the front end from the business logic and database layers. The idea being that I can do a win forms front end for one department, a asp.net front end for another department and use the same data classes and database IO classes on the back. So currently it only has a win forms application running off of it. That
-
- How to find which week we are in ?
by thukralz
- 2 Replies
- Last post
by .NETPhreak
- Hello,
How can we find out which week or Year we are in now
Is there any function to achieve that ...
Thanks
-
- how can I import Framework 2.0 into the MS Visual Studio.NET 2003?
by john wen
- 4 Replies
- Last post
by john wen
- Hello Originally, the MS visual Studio.NET 2003 works with the .NET Framework 1.1 . But I have downloaded Framework 2.0 from the Internet. Now can I use MS Visual Studio .NET 2003 to access Framework 2.0 And how Please help John Wen 4 - July - 07
-
- Clearing large arrays from memory
by automaton1234
- 6 Replies
- Last post
by automaton1234
- In this short example, I allocate a large array in memory and then clear the local reference immediately: private void btnClick(object sender, EventArgs e) { int[] an = new int[8192 * 8192]; // 256 Mb an = null; GC.Collect(); } I understand that GC.Collect doesn't immediately free the memory, but I would expect the memory usage in Task Manager to eventually return to a
-
- Creating .EXE?
by Robert F.
- 1 Replies
- Last post
by Mark Dawson
- Stupid question time. I'm totally new to C# and .NET and I just want to create a .EXE file that does the following. First, there won't be any user interaction. I just need for the executable to FTP a file, parse it, and send an email based on what it finds. I'll also want to schedule the file to be executed with the atrun command. I can figure out how to perform each of those functions but how doe
-
- How to create windows service as installable product
by GovardhanReddy
- 1 Replies
- Last post
by Figo Fei - MSFT
- Hi
I want somw help on windows service
I am creating a windows service ,I want to make it as a installable product,Once I download this windows service from Internet it has to start installing this service into the local machine.
How I can do this
Plz help me
Regards
Reddy
-
- Problem with if and else statements within a For Looop. Error CS0201
by don06van
- 8 Replies
- Last post
by micvos
- Hi I've been developing a Queue for customers. The user can enter the customer's information into text inputs and add them to the queue, the user can also remove customers from the queue which is where im having problems. I've created array's for all my customers informations and then when they "add to queue" i add it to the datagrid table I have created in the form.
anyways for
-
- Back/Forward buttons
by braderz31
- 5 Replies
- Last post
by decyclone
- Hi,
Does anybody know how to toolstrip buttons work as back and forward buttons
(I already have the buttons i just need to know to make them work as web browser buttons!)
-
- Macrosubtsitution in C#
by Dactilifera
- 1 Replies
- Last post
by Martin Xie - MSFT
- Hy! I'm new at .Net. I've developed at Visual FoxPro since now. In VFP exists "&" - macrosubtsitution. Does macrosubtsitution exist in C# Thank you.