風清揚's Q&A profile
Visual Studio Express Editions rounding down
helllooooo. im having a problem making a simple converter of minutes, into hours and minutes left over. when it gets to the upper part of the 60 minutes, the hours label goes up to 1 hour and it may say 1 hour and 45 minutes, for 45 total minutes. this is because it rounds up itself, is there a way to round this label down or sumthing If you have a number of minutes, you could pass it into a DateTime constructor, with all 0s for other values and so pull out hours and minutes afterward. Or you could use Math.Floor(minutes/60) and minutes%60 to calculate it yourself. The first rounds down the hours value and the second finds th ...Show All
Visual C++ Crash on delete and MSVCR libraries confusion
Hi All, I'm trying to debug a strange crash at pointer delete (I'm porting an application from VC 2003 to VC 2005). ntdll.dll!7d61002d() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!7d681da1() ntdll.dll!7d659cee() ntdll.dll!7d642da9() > msvcr71d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x06610000) Line 1807 C kernel32.dll!7d507df5() msvcr80d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x0ac5a790) Line 19 ...Show All
Visual C++ Converting Project to Use msvcprt.lib instead of msvcirt.lib
I am attempting to convert a project to use msvcprt.lib rather than msvcirt.lib. When I run nmake on the .mak file I am getting an error 'unable to open msvcirt.lib'. I have removed all references to msvcirt.lib in the .mak file. The error is actually occuring at the linking stage, so it looks like the reference is inside an embedded library. As far as I know I have successfully rebuilt all libraries used by the application with msvcprt.lib in place of msvcirt.lib. I am probably picking up the reference to msvcirt.lib through an include file, which includes an include file, which .... Any ...Show All
Windows Forms Haw can i draw text with different size font.(DrawString)
I need to draw text(ex. textfile) on form. But i need to use different size of words. For example: "I like my dog Puffi" words "Puffi" and "like" i want to be 12 Arial... Help, please! You'll have to draw each region of differently sized text separately. If you want Puffie and like to be larger that means splitting the  ...Show All
Software Development for Windows Vista How to display full target information in desktop shortcut in .NET Deployment
Hi All, Before I go to the question, the application that we developed used two type of arguments to distinguish between demo and non demo. Language is C++ MFC and the IDE is VSNET.2003 Does anyone know what need to be done in terms of deployment for application's DESKTOP SHORTCUT that needs command line argument in Windows At this stage, I can create a shortcut after the installation, only that, when I right click the shortcut (Properties >> shortcut (tab)), the target information is locked / blanked where I can't input my own argument. However, if I create my own shortcut (Right click, New >&g ...Show All
Visual Studio Express Editions Visual Studio 2003
I bought a new PC and need VS 2003. VS 2005 is not an option because the cross-compilers I use are not supported by 2005. How do I buy this online I cannot wait for a CD to be mailed. Thanks If you can't buy it locally, the only option I am aware of is to buy an MSDN subscription, which is quite expensive, but would allow you to download it. ...Show All
SQL Server Insert into Table with no values using the identity column
Hello Everyone! SQL Question: Can you insert a record into a table that has an identity column with no values (on condition that the other fields in the table allow null or have default values). Such as: Insert into Table () values () //Auto increment record with no other values Possible Let me know if you need additional information. Also, if you want to explicitly define the identity value, use SET IDENTITY INSERT tablename ON Then do the insert, then turn it off again. ...Show All
Visual C# C# Insert Statement
I am using Microsoft Access database and I am trying to Insert a new record in a table. I have the insert statment. When you use varables that are string you have to put single quotes around it but what do u put around the System.Dateandtime.Now to insert it in the database. If you use the single quotes on it it throws a syntax error if you don't use anything it throws the same error. the field that I have in the table is a date/time field. Can u help You put octothorpes (pound sign) around a date, like this: "INSERT INTO TableName (MyDate) VALUES (#10/20/2005#)" ...Show All
Windows Forms draggable picture
Hi.. i am new to vb.net programming. I need a help in making a draggable picture. like moving a picture box or drag a picturebox. how can i make a draggable picturebox in vb.net. any help is welcome thanx OK. If you want to move a picturebox around a winform, you can use the picturebox.location property to drag it. But what if you&nb ...Show All
Visual C# Append XML document... what the heck!?
I have an XML file that looks like this: < xml version ="1.0" encoding ="utf-8" > < configuration > < appSettings > < add key ="SQLServer" value ="Something" /> < add key ="TitleBar" value ="Something Else" /> </ appSettings > </ configuration > I have been trying write a program that appends this xml file. I have tried and tried, but the closest I got was adding a key and value, but it was added AFTER the </appSettings>. I want the new keys and values added within the &l ...Show All
Visual Basic Basestream.seek
Hi, I need to read lines backwards in a TXT file with a fixed length for every line. I'm using Dim linetxt As String Dim counter as Integer = -56 'Which is the length of the lines Dim data_r As New StreamReader(data_path) 'data_path contains full path and name for the file data_r.BaseStream.Seek(counter, SeekOrigin.End) linetxt = data_r.ReadLine And this produces good results for a first reading. But last two lines are inside a loop where the counter is decreased everytime to get the previous line. Once the first reading is done, subsequents readings are wrong as Seek is moving the pointer in the Bas ...Show All
Visual Studio Tools for Office Insert a blan line
How can I insert a blank line in a smart document I wan t to insert some text, then insert a blank line an then insert some other text how can i do this Thx Hi Try something like that: object br = WdBreakType .wdLineBreak; Application.Selection.Range.InsertBreak( ref br); Regards ...Show All
Visual Studio Intallation of VS2005 beta 2
I tried to install the new version on A PC with 2 operation system 1. windows 2000 with VS2003 2. Xp Sp1 clean installation For installation I download the standard edition from MSDN developer site. I tried to install it on the Xp system. I get an error code of 2908 and after press ok I get an error code of 1935 with error regarding it assembly component {18A752B8-D6F4-4F1C-B2EA-CA7876F45A03} Can someone help avi Cohen Scitex vision avi_cohen@scitexvision.com The problem is how to open the iso file if you download it from microsoft site. If you use the IsoBuster dont use the red button (iso) use the blue one (>>& ...Show All
Windows Forms How to access API Call which returns string in C#
hi I am having problems with the following C# code: [DllImport("Stamin32.DLL")] public static extern String DxXCrypted(String Txt, String Key, long Offset); String h; h = DxXCrypted(text,key,0); h is null after execution ( never gets populated ) However VisualBasic code( see below) for the same purpose works fine. I wonder whats worng with the C# code. Declare Function Dx ...Show All
SQL Server Time Dimension error
Hi, I've created a cube and now i'm trying a add a time dimension, it gives me an error. the time dimension i've created is using server time dimensions which has year, quarter, month and date attributes, when browse the dimension it looks fine but i'm trying to add this to cube and try to process cube it give a me this error Warning 1 Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_Ticket, Column: SalesDateTime, Value: 9/21/2004 4:29:53 PM. 0 0 Error 3 Errors in the OLAP storage engine: The process operation ended because the number of errors encountered during ...Show All
