203 Posted Topics
Re: Hello, as a way of optimization, I'd suggest you to use static members. On every iteration of your cycle, you create again and again new instances of VertexFormat. You can create a static method in this class, so you could do something like that: [code=c#] for (int i = 0; … | |
Re: Hi, if you're talking about windows forms, then you might be interested in viewing this thread: [url=http://social.msdn.microsoft.com/Forums/en/winforms/thread/8cfe13ba-ca85-41bc-a0de-c553b30a6f30]How do i make MDI Parent & Child Forms in C#.NET as looks like as Master & Child Pages in ASP.NET?[/url] | |
Re: Hello, here's where your problem sits: 1. You define and array of interfaces [code=c#] IchecherMove[ , ] checker [/code] 2. Then instantiate your array using [B][U]Checker[/U][/B] class [code=c#] new Checker[9 , 9]; [/code] don't see the problem yet? :) ok, continuing .. 3. You're inserting some variables into it, including … | |
Re: Hello, yeah, static word might be confusing for some time. But it's not that hard .. Static members has a class level, rather then object one. To understand it better, let's look at example. Imagine a form for making cookies .. Your form is your class. And your cookies are … | |
Re: The one way I see is storing the images in a DataBase .. that would prevent average user from searching images locally. P.S. FYI, one more way of stealing images is just making a PrintScreen in a biggest possible resolution .. so, you might want to consider and this case … | |
![]() | |
Re: What if you'd have 1 pannel for logged user and a separate popup window for a user to log in? Can the 'non-logged' user somehow interact with your system (except entering his/her login data)? | |
Re: Ok, beforehand a small question: can't you take a control over filename generating and eliminate the insertion of illegal symbols into it's future name? As a way to centralize your name converting, I would suggest to look at how they do the 8.3 format: [url=http://support.microsoft.com/kb/142982/en-us?fr=1]How Windows Generates 8.3 File Names … | |
Re: There's an [url=http://www.daniweb.com/forums/forum18.html]ASP.NET Forum[/url], for ASP .NET questions. You have more chances to get the answer, when posting on a proper forum. | |
Re: Hello. Please describe what your program should do (the basic algorythm/-s). Just thing, I would like to notice is that the Program.cs usually contains code for application running, finishing: [url=http://stackoverflow.com/questions/1667764/what-common-routines-do-you-put-in-your-program-cs-for-c]What common routines do you put in your Program.cs for C#[/url]. And in the Form.cs - you have the code, supporting … | |
Re: Hello, I might help if you would follow these forum rules, as "We'll help you get started and exchange algorithm ideas, but only if you [U]show that you're willing to put in effort[/U] as well." So, tell me, please what you've already tried, what you can't understand or what troubles … | |
Re: Hello, you might be interested in reading these articles: [url=http://msdn.microsoft.com/en-us/library/ykdxa0bc.aspx]Walkthrough: Validating Data in the Windows Forms DataGridView Control[/url] [url=http://social.msdn.microsoft.com/Forums/en/winformsdatacontrols/thread/a92df8b2-56ce-4658-a9ae-600ef82e4852]Datagridview cell specific custom mask[/url] [url=http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/cd12d1aa-f54b-43f7-a157-a25323fed255]Applying access mask to DataGridView in c#[/url] [url=http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/090807ac-f61b-4afe-963b-29c28804176e]How i mask datagridview column[/url] | |
Re: Hello, Have you tried to play around [icode]IsMDIContainer[/icode] property for parent container and [icode]MDIParent[/icode] for a child one? Unfortunatelly I have no tools to test it right now, but I suppose that it should work like a charm :P Cheers. | |
Re: Ok, let's start from the beggining ... The task is make a WPF application. What we usually expect from server - is performance. From client we usually expect usability, attractiveness, etc. (also performance, but less than from server). So it would be logical to make a server part of an … | |
Re: Hello, to extract the value of your [icode]d[/icode] variable into given string, you should: [LIST=1] [*]Close declaration of string with double quotes [*]Concatenate the value of your variable with the rest of your string [/LIST] Here's what I'm talking about: [code=c#] "/c \"format " + d + " /fs:ntfs" [/code] | |
Re: Hello, you have interesting problem ... let's see: [QUOTE=trashbat]Does this make the slightest bit of sense?[/QUOTE] Well, that depends on from which view to look at this: [LIST=1] [*]It sounds logical, when you declare in base class, that it or it's children would implement DataComparable. But since the base class … | |
Re: Hello, just want to add my 2 cents :) As farooqaaa said, you should test if your events are fired. If they're fired, but display still won't update, try to call [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.application.doevents.aspx]Application.DoEvents Method[/url] to force events processing. One more way achieve that functionality can be using of [icode]DataBinding[/icode]. | |
Re: Hello, since interfaces doesn't have a GetType method, you can use something like this: [code=c#] if (input.GetType() == typeof(Bar)) [/code] Just a thought in a loud .. are you sure that it's really needed. Maybe there's a better approach for your problem? | |
Re: Hello, I hope I understood you correctly .. If you've started to talk about custom controls .. why not create a custom tab? Especially if you'll have an identical - looking tabs, I guess it would be a better way to create a sort of template. Here's an example to … | |
Re: I think this discussion can put some light on your problem: [url=http://stackoverflow.com/questions/72275/when-should-the-volatile-keyword-be-used-in-c]When should the volatile keyword be used in C#?[/url] | |
Re: Hello, your way is technically correct. I just want to know .. are you new to c# or to programming at all? Just there is a better way to store data, e.g. using List<T> and structures or classes .. P.S. Please, next time put your code in code tags :) | |
Re: Hello, I just want to share some thoughts to consider on your problem. About suggested ways to go: [quote=slider212 ]1. Leave it as it is it works but is inefficient[/quote] I think this solution has it rights to exist for the case when your collection has small size. But it … | |
Re: Hello. Not sure if I've got the point .. but I'll take a shot :) What about using [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.selectedindexchanged.aspx]ComboBox..::.SelectedIndexChanged Event[/url]? If I'm wrong, please give more details on what troubles are you facing .. e.g. you don't know, how to get value from ComboBox .. or something else. | |
Hello, everybody. I had a problem while connecting to Oracle. Got messages: [QUOTE=Error]ORA-00604: error occurred at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid environment specified[/QUOTE] And found solution for this - setting the default locale in java code: [code=java] Locale.setDefault(Locale.US); [/code] This works just fine … | |
Re: Hello. The compiler tells you that it doesn't understand what is [b]Tree[/]. To fix the problem you should either add import for [icode]Tree[/icode] data type, or declare this data type in your makeup1 class. | |
Re: Hello, to generate Controls in runtime see the the threads, which were discussed not really much time ago here, on Daniweb: [url=http://www.daniweb.com/forums/thread204678.html]C# Preforming Caluclations With Controls Created In Runtime [/url] [url=http://www.daniweb.com/forums/thread204631.html]C# Cannot Read Dynamic Textbox [/url] For using stored procedures: [url=http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson07.aspx]The C# Station ADO.NET Tutorial: Using Stored Procedures[/url] | |
Re: Hello, Ryshad :) Ok, let's go .. I'll give a few comments on your suggestions and then give you an example. [quote=Ryshad] a) include a flag in the bay to show that it is in another step [/quote] No, you shouldn't. Because the Bay class shouldn't be aware of what's … | |
Re: Hello. The troubles are starting here: [code=c#] carry = 1; [/code] You carry can be more than 1 .. so you should take the integer part of your holder: [code=c#] carry = holder / 10; [/code] Now, after summing all the numbers - you can still have something in your … | |
Re: Hello. That's weird .. works fine for me when I use this: [code=c#] using RestaurantSoftClassLib.Karyawan; [/code] and then [code=c#] Karyawan karyawan; [/code] Try to remove one [icode]Karyawan[/icode] .. what's happening if you use only one? | |
Re: Hello. I'm not sure if this is what you're looking for, but to get array of child forms, you can use the [icode]MdiChildren[/icode] property, e.g.: [code=c#] this.MdiChildren[0].BackColor = Color.Black; //and in same manner for sub - sub child forms this.MdiChildren[0].MdiChildren[1].BackColor = Color.Black; [/code] | |
Re: Hello, there's a suggestion in error message: [quote=Error] Some errors can be fixed by rebuilding your project, while others may require code changes. [/quote] Have you tried rebuilding? One more thing: [quote=Error] The type 'System.Windows.Forms.OpenFileDialog' has no field named 'file'. [/quote] Do you have such one? If no - remove … | |
Re: Hello, tobibabs. [url=http://www.daniweb.com/forums/announcement61-2.html][COLOR="Red"][U][B]Here[/B][/U][/COLOR][/url] is what you need. | |
Re: Hello. If I understood you correctly - this may be helpful for you: [url=http://msdn.microsoft.com/en-us/library/ms998558.aspx]Implementing Singleton in C#[/url] | |
Re: Hello. Dunno if it will suit your problem, but as an option - you could remove the header of the window. That's gonna help you to set the size to whatever you want. | |
| |
Re: [url=http://www.google.com/#hl=en&source=hp&q=c%23+working+with+registry&btnG=Google+Search&aq=f&aqi=&oq=c%23+working+with+registry&fp=8ec9ea851cee2c5b]This guy[/url] has a lot of ideas/suggestions, regarding your question :P | |
Re: Hello. I have a doubt about if there a custom class or something similar for that purpose in .Net Framework (for Windows Form). But that's doesn't stop you from implementing it by yourself. Steps could be something like this: 1. Define the data structure, that will store the history of … | |
Re: Hello. Interesting question .. I couldn't find any property or method for this case, but here's some workaround. You can process the BeforeSelect event and cancel it if the selection made e.g. not using mouse: [code=c#] private void treeView1_BeforeSelect(object sender, TreeViewCancelEventArgs e) { if (e.Action != TreeViewAction.ByMouse) { e.Cancel = … | |
Re: Hello. Let's investigate your code: 1. You declare an array (for some reason [B][i]readonly[/i][/B]). And say, that it would contain 1024 elements. [code=c#] private readonly byte[] _buffer = new byte[1024]; [/code] NOTE: [B]The array is still empty[/B] 2. On the next step you're trying to convert your empty (well, not … | |
Re: Hello. In your case you can handle those keys in KeyDown event. It would be something like this: [code=c#] private void Form1_KeyDown(object sender, KeyEventArgs e) { // if AltKey is pressed and the //other Key is F4 then if (e.Alt && (e.KeyCode == Keys.F4)) { //we say, that we already … | |
Re: Hello, Ryshad. I hope that I understood you corretcly :) What if take your 3rd dimension out of gridview? (see pic 1). If you have to display a few orders, that are split between different departments, and having different data about weeks and products - you can also take it … | |
Re: Hello. All you need is decide what objects to pass to that method and then - call it. E.g.: [code=c#] comboBox1_SelectedIndexChanged(comboBox1, new EventArgs()); [/code] | |
Re: Hello, S2009. Beforehand little quotation from msdn: [quote=MSDN] CancelEventArgs..::.Cancel Property Gets or sets a value indicating whether the event should be canceled. Property Value Type: System..::.Boolean true if the event should be canceled; otherwise, false. [/quote] And now let's look at your code: [CODE=c#] private void frmLibrary_FormClosing(object sender, FormClosingEventArgs e) … | |
Re: Hello. Isn't this non-stop recursive call to the same function: [code=c#] public string GetClientsList() { try { Thread.Sleep(1000); } catch (Exception e1) { Console.writeline(e1.ToString()); } return Program.ServerForm.GetClientsList(); } [/code] | |
Re: Hello, Darth Vader. Just to make sure - is your code is a holistic part of code, which you execute or it's just necessary pieces to show to us... I ask this because it's compiles and runs here perfectly, but with little correction: this part is taken into a method: … | |
Re: Hello, phantom8l. This can be interesting for you: [url=http://www.eggheadcafe.com/conversation.aspx?messageid=32661879&threadid=32661879]Manually painting a ToolStripSplitButton[/url] | |
Re: Hello, phoenix_dwarf. While playing with your code found interesting thingy: it works fine on every tab .. except the 1st one. Anyway, while trying to explain such behaviour, found this: [quote=MSDN] Note: Focus is a low-level method intended primarily for custom control authors. Instead, application programmers should use the Select … | |
Re: Hello, Ichibang. Some time ago I had similar weird problem. Take a look, maybe this can help you to solve yours: [url=http://www.daniweb.com/forums/thread172372.html]Problem updating Database using typed dataset [/url] P.S. I suppose there's a better way to fix that. But I couldn't find it. |
The End.