Pops Jackson's Q&A profile
Windows Forms Editable Combobox in a datagridview
I'm a little new to this .net stuff so I'm sure this question will be pretty easy. I'm trying to make a combobox editable in a datagridview. Can anyone lead me down the right path thx If you right click the grid at design time and select Edit Columns, the Column Editor will appear. Select the column that you want to have appear as a combobox and change the ColumnType property to DataGridViewComboBoxColumn. ...Show All
Visual Basic Capturing Key press or Key Down Events for an entire Form
Im trying to make a form for a test application. It has a heap of buttons and textboxes etc on it. I want to capture when the uses presses a random selection of keys (about 6 different keys) and have the form respond depending on what key they pressed, and what control they currently have highlighted. I don't know if i should be using keypress, keydown or something completely different Any help appreciated Cheers Mc Hi, As per my understanding you want to get the events generated by the controls that are located on you form and more also want to get the focused control. If so the ...Show All
Visual Basic Output line numbers progamatically (for logging/debug purposes) to a text file
Using MS Visual Studio .Net 2003 VB I'm trying to figure out how to output the line number of a line of code that is executing. This would be used for logging/debugging purposes. MS VC++ has the 'built in macro' by which this can be done __LINE__ and I have been unsuccessful in finding a VB equivalent - if one even exists. Best example I can give is in C++ because I have none for VB. void Example (int test) { if (!test) printf ("test not set @ line %d", __LINE__); } All that to say I need to know if there is an equivalent to __LINE__ in VB. Thanks in advance for the help. ...Show All
Visual Studio Team System Recreating ReportServer database
I had posted a similar thread in the Setup & Administration forum, but never received an answer. The issue was that I had upgraded to the Beta 3 Refresh from Beta 3 running on SQL Server 2005 Standard September CTP. I attempted the upgrade to SQL Server 2005 Standard RTM, but as anyone who tried this remembers it wipes out most of your databases. Of course I had backups, but this required me to deviate slightly from the upgrade guidelines as I could not simply attach the MDF files. At any rate, when I ran through the installation successfully (used SQL Server 2005 Enterprise RTM instead) and restored the appropriate databases everything ...Show All
Game Technologies: DirectX, XNA, XACT, etc. C# and Vertex Shader problems
I am trying to implement a basic vertex and pixel shader pair (see code below) Vertex Shader float4x4 matWorld; float4x4 matView; float4x4 matProjection; struct VS_INPUT { float4 Position: POSITION0; float3 Normal: NORMAL0; }; struct VS_OUTPUT { float4 Position: POSITION0; }; VS_OUTPUT vs_main( VS_INPUT Input ) { VS_OUTPUT Output; float4x4 tmp = mul( matView, matWorld ); float4x4 tmp2 = mul (matProjection, tmp ); Output.Position = mul( tmp2, Input.Position ); return( Output ); } Pixel Shader float4 Color; struct PS_INPUT { }; float4 ps_main( PS_INPUT Input ) : COLOR0 { // Output constant color: return( Color ); } When ...Show All
Windows Forms Extremely Slow TCPClient Connection from a UserControl in IE
Background: I have built a .NET UserControl that utilizes an existing product to display real-time information via a TCP/IP connection. The UserControl promptly connects and correctly receives real-time updates from the existing product when the UserControl is run from within the Visual Studio IDE or a Windows Form application. Problem: The UserControl does not promptly connect via  ...Show All
SQL Server Select with group
Hi, on a table with two fields DATETIME and PLATAFORM I need to meka thefollowing queries One return the total grouped by hour like '1:00:00.000' - 5 /* Registries from 0:00:00.000 to 1:00:00.000 from the day choose */ '2:00:00.000' - 12/* Registries from 1:00:00.001 to 2:00:00.000 from the day choose */ '3:00:00.000' - 5/* Registries from 2:00:00.001 to 3:00:00.000 from the day choose */ '4:00:00.000' - 12/* Registries from 3:00:00.001 to 4:00:00.000 from the day choose */ and on.... the other is group by week, month(with the 30, 31 days of the month Like 01/05/2006 -- 5 02/05/2006 -- 5 03/05/2006 ...Show All
Windows Forms Image Text wrapping in RichTextBox control???
Is this possible in RichTextBox control. i mean in MS word we can do text wrapping for the picture(in front of text) for example. there are 3 text lines. the one image should be in front of these lines. its look like text wrapping in MS Word. Please help me.... Millions of thanks in advance ...Show All
.NET Development OutOfMemoryException and Garbage Collection doesn't work how I thought it would
I designed this code snippet to test garbage collection. It doesn't do what I thought it would do though. The idea was to allocate a chunk of memory, but to discard the reference to that chunk by letting the variable that holds the reference fall out of scope. When it runs out of memory on the heap, I expected the garbage collector to run automatically and that the allocation would succeed. But there are a couple of weird things that happen. First, here's the code: while ( true ) { int successes = 0; try { & ...Show All
Windows Forms Dataset Changes Using Two Forms Linked to One Dataset
I have created a simple database program using the new automation tools supplied by Visual Studio 2005 and SQLServer 2005 Developer Edition. I have created a link to a single data source containing one table. In the first form, I have used the data source tools to drag a "DataGridView" to the form , creating a BindingSource, TableAdaper, BindingNavigator and DataSource In the second form, I use the same data source to drag the same fields to the form, but with text boxes instead of a grid. I open the second form from the first form and tie the grid rows using the BindingSource.Position from the first form. The second form shows ...Show All
Smart Device Development Handling events in a multi-form application
I'm trying to write a .NET CF 2.0 application that behaves a little like the built-in Calendar application, in that the main form has multiple views with very different contents. In fact, in my application the four views are so different that I'd like to implement them as four different forms, so that I can use the Visual Studio designer to layout and script each one separately. This also allows me to completely close the forms I'm not using so that they're not taking up memory. Taking some inspiration from the FormStack sample code, I replaced the usual call to Application.Run() with a custom routine that does: do { Appl ...Show All
SQL Server Nested Loops in the Control Flow
I have a problem when using nested loops in my Control Flow. The package contains an outer Foreach Loop using the Foreach File Enumerator which in my test case will loop over two files found in a directory. Inside this loop is another Foreach Loop using the Foreach Nodelist Enumerator. Before entering the inner loop a variable, xpath, is set to a value that depends on the current file, i e /file[name = '@CurrentFileName']/content . The Nodelist Enumerator is set to use this variable as its OuterXPATHString. Now, this is what happens: First Iteration: The first file is found and the value of xpath = /file[name = 'test1.txt']/content. When ...Show All
SQL Server FlatFile connection and security
My DTS package, deployed and run from the file system, works just fine for me, but fails when someone else runs it. The only explicit error from the dtexec command is: Error: 2005-06-24 12:35:03.33 Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error This error just started when we tried to point to a file on a network server instead o ...Show All
.NET Development app.config issues
I am getting errors saying that they can not find my xml elements in the file......what should i do so the app.config can get to them.... < xml version = " 1.0 " encoding = " utf-8 " > < configuration > < system.diagnostics > < sources > <!-- This section defines the logging configuration for My.Application.Log --> < source name = " DefaultSource " switchName = " DefaultSwitch " > < listeners > < add name = " FileLog " /> <!-- Uncomment the below section to write to the Application Event Lo ...Show All
SQL Server common path names
Is there a way create a path name so that it does not have to change when testing modifications Our DTS packages have package logging, package properties/logging, pointing to a path on a network drive for production runs. E.g. \\G4\CognosDev\EmpireTime\New_Empire_Time\Admin\Logs\log file.txt I have to change the path name to point to my local disk drive when testing DTS packages locally and then change it back to the network drive when testing is complete. I'd like to use a common path name that will point to my local drive when testing and the network drive for production. Is this possible Thanks, Tom ...Show All
