142 Posted Topics
Re: I'm not sure I truly understand the question but .NET provides classes in the System.Diagnostics namespace that can be used to start external processes such as Adobe Reader (acrord32.exe) which can be used to load and print a PDF. | |
Re: [QUOTE=skp03;1778272]how to search a file in a external hard disk by using C#.Net please guide me with a code[/QUOTE] Some untested code listed below to help you get started... [CODE] private static void SearchForFiles(string path, string pattern, List<string> SearchResults) { foreach (string file in Directory.GetFiles(path, pattern)) { SearchResults.Add(file); } foreach … | |
Re: [QUOTE=Chuckleluck;1779100]Can someone give me some resources (books, online tutorials, etc.) on algorithms for 2D collision detection? I've searched a little, and all the ones I can find are for 3D collision detection. Thanks in advance. EDIT: Just to clarify, I know [I]how[/I] to do collision detection, just not efficiently.[/QUOTE] [URL="http://www.amazon.com/Advanced-Game-Development-Jonathan-Harbour/dp/1598633422"]Advanced … | |
Re: By default, services aren't allowed to create user interface elements. You can enable this by going to Services in Control Panel and viewing the Properties for your service. Go to the Log On tab and check "Allow service to interact with desktop". | |
Re: [QUOTE=Tygawr;1780148]Okay I've finished reading [URL="http://www.fileformat.info/info/unicode/utf8.htm"]this[/URL]. But I still don't quite understand how to read and write a UTF-8 file.[/QUOTE] Well, from a C perspective,you could open the file and use the standard fgets function to read a line. Once a line is read in, you would convert the UTF8 to … | |
Re: [QUOTE=pseudorandom21;1779495]Trying to connect to my own machine: Client (exception thrown, target machine actively refused it): [code] using System; using System.Collections.Generic; using System.Text; using System.Net; using System.Net.Sockets; namespace CS_LAN_Client { class Program { static void Main(string[] args) { TcpClient client = new TcpClient(); IPEndPoint ep = new IPEndPoint( IPAddress.Loopback, 0); client.Connect(ep); … | |
Re: [QUOTE=MetallicKaiser;1778129]Hey forum, I'm very new to C++, and I need some help. I'm currently having trouble trying to write a Caesar cipher in C++. So far, I'm able to get it to read characters from a text file, and let it count the # each letter appears in an array. … | |
Re: [QUOTE=vyrte;1778383]i'm writing a program in c++ using linux and i face the following issue: i want to tell the difference between a hard link and a file,given a path. To be more specific, i consider that it is the file itself when there's only one hard link pointing to the … | |
Re: [QUOTE=gogs85;1776034]Please, how to insert text in field in an existing PDF form template and print????[/QUOTE] You may want to check out [URL="http://sourceforge.net/projects/itextsharp/"]iTextSharp[/URL]. A good starting point would to be to check out the ColumnText class. | |
Re: [URL="http://www.mikesdotnetting.com/Article/79/Import-Data-From-Excel-to-Access-with-ASP.NET"]Here's a starting point[/URL] | |
Re: [QUOTE=zur1ch;1774854]So i am making a piece of program In C but i cant get to check the system time and execute IF the time is equal to the systems time. in Plain english this is what my program is supposed to do. # # LIBRARIES # 1. Check the system … | |
Re: [QUOTE=Kycas;1773018]Hi, I want to filter .BMP image with 3x3 digit matrix. Basicly it is multiplying image pixels by numbers in matrix. Any suggestions how it should be done? I know that i have to open a file using fopen() I did that. Should I just loop through whole image and … | |
Re: Looks like your problem is that you're not checking the range of the x any y variables that are used as input to Color.FromArgb call. They should be in the range of 0 to 255. You're correctly checking the range of the g variable. | |
Re: The title of your thread is [B][COLOR="Red"]Double[/COLOR][/B]-Declining balance method of depreciation. The keyword is [COLOR="Red"][B]DOUBLE[/B][/COLOR]. This method of depreciation requires an annual [COLOR="Red"][B]accelerated[/B][/COLOR] interest rate. Thus, based on your title, how would you modify your annual interest rate? | |
Re: Create a KeyPressEventArgs event handler and process the KeyChar property [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.keypresseventargs.aspx"]http://msdn.microsoft.com/en-us/library/system.windows.forms.keypresseventargs.aspx[/URL] | |
Re: You have to allocate a native buffer for the characters by using the Marshall StringToHGlobalAnsi method. This method allocates and fills a native memory buffer with a null terminated ANSI string initialized from a managed string. Then you can copy this data to something like a STL string. Finally, free … | |
Re: [QUOTE=sachintha81;1765362]I am trying to extract all the images in a PDF and then convert them into DIB format using an Acrobat plugin. First part is easy. I extract all the contents in the PDF, then iterate through them and whenever I find a PDEImage, I put them in an array. … | |
Re: You have to handle the WM_DEVICECHANGE message in the window procedure of the application. The WPARAM will be the device change event such as DBT_DEVICEARRIVAL or DBT_DEVICEREMOVECOMPLETE. LPARAM is a pointer to the device broadcast header. You can detect the device type which is stored in the dbch_devicetype member of … | |
Re: [QUOTE=spikeyMikey737;1765287]I am trying to create an if statement that when the user releases the left mouse button it will write that out to a text file. I have tried multiple different scenario's and have had no luck, here is some of what I have tried. Thanks for your help! [CODE]if(mouse_event … | |
Re: [QUOTE=s_s21;1762890]Hi, I need to connect to a VGA (or other video computer output) using c# to send out image, Does anyone know how to do it?[/QUOTE] I really don't understand what you're trying to do here. Are you implementing some type of dual monitor setup where you want to send … | |
Re: [QUOTE]error C2664: 'GetPrivateProfileIntW' : cannot convert parameter 1 from 'const char [9]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast [/QUOTE] You are passing a character array to a LPCWSTR which is a double byte character array. You will have to either … | |
Re: The following link has an an example to get the remote computer NetBios name.. [URL="http://msdn.microsoft.com/en-us/library/sbetxfzt.aspx"]http://msdn.microsoft.com/en-us/library/sbetxfzt.aspx[/URL] | |
Re: [QUOTE]Is there an external address within the struct sockaddr_in somewhere?[/QUOTE] Nope. You have two options: 1. Routers use a web interface and/or telnet for admin purposes. Thus, you may try to read the external IP address from that. 2. Otherwise, you'll have to use an internet resource such as [url]www.whatsmyip.com[/url] … | |
Re: An example of my interpretation of your request is to convert 3.141593 to a hex value of DB 0F 49 40. If my interpretation of your problem is correct, you have to use a union structure containing your float and a byte array (unsigned char). Iterate thru this union and … | |
Re: Is this what you want to do? [CODE]using System; using System.Windows.Forms; namespace TestForm { public class Form1 : Form { public Form1() { // Keep it from showing up in Alt-Tab this.FormBorderStyle = FormBorderStyle.FixedToolWindow; this.ShowInTaskbar = false; // Set start position to manual and position the window off the screen … | |
Re: Probably because your input text file doesn't have a space delimiter between each field as indicated by the statement below from your first source code file which creates this input text file: [CODE]fprintf(cfPtr,"%d%s%.2f\n",account,name,balance);[/CODE] Try using this statement in your first source code file: [CODE]fprintf(cfPtr,"%d %s %.2f\n",account,name,balance);[/CODE] | |
Re: DateTimePicker can't be set to null because DateTime cannot be null. One possible option is to create a custom DateTimePicker control which inherits from the stock DateTimePicker control. The Format and CustomFormatProperties cannot be used from the stock DatetimePicker control. Thus, you'll have to create new properties which will be … | |
Re: Again referencing MS Windows Internals 5th edition, page 990 [QUOTE]The default FEK encryption algorithm is AES The Windows AES algorithm uses 256- bit keys Use of 3DES allows access to larger sized keys, so if you require greater key strength you can enable 3DES encryption in one of two ways: … | |
Re: [QUOTE]when i try to put an XP cards.dll file into the system32 folder nothing happens [/QUOTE] I believe references to System32 get redirected when running 32 bit apps to the SysWow64 folder. Try putting your cards.dll in the SysWow64 folder. | |
Re: The solution to your problem is to use the memcmp function as a comparison of your structures. I do realize that this is somewhat of an unorthodox solution. But it does work. I did put together some proof of concept code to verify that it does in fact work. Unfortunately, … | |
Re: It appears as if you're not properly splitting up your input when the input is greater than 9 at the following code: [CODE]r=new int[n]; for(i=0 ; y >= 16 ; ++i) { r[i]=y%16; y /= 16; } r[i++]=y; for(i=(n-1) ; i>=0 ; --i) { hex+=h[r[i]]; cout<<h[r[i]]; }[/CODE] I believe that … | |
Re: Try using the F11 (Step Into) key to start the debugger in single step mode. This will execute one statement at a time. Whereas F5 just continually executes all the statements until an exception is found. If no exceptions are found, F5 will just normally terminate the program and end … | |
Re: Why not open a socket to the web page , send a HTTP GET and use the recv function to receive the data from the web page and load the received data into a string? | |
Re: The Windows Internals 5 book has some extensive info on the "bootmgr" which would probably be of some help to you. The link to the book is below; [URL="http://technet.microsoft.com/en-us/sysinternals/bb963901"]http://technet.microsoft.com/en-us/sysinternals/bb963901[/URL] | |
Re: Just a shot in the dark on this one. But if you're using Wow64DisableWow64FsRedirection, it may be the source of your grief. It's rumored that this function breaks winsock. | |
Re: Can you use the MaskedTextBox class? [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx"]http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx[/URL] | |
Re: [QUOTE]please also help in sort function[/QUOTE] I believe you may be traversing past the end of your list in your sort function. Try the following modification in the sort function: [CODE] current=temp; // Past end of link [I][B]if(temp->next == NULL)[/B] [B]return 0;[/B][/I] temp=temp->next;[/CODE] | |
Re: [CODE]// Caesar Shift Encryption // character: Plaintext input // shift: Integer value of how far to shift right result = ( ( ( character - 65 ) + shift ) % 26 ) + 65 ;[/CODE] Hmmm... Interesting... What would the output be for a lower case letter such as … | |
Re: Wouldn't it be better to write the code that will pause/start the service instead of creating a CMD window and executing the console command to pause/start the service?. Here is a link for writing the code to pause/start a service: [URL="http://msdn.microsoft.com/en-us/library/windows/desktop/ms685942%28v=VS.85%29.aspx"]http://msdn.microsoft.com/en-us/library/windows/desktop/ms685942%28v=VS.85%29.aspx[/URL] | |
Re: The code listed below is from the website and has been modified to compile under Windows. Please note there are two files dtmf.c and detect.h [CODE]// Compile under Windows as Cl.exe dtmf.c /* * detect.c * This program will detect MF tones and normal * dtmf tones as well as … | |
Re: I'm assuming that you want to kill the parent process. In that case try the following: [CODE]#include <windows.h> #include <stdio.h> int main(void) { int retCode = 0; PROCESS_INFORMATION pi; /* filled in by CreateProcess */ STARTUPINFO si; /* startup info for the new process */ /* print out our process … | |
Re: [QUOTE]Now my problem so far is that I don't really know if and HOW I can make a list of wares that took more than 5 days to sell when dates are in string format, or should I use another version of program i made so far where I described … |
The End.