407 Posted Topics
Re: If you are using Visual Studio, I believe there are some project templates that aid in this. However, I have never used them. I have had some experience with office and Interop. You will have to add a reference to Microsoft.Office.Interop.Excel (with the correct assembly version; 12 I believe). [code=C#]using … ![]() | |
Re: The constructor of your derived class, should call the constructor like: [code=C#]public bcd(int bb) : base(bb) { }[/code] You can normally call a base class' methods as if they were the derived class' methods. However, if you override or hide a base class' method, you can call it like: [code=C#]base.AMethod()[/code]. | |
![]() | Re: Are you referring to the tab's header? If so, you can just use a StackPanel in the TabItem.Header: [code=XML]<TabItem.Header> <StackPanel Orientation="Horizontal"> <Path Data="M0,0 L1,0 1,1 0,1 z" Fill="#FF737374" Width="23" Height="23" Stretch="Fill"/> </StackPanel> </TabItem.Header>[/code] Unless you intend to utilize the DockPanel in the TabItem's Header, I would not recommend adding it. … ![]() |
Re: In addition to what can_surmeli said, you router will probably block incoming requests from outside the network. Have you enabled port forwarding to your Mac? | |
Re: The .NET Framework does not natively support USB devices. I have never worked in depth with USB devices, however you can try these links to get you started: [URL="http://www.developerfusion.com/article/84338/making-usb-c-friendly/"]http://www.developerfusion.com/article/84338/making-usb-c-friendly/[/URL] [URL="http://www.icsharpcode.net/opensource/sharpusblib/"]http://www.icsharpcode.net/opensource/sharpusblib/[/URL] Good luck. | |
Re: This is not working since using a literal backspace character will not remove characters from the string. You could check: [icode]if(c == '\b')[/icode] and remove the last character. You will probably have issues if text is inserted in the middle of the text. I would suggest using a [icode]DocumentListener[/icode]: [code=Java]jTextField.getDocument().addDocumentListener(this);[/code] … | |
Re: [QUOTE]2567</type:int> 5</type:int> 34</type:int> 1</type:int>[/QUOTE] From your output, it looks like you are actually looking for [icode]<type:int></type:int>[/icode] tags. If this is the case, then [icode]index1[/icode] is being set each time, and index2 is not being set. This is because, the match criteria for [icode]index1[/icode] is ":int>", which would match "<type[b]:int>[/b]" and … | |
Re: The Grid class derives from Panel, which has a ZIndex attached property. In XAML you can change the ZIndex like this: [code=XML]<TextBox Panel.ZIndex="5"/>[/code] In code behind, use the static method: [code=C#]Panel.SetZIndex(textBox, 5);[/code] [URL="http://msdn.microsoft.com/en-us/library/system.windows.controls.panel.zindex.aspx"]http://msdn.microsoft.com/en-us/library/system.windows.controls.panel.zindex.aspx[/URL] | |
Re: The only thing I can think of: [code=C#][DllImport("user32.dll", SetLastError = true)] private static extern int GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll")] private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); private const int GWL_STYLE = -16; private const int WS_SYSMENU = 0x00080000; private void Window_Loaded(object sender, RoutedEventArgs e) { IntPtr … | |
Re: [code=Java]protected native Object clone() throws CloneNotSupportedException;[/code] Notice the [icode]native[/icode] keyword. This means that the method is not implemented using Java, but using native code (C/C++) using the Java Native Interface ([URL="http://java.sun.com/docs/books/jni/"]http://java.sun.com/docs/books/jni/[/URL]). | |
Re: Your using the OR operator when you should be using an AND operator. If you say [icode]bmires2 >= 18.50 || bmires2 <= 25.00[/icode], it will always evaluate to true. Therefore the only thing that would affect the statement is [icode]age > 19[/icode]. Just for instance, if [icode]bmires2 = 10.00[/icode], then … | |
Re: Please post some of your source code, and giving the location displayed in the properties window. Am I correct in assuming you mean that the location is changing between where it is in the designer, and where it is when the program is running? If so, looking at the Form … | |
Re: You cannot have a [icode]Vector()[/icode] and a [icode]Vector(...)[/icode] constructor. Constructors with a variable number of parameters could have 0 parameters. Which is equivalent to [icode]Vector()[/icode]. The compiler is uncertain of which constructor to call. You have to remove the parameter-less constructor and perform a check in the other constructor for … | |
Re: The preprocessor directives are listed here: [URL="http://msdn.microsoft.com/en-us/library/ed8yd1ha.aspx"]http://msdn.microsoft.com/en-us/library/ed8yd1ha.aspx[/URL] The #pragma directive only supports warning suppression and ASP.NET file checksums. You can use the Debug class in System.Diagnostics to write to the Output window: [URL="http://msdn.microsoft.com/en-us/library/6x31ezs1.aspx"]http://msdn.microsoft.com/en-us/library/6x31ezs1.aspx[/URL] Hope that helps. | |
Re: How are you creating the installer? Are you using a Visual Studio wizard? Or are you trying to install some generic program you downloaded/purchased? Need more information. | |
Re: Store a reference to the first Form's Label as a local variable in the second Form. Then, create an Event handler for the TextBox's TextChanged event, and set the Label's Text property. | |
Re: It looks like you are missing a bunch of semi-colons ( ; ) and curly braces ( {} ), and the #endif preprocessor directive should be on its own line. Are those missing in your code, or did they not get copied over somehow? If they weren't copied, please repost … | |
Re: The .NET Framework installation may be corrupted; System.EnterpriseServices should be installed with the .NET Framework. Trying running a repair or reinstall, from Add/Remove Programs or Programs and Features on that computer. | |
Re: Installed() is a method contained within another class. In addition, it is marked as private. You could change the installed method to: [code=C#]public static string Installed()[/code] The static keyword allows the method to be accessed without creating a new Class1. Now, you can reference it by calling: [code=C#]MessageBox.Show(Class1.Installed())[/code] You need … | |
Re: Strings are immutable objects. That is, whenever you make a "change" to a string, a new string is created, and you reference the new string. To replace the last character: [code=c#]oldmassiveoutput = oldmassiveoutput.Substring(0, oldmassiveoutput.Length - 1) + " ";[/code] | |
Re: You could store a local variable in the parent Form, and implementing the GotFocus event in each of the children. Then update the variable in the parent Form by casting the Owner property. | |
Re: In the Button's Click event: [code=c#]tabControl1.SelectedTab = tabPage2[/code] | |
Re: You could use the [icode]Regex[/icode] class to do this. You would use a string such as [icode]\\(.\\)[/icode] (with [icode]RegexOptions.SingleLine[/icode] to have the dot (.) operator include every character). Then use the [icode]Regex.Replace()[/icode] method. [URL="http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.aspx"]http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.aspx[/URL] | |
Re: The [icode]size[/icode] argument in your constructor should be an int. This is because, the size of an array uses int. In addition, in your for loops (constructor and [icode]sort()[/icode] method), you should be using int as the indexer. Again, arrays use int to reference their index. As well, floating point … | |
Re: If I understand what you are asking correctly, you could just wrap everything from line 20 to the end of the switch statement in a [icode]while(true)[/icode] loop. | |
Re: I am assuming you are referring to multiple threads accessing the [icode]display()[/icode] method, from the same object instance. If so, your code would cause some inconsistent errors (may work perfectly, or may fail). This is because instructions between multiple threads do not, by default, completely execute an entire method before … | |
Re: You could simply declare/initialize four integers to hold the number of bills for each. Divide the withdrawal amount by 1000 (int / int to remove the remainder), and subtract the result from the number of thousands. Then subtract the result multiplied by 1000 from the withdrawal amount. One thing you'll … | |
Re: You should always try and enforce data integrity at the source. This allows for multiple applications to access the data, without each needing to be coded individually (error prone). And a small bug in the application will not cause the data to become invalid. That said, you can add a … | |
Re: In your first for loop the statement [icode]i < wrd[i][/icode] should be replaced by either: [icode]wrd[i] != NULL[/icode] or [icode]i < strlen(wrd)[/icode]. You are comparing i to the character code, which works fine when you are limited to twelve characters, since the lowest printable character is 32 (a space). However, … | |
Re: For your first question, there are a few methods. If you are not using binding, then you could handle the TextChanged event, although this can be quite messy. If, however, you are using binding, you can perform validation in two possible locations: at the source or at the target. The … | |
Re: You can use the API, found at [URL="http://java.sun.com/javase/reference/api.jsp"]http://java.sun.com/javase/reference/api.jsp[/URL]. Just choose the JDK version you're looking for under [B]Core API Docs[/B]. | |
Re: Hey, could you elaborate on the issue you are having? | |
Re: What have you tried? What's it doing wrong? The source code would be useful. | |
Re: If you need to create your own copy function, first open the original file for reading, then create (or a file with that name exists) for writing. Then you could simply read a byte in the original file, then write that byte to the new file. This is simple to … | |
Re: The Paint event is raised when the Form is first shown, this is to give the Form its initial appearance. When you show a Form it enters a message loop. Messages are sent from the Operating System. If you look at the Windows API, there are some flags that determine … | |
Re: As long as the DLL's are located in the same folder as the executables it should work without any issues. | |
Re: There is no need to call [icode]_next->~live();[/icode] since it is called when using [icode]delete _next;[/icode] and this will likely cause some problems, as the memory will be freed twice. You do not need to free memory for the vector as it is contained within the class. | |
Re: The == operator does not compare the characters of the string. It checks to see if they are referring to the same object. Use the mail.substring(N).equals("hotmail.com") method to compare the characters (or equalsIgnoreCase() I think). | |
Re: Since there is no database is available, you could always check with the other web servers before using a UID. There could be two ways of implementing this: - either each server keeps track of every UID used (synchronization errors could occur), or - each server keeps a list of … | |
Re: I'm not sure how you're going about this. Don't try and downgrade in Windows, boot from the Windows XP installation disk if you have one. Re-imaging would require you to have a PC image created with Windows XP installed. | |
Re: [CODE=C++]WindowClass.style = CS_HREDRAW | CS_VREDRAW[/CODE] This causes the system to call request a repaint of the window when the width of the window is changed (CS_HREDRAW) or the height of the window is changed (CS_VREDRAW). [CODE=C++]UpdateWindow()[/CODE] This causes the WM_PAINT message to be sent to the specified window (requests a … | |
Re: When creating Form 1, use this method: [CODE=C#]Application.Run(new Form1());[/CODE] This should set Form 1 as the main window of the program, and should terminate the program when it is closed. Note: This calls the [ICODE]ShowDialog()[/ICODE] method of the form after the constructor. | |
Re: This is an decoding problem. By passing a byte array into a String constructor, it does not consider the exact value, it uses the default character set of the system (probably UTF-8). Converting it to a character array should fix it. | |
Hi all, Does anybody know any good websites for finding benchmarks on a variety of storage devices (i.e. HDD, Flash drives, SSD, etc.)? Preferably where different types of connections, such as SATA, ATA and USB, are compared separately. Thanks in advance. | |
Re: The Suspend method has been deprecated because it is unsafe, since you are never certain where you stopped the threads execution. Instead you could declared a boolean variable, and then check it at certain points during the execution of the thread. For example: [code=C#]public void RunTheCode() { while(true) { //some … | |
Re: I am too tired right now to try that formula out. But you could consider: if(A.angle < 180) if(B.angle > A.angle && B.angle < A.angle + 180) //turn counter-clockwise else //turn clockwise else if(B.angle < A.angle && B.angle < A.angle - 180) //turn clockwise else //turn counter-clockwise Again, really tired … | |
Re: If you want 1000.26 to round to 1000.30, you would have to use Math.ceil. | |
Re: Try looking around this site: [URL="https://labs.ericsson.com/apis/mobile-java-communication-framework/forums/general-development-information/sony-ericsson-sdk-224-javatm-me-platform"]https://labs.ericsson.com/apis/mobile-java-communication-framework/forums/general-development-information/sony-ericsson-sdk-224-javatm-me-platform[/URL] | |
Re: I doubt this is possible without the use of JNI, simply because I don't believe that Java has a method to encapsulate other application's windows as a Java Window object (could be wrong though). |
The End.