cosmmm's Q&A profile
Visual Basic Checking negative values in a DataGridView
Hi there, I have one dataGridView and there are some columns. I'm using DataGridView to capture some values and one of the column can accept either whole numbers or decimal values. What i do want to check it - sign or negative value as I don't want the user to input any - value. Is there any way to do it Thanks in advance Bye Hi Check out the System.Math.Sign function ... it returns -1 for negative values, 1 for positive and 0 for zero. Richard ...Show All
Windows Forms Datagridview
Hi all, If i enter a value in a datagridview cell, datagridview automatically generate a new row following the editable row. I dont want the newly generated row automatically instead as i intend.Help me please to resolve this problem ...Show All
.NET Development Locale of ThreadPool's Thread
Is there any way to modify CurrentCulture/CurrentUICulture of ThreadPool's threads OR to set the default values of these properties for every thread created within a process hmmm... that means I have to set the culture in whatever function I pass to QueueUserWorkItem . I think there should be an option to set the default culture for all threads within a process. Framework might want to change (talking about TP) it for its own but can restore it before calling the user code. ...Show All
Windows Forms How to read a richtextbox's text but ignore the line begin with a remark(*)
I got a text file as show as below, *THIS IS MACRO #4 LOAD BLADE HOME *MD4 *AX *AC20000 VL500 (FOR 1/2 STEP) *HM0 *MA20 GO (FOR 1/2 STEP) MD4 AX AC20000 VL500 HM0 MA20 GO ^Z Then, i had open it and display it at a richtextbox. Now i want to display it at another richtextbox except the line begin with a remark(*). The another richtextbox will only display MD4 AX AC20000 VL500 HM0 MA20 GO ^Z Can someone tell me how to do this Thank you. Use the string Split method and split on Environment.NewLine. Then parse each line to see if you want to remove it or not, and build the string you want in your new text box. ...Show All
Visual C++ Disable Found New Hardware Wizard
Is there a way to prevent (with some API calls) the Found New Hardware Wizard from starting when a new device appears. I need to write a service that will install the drivers for a device when it appears without any user assistance. The actual device is not known beforehand, so the preinstalling of the required drivers before the device is plugged is not an option. zelenoto wrote: Is there a way to prevent (with some API calls) the Found New Hardware Wizard from starting when a new device appears. Yes it should be possible using WMI. You can either write your own script if you understand WMI well or search the net for WMI scripts to do this. BTW this question ...Show All
Game Technologies: DirectX, XNA, XACT, etc. TorqueXNA
I had a look at the XNA version of the Torque 2d engine and noticed that it converted 4mb worth of png files into over 60mb of xna files; Is this a Torque issue or xna as its a massive increase and would make releasing any games online a virtual impossibility. Thanks Shawn, but I'm not sure if that answered the question. For example, I have a splash screen that goes from 5.21kb in PNG format to 1.10MB (1126.4kb) in XNB format - over 216 times bigger. Is there something I have to change in the properties for that file to keep it from getting inflated ...Show All
SQL Server Scheduled SQL Server Agent SSIS Package Job Problem
HELP! I have been banging my head against a brick wall on this one all this morning AAAAAAGGGHHH! 1. I have an SSIS package that runs a simple SQL script and then updates a few tables by downloading some XML of the web. It runs fine when I kick it off manually under SSMS. 2. I created a SQL Server Agent job to run it every day. This always fails. The error information in the log is useless ("Executed as user: domain\user. The package execution failed. The step failed." - I had already figured that out!). It fails almost straight away, and when I enable logging for the SSIS package, no info is ever logged (text file, windows event log, whatever). 3. Out of desperation I have changed Agent to run under the same domain user ...Show All
.NET Development Com Object in .Net on an x64 machine.
Ok So I have written MANY Com objects in .net that are used in vbscript and elsewhere with no real hitch on x86 platforms. I have run into a perplexing problem when writing a trivial COM object and trying to invoke it from wscript or cscript on an x64 box. Here is what I have done: Write a tiny com object in VS2005. Mark the Class ComVisible(true) and set the Project properties 'Make assembly Com-visible' to true. using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace Comtest { [ComVisible(true)] public class MyClass { public MyClass() { } public string GetDate() { return DateTime.Now.ToString(); } } } Build the class (Mar ...Show All
SQL Server Problem in Totalling of Pivot Tables
HI All, I am unable to understand why it is happening and how should I resolve this. For e.g. I have a FactTable Sales with values mentioned below MaterialCode SalesQty 500001 100 500002 100 500003 200 500004 200 NRV Value Fact Table MaterialGrpCode NRVValue 100 5 200 10 Dimension Table Material MaterialCode Material Name MaterilGroupCode 500001 ABC 100 500002 XYZ 100 500003 FGH 200 500004 IJK 200 Dimension Table Material Group MaterialGrpCode MaterialGrpName 100 A 200 B Calculed Member Measure SalesNRVValue = NRVVal ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Color Banding
I am getting color banding issues when viewing my project on my Xbox 360. The textures look perfect when the app is ran on windows, using the same XNA source just in a different project. But when I display the textures on an Xbox 360, I get serious color banding. These issues are most pronounced when my Xbox is set to output at 720p or higher resolutions, but the color banding is still there even if the Xbox is set to 480p. The following code is what I am using to setup my 'prefered' values for my graphics device. If you got any idea what could be causing this, I would appreciate the input. graphics.IsFullScreen = true ; graphics.PreferredBackBufferFormat = graphics.GraphicsDevice.DisplayMode.Format; graphics.PreferredBackBufferH ...Show All
Software Development for Windows Vista Visual Studio 2005 Macros and 5744
Macros in Visual Studio seems to have stopped working in Vista RC2. When attaching to vsmsvr.exe exceptions are thrown when you try to run a macro from devenv.exe. From debugging the disassebly I think it is a access denied message. I also saw a string "Bad IL format" if that helps. Anyone have an idea how to solve this issue without waiting for RTM or going back to RC1 I don't get any exceptions or other errors. But it does not work either. Running a macro does nothing. Debugging macros is the same... nothing happens. Probably this is something to be fixed in the RTM SP1. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Simple Menus (Download)
As our first sample we have created a simple menu system that loads from xml. The menus can resize, move, and write text to the titlebar. Check back for the variable width font sample coming soon. Please let us know what you think Submit@XNASpot.com Download: http://www.xnaspot.com/Sample_SimpleMenu.aspx The example won't run because of these Call Stack Errors: > MenuSample.exe!MenuSample.Game1.Game_Starting(object sender = {MenuSample.Game1}, Microsoft.Xna.Framework.GameEventArgs e = {Microsoft.Xna.Framework.GameEventArgs}) Line 71 C# MenuSample.exe!MenuSample.Program.Main(string[] args = {Dimensions:[0]}) Line 14 + 0xb bytes C# edit - If I pursue the execution, I get an exception error on this line of UI.cs: Stream stream ...Show All
SQL Server Datamining Viewer Client Problem
Hello! I am running a SQL Server 2005. I created the mining models from the tutorials. I can connect with the DataminingViewerClient directly on the SQL Server(i.e. to localhost), but when i try to connect to the Server from my other computer it is not working i always get connection faild and i should check that the server is running. I can connect to the Server with other programms but the viewer is not working. Any ideas what that could be Ok i now tried to connect from Server A to Server B, not working either. It works on both when i run the viewer directly on the server and connect to localhost but not from Server A to B or vice versa or from any other computer. Could it be that some permission ...Show All
SQL Server Sql Server Express Error: 18452
I'm using Sql Server Express on Windows xp Home Edition, I have created a user FAB in Sql server and then I have given it the rights as a server adminstrator. For creating a user I have followed the video tutorial from the web site of SQL Server Express. But when I want to connect with SQL Server Express using Sql server authentication it gives me the following error: Login failed for user 'FAB'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider) Error Number 18452, I have searched [ Sql Express Error 18452 ] from google and read many articals but I can't find any artical which can solve my problem. Can anybody help me please Shahid Mahmood Lo ...Show All
Visual C# FileDialog and HookProc
Problem: I would like to find and example of a class derived from the abstract class FileDialog that overrides the HookProc methods for special functionality. I would like to obtain a selected file name; the file name provided by-Microsoft-design includes the full path to the file name, the filespec and its extension (basically the whole filename). Additionally, I would like to obtain a list or collection of all the file names found in the selected folder or directory list by the FileDialog (OPENFILENAME) list box control which hold the file names. When the FileDialog window closes I want to add the file names from the FileDialog window (modal dialog) to another UI list box control; I want this receiving list box contro ...Show All
