MrZkitten's Q&A profile
Windows Forms Modal Dialog Box focus problems and Painting Problems
I have written a Windows Forms application using C++ (.NET 2.0). I have encountered two problems I believe are related. The first occurs sometimes when I open a modal "dialog box", in the form of a MessageBox.Show, FileDialog or custom form using ShowDialog. The dialog box does not appear on top of my application, it is hidden and thus gives the illusion that my application has frozen (The Z-Order is not first). The second is that after displaying these dialog boxes (When they do show up on top), the controls under them do not repaint themselves, leaving "ghost" images of the dialog box that was just closed. I have found several threads on this forums posted by others who have encountered the same, or similar, problems, ...Show All
SQL Server How can we check the language by which functions, stored-procedures, and triggers are written in SQL Server 2005?
Hi, all here, Could please any experts here give me any guidance in what way can we check in what language (T-SQL or CLR language ) the user defined database engine objects :functions, stored-procedures and triggers are written Thanks a lot in advance for any guidance and advices for that. With best regards, Yours sincerely, ...Show All
Windows Forms Problem with DataMember of DataGridView
Hello, I am having some problem with flitering a dataset and setting the same data set as the source of a datagridView. customer_list.Tables[0].DefaultView.RowFilter = "Surname like '" + textBox1.Text + "%'" ; this .dataGridView1.DataSource = customer_list.Tables[0].DefaultView.ToTable(); this .dataGridView1.DataMember = "customer_list" ; But it is not working. In my earlier projects the same code worked fine with dataGrid, well, i did not have to specify the datamember in that case to see the data. Can anybody please tell me, how do i simply show the data of a DataSet(thats been flitered) in a dataGridview excellent, glad I could help! the DataMember property is to only s ...Show All
Visual C++ ignore input if wrong
I took everything else not relevant out. I want to avoid the endless repeating of "please enter a command". If a user puts in more than five characters I want the program to ignore it and ask only once to "please enter a new command". Actually I want it to only accept the following commands "r NNN" or r, space and three integers, p p or p m or q. If these aren't entered I want the program to ignore the command and ask once for the user to "please enter a command". From a usability point of view it should always be apparent to the user what they should be inputting. If you just ignore invalid input and don't explain what's wrong then whomever is using your program is going to get frustrat ...Show All
Visual Studio Express Editions loading large pictures in picturebox
Hello. I'm working with large pictures (one of them is 4021x3123) and I want to load them inside o PictureBox so the user interacts with it (draws on it). The problem is after I load the picture, when I use the scroolbar to move around it, it has that flicker effect and also the interaction with my application has a delay (it takes about 1 sec for the other controls to react). I'm guessing my problem appers because of the large picture I'm loading, so is there a way not to load the entire picture inside the PictureBox and only load that portion of the picture that is currently dispayed by the PictureBox Is there a better solution to that Thanks. The picture I used was 4021x3123. I don't think co ...Show All
Visual Studio Express Editions How to Post Code Samples
Hello All. For the benefit of those just starting out, and to hopefully relieve the eye-strain for those of us who might be considered by some to be Really Old Farts , I thought I would relocate some of the information found in the "Suggestions for Forums website" Forum about how to post code samples, vis-a-vis Copy and Paste operations from the Visual Studio Code Editors. If you want to paste a code sample, then in the Forums Post Editor, you have to define a code block, like so: [code language=] paste code here [/code] Before this will work, though, you have to specify a language, in quotes , immediately after the "=" in the top tag, like "C#", or "VB", or "C++". Now, if you want to preserve the indent ...Show All
Visual Studio Express Editions Writing text from textbox out to a file
FYI: I'm new to VB. I made a VB program to run a bat file that is created when you select a file. 1. I have a textbox1 that displays the address of the file and writes out the full address and file name to a bat file. 2. A button labeled browse to find the file to display in the textbox1. 3. A button that runs the bat file that is created by the textbox1. My problem is that I want to append static text before the full address of the file and after too. So the bat file would look like this: "static text that never changes" "dynamic text that changes with info from textbox1" "static text that never changes" I'm using " My.Computer.Filesystem.WriteAllText" to write the contents of t ...Show All
Windows Forms Regarding Textbox resizeing in runtime...........
Hi, my question is ...How to resize a text box in runtime.... can we show the boder line resize frame during runtime... thru which the user can resize a picuturebox or textbox or anything..... Is this possible....!! Thanks, sathyan You could implement your own "designer" so that your form would have a design time look like Visual Studio has. See this article: http://msdn.microsoft.com/msdnmag/issues/06/03/DesignerHosting/ ...Show All
.NET Development Who is using the webservice with certificates?
Hello, I'm working on a project with client authenticate through 509 certificates. But I would like to know on runtime the user that is using the service. I've gone through all the documentation but I haven't been able to find anything. Because the reply of the service is different dependding on the user. Does anybody have any idea how to do it Thank you! Ive got the same scenario and we use a custom x509 token manager which looks up the certificate and creates a princpal based on it. This is then available to the code which can determine what to do ...Show All
.NET Development A New "Syntax error in INSERT INTO statement"
Hello, I have this code in a windows form where it has a comboBox to choose one of three tables from "material" Access database, and the user has two options of adding or deleting a row. My three tables are Customer, Material and Accessories. The insertion and deletion of Customer works just fine, but when I try to add a new row to Material or Accessories a syntax error in INSERT INTO statement is shown. I tried everything I know or could think of. Please If you can help me I would appreciate it so much. Here is the code: =================================== private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { switch (comboBox1.SelectedIndex) { case 0: { customerAdd(); break; } case 1: { ma ...Show All
Visual Studio 2008 (Pre-release) Bug? LoadSequence with LoadOption.PreserveChanges doesn't work as I am expecting
When calling the version of LoadSequence that allows me to specify a LoadOption, LoadOptions OverwriteChanges and Upsert work as the Intellisense states, but PreserveChanges does not. According to the popup text, PreserveChanges should update the original version of the data, but not the current version. In my testing, it updates both the orignal version of the data AND the current version of the data. Am I doing something wrong Here is some code demonstrating this problem: class Student { public int Id; public string Name; private string SSN; } Student[] students = { { Id = 1, Name = "Joe Rattz" } }; Student[] moreStudents = { { Id = 1, Name = "Joseph Rattz" } }; // Create the tabl ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Render to Texture Inside Shader?
I'm sorry if this is a stupid or obvious question, but I am completely new to shaders. Is it possible to render to a texture inside of a shader For example I want to render to a texture in the first pass and then use that texture in the second pass. I am currently using XNA's render to a texture successfully. However I was wondering if it was possible to implement it inside of a shader, because I feel it would be faster, not to mention make the XNA code simpler. My gut feeling is that it is not possible, however I am kind of confused by RenderMonkey. It uses Render Targets which appear to do what I want. However, I think it may just be doing some DirectX render to a texture operations in the background. ...Show All
Visual Basic from flat file to combobox
I am trying to avoid accessing a database by reading a comma delimited flat file into my application. I use the code snippet below to accomplish that. What I need help with is how to then get the data from the file into a combobox so that the user can select the value desired. The items in flat file are formated as follows: XXXXXXXXXXXXXXXXXx,999.99 Can someone please help with the correct code Thanks Howard Dim filename As String = "C:\tbl_AxisI.txt" Dim fields As String () Dim delimiter As String = "," Using parser As New TextFieldParser(filename) parser.SetDelimiters(delimiter) While Not parser.EndOfData ' Read in the fields for the current line fiel ...Show All
SQL Server need decimal data after division
HI, when i divide 2 nos i need the result in decimal. always the fractional part is truncated how to get it. venp-- I don't understand what you mean. Can you explain more clearly The precision & scale of any arithmetic calculation involving decimal numbers depends on the precision & scale of the individual values. You can use CAST to get constant precision/scale but make sure you use the appropriate values. In any case, see the link below from BOL for more details: http://msdn2.microsoft.com/en-us/library/ms190476.aspx Also, each tool (ISQLW, SSMS or SQLCMD) handles the display of decimal values differently and there are often settings to control it. In any case, you need to explain your p ...Show All
SQL Server Variables set via Script task don't change
I've got a container with two variables: xxxNextFile and xxxLastFile , both with EvaluateAsExpression = False. My container has a dataflow followed by a script task followed by another dataflow. The first dataflow starts with ae existing raw file source from variable xxxLastFile and wants to write output to a new raw file from variable xxxNextFile . The script component then sets the value for xxxLastFile equal to the value of xxxNextFile and generates a new value for xxxNextFile . The final dataflow component does pretty much the same as the first one, i.e. it uses xxxLastFile for the source and xxxNextFile for the destination. I've got two package scoped variables pkgFolderTemp and pkgCurrentTime that I use to come up with a unique file ...Show All
