Vladimir Bougay's Q&A profile
Windows Forms DataGridViewComboBoxColumn - how do I set the SelectedItem?
I've added a ComboBox column to my DataGridView, and I'm having trouble specifying, at run time, thet value that is to appear in the combo box, as being selected. I don't need to bind the fields to a data source, I want them to contain two distinct items. I'm able to add them using "column.Items.Add("xxx")", but when running the app, the combo box is empty, with my added values in the drop down. What I need is something like "column.SelectedIndex = 0" so I can specify the default seleted item. How can I accomplish this Thanks, John Not quite. I have it working for 2 grids. I created the columns with the following code: private DataGridViewComboBoxColumn CreateDataGridView ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Need a pbuffer overview
Could somebody please point me to an overview on using pbuffers in DirectX (Or if they go by another name in the DirectX world, please let me know.) Google search is being surprisingly useless, getting details but no overview. In particular, I want to know how to: 1. Render to texture and then apply that texture to something. 2. Render to texture and then read that texture back into main memory. Example code would also be appreciated. Thanks, Ken There is no pbuffer analog in D3D. Actualy OpenGL PBO extention is replica of DirectX mechanism of rendering to texture. Simplest code in SDk that uses this functionality (creating textures possible to set as render target and actually setting them by SetRenderTarget) is Blobs. ...Show All
.NET Development Help trying to Insert to Access DB with error No value given for one or more required parameters.
I am trying to delete all the quotes from a csv file and then grabbing each line as a row in Access' database. Right now I am stuck after hours of research about the error: No value given for one or more required parameters. I have tried using @companyName and also the question mark. Here is the code that give me the error: Public Sub InsertLine(ByRef line As String()) Dim dbname = "dbase1.mdb" Dim dbpath = Server.MapPath("access_db") Dim commandStr As String, dbcomm As OleDbCommand Dim conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ dbpath & "\" & dbname) conn.Open() commandStr = "INSERT INTO [Contactsdb] ([company ...Show All
SQL Server Bug in Management Studio : Scripting of Publication generates wrong value for @schema_option in sp_addarticle statements
Hi everybody, I found the following bug in Management Studio: I add an article with sp_addarticle and a value of 0x00 for @schema_option or via the wizard with all article properties set to false. Then I script the publication to a file. The result contains a sp_addarticle statement with @schema_option = 0x0000000000004071, which must be wrong. To prove that I recreated the article with the generated script and checked the article properties. As I feared 4 of the properties ('Copy clustered index', 'Copy nonclustered index', 'Copy unique key constaints' and 'Convert data types') are set to true! Is this a known bug wolfgang Kunk Hi, Thanks for more information. Looks like this issue will only happen w ...Show All
Visual Basic Selecting data from a combobox
I can not figure out how to select the text posted in the ComboBox as placed in the ComboBox in the properties window. Everything within the ComboBox (except what was placed as the text in the properties window) is chosen from an array (serialized). How can I simply click on the pre-text and make it open a form similar to what I did in order to open a message box) Private Sub ComboBox1_SelectedIndexChanged( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged If Form2.theCollectionOfPhysician.Count > 0 Then Dim thePhysician As Physician = CType (Form2.theCollectionOfPhysician( Me .ComboBox1.SelectedIndex), Physician) MessageBox.Show(Form2.TextBox2.Text.ToStr ...Show All
.NET Development Query Verification
I am generating a query using my own C# code.(Win application). It is stored in a text file. Now I would like to test the query. Could I pass this query to somewhere and get the error details . Please suggest . Thanks in advance. Thanks Arun Hi, you can use the SET NOEXEC (Transact-SQL) statement for compiling your query but not execute it. This link has more information about it best Regards ...Show All
Visual Basic Weird arithmetic overflow
I have the following function Public Shared Function ReadUInt32( ByVal Array As Byte (), ByVal Index As Integer ) As UInt32 Dim A As UInt32 = CUInt ((0 Or Array(Index + 3)) << 24) Dim B As UInt32 = CUInt ((0 Or Array(Index + 2)) << 16) Dim C As UInt32 = CUInt ((0 Or Array(Index + 1)) << 8) Dim D As UInt32 = CUInt (0 Or Array(Index)) Return A Or B Or C Or D End Function The error occurs at Dim A As UInt32 = CUInt ((0 Or Array(Index + 3)) << 24) The 32 bit value of Array(Index) is &HFFFFFFFF. So Array(Index + 3) << 24 is 4278190080D But it gives an arithmetic overflow even though the value is less than UInt32. ...Show All
Microsoft ISV Community Center Forums How to allow cookies for Windows Live ID
Help me! Hi, This Windows Live Help Central page covers Windows Live ID and Hotmail issues: http://help.msn.com/(cHJvamVjdD1wYXNzcG9ydDQmbWFya2V0PWVuLVVT)/help.aspx querytype=topic&query=Passportv4_TROU_CannotSignIn.htm&fs=1 I hope this helps you resolve the issue. -brenda (ISV Buddy Team) ...Show All
Visual Basic Problem with Textboxes
i have a TextBox colection: TxtBox1, TxtBox2, TxtBox3 and TxtBox4 I need to check if any Textbox is empty before i can go to next part of the app. so i write a Sub to check the TextBoxes: Private Sub CheckValue( ByVal TxtName As TextBox) If TxtName.Text = "" Then MsgBox( "Fill every TextBox, Please." ) TxtName.Focus() End If End Sub So it Works, but... in the second part of the app i have 25 Textboxes named : TxtBox1 to TxtBox25 so i don't want to write 25 lines calling CheckValue Sub i need something like this: For n As Integer = 1 To 5 CheckValue( " TxtBox " & CStr (n)) Next n but it gives me the follow error: Error 1 Va ...Show All
SQL Server Wrong totals in named sets
Hi In BI Development Studio I create a name set with this sintax: [CATALOGO].[CATALOGONIVEL3].[Tiempo Mantencion] [CATALOGO].[CATALOGONIVEL3] has another two members instead of [Tiempo Mantencion] After that I create a calculated member with this SUM ([SET Tiempo Mantencion] , [Measures].[HORAS JUSTIFICADAS]) It works fine in almost all cells in the cube, but when I ask for the others two members of [CATALOGO].[CATALOGONIVEL3] it does NOT returns NULL it returns the same total of [CATALOGO].[CATALOGONIVEL3].[Tiempo Mantencion]. When I open one this members (it exists a sub level named [CATALOGO].[CATALOGONIVEL4]) the cube show a null cell in the subitems (thats right) and the [CATALOGO].[CATALOGONIVEL3].[Tiempo Mante ...Show All
.NET Development pinvoke and enum
Hi, I need some help with passing enum from C# to C dll function in a pinvoke call. How can this be done correctly Thanks! Pass it as if the target method was managed, there's nothing special to it. Just make sure the enum's underlying type is correct so the enum has the right size. If you're having problems, please be more specific. ...Show All
Windows Forms Very slow load of C++/CLI project with WinForm
I have a large C++/CLI project that I'm building with VS 2005. I've added a WinForm to the project that contains some 3rd party components (DevExpress). It compiles and runs, but when I load the project into Visual Studio it takes 5 minutes to start up! Before I added the WinForm it took about 10 seconds. I took a look at what VS 2005 is doing during this time and it's creating 94 folders in C:\Documents and Settings\Fred\Local Settings\Application Data\Microsoft\VisualStudio\8.0\ProjectAssemblies and copying my project's .EXE and .PDB file into each one. Unfortunately, the .EXE is 11MB and the .PDB is 32MB... all-in-all it's copying 3.82Gb of data (4K at a time) which takes a while. Also, if I make any change in the form designer an ...Show All
SQL Server drill down in Multi-value parameters
Hi, can anybody tell me if it is possible in RS2005 to create a multi-value parameter in wich it is possibility to drill down Say i want to use a multi-value parameter to show data for one or more specific years or months. Then the multivalue parameter would contain a list of years, with a + sign next to them, making it possible to drill down to the specific months. Any help greatly appreciated. Christopher I've spent a great deal of time working with parameters and multi-value parameters. However, to my knowledge, there is currently no built in functionality to support a drill down. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Visual Studio 2005 w/ XNA!!!
i was wondering if anyone knew how to include the xna project templates into vs2005 i tried to copy the templates manually from the project templates folder of c#express to vs2005 but, they still don't show up with the other projects. im not even sure it's possible to do this but, i was curious to know also, does anyone know how to turn on line numbers in c#express i'm soo use to vs2005 and all it's features that i have grown accustom to it!!! this is my first time using c#express!!! yeah i kind of figured it was just made specifically for c#express. thanks for your responses guys!!! i got a question for you michael i noticed that you responded to another thread stating that they were having problems vi ...Show All
Visual Basic Difference Between Basic & Web Developer?
I hope I'm in the right place -- if not, please redirect. I'm new to all of this stuff, but I enjoy teaching myself different aspects of my website. I have a simple, personal website with several pages -- nothing fancy, but I might like it to be. I'm not afraid to learn. Having that said, I downloaded Expression a while back and recently became interested in the Expression Blend trial version, but when I downloaded it, it recommended Visual Basic or C# be downloaded as well. Once on that site, I saw Visual Web Developer. I ended up downloading both Basic and Web Developer. I had my 'Add/Remove Programs' up because of the warning about .NET Framework and dealing with other previous programs before downloading. Obviously, I was ...Show All
