Mohsen Kokabi's Q&A profile
Windows Forms How can I drag my form? Can I multiply fractions?
Hello, I noticed I can make the form border to none and get rid of that boring titlebar. Is there anyway I can make a bar to go on the left side that will drag the whole form when a user clicks it. Also is there a way to multiply, add, subtract, and devide fractions I want to be able to do the code below with fractions and have it come out as result as a fraction(not a decimal): public void myMathProblem() { int one 5; int two 6; int Result; string result; //Is there any way to do this with fractions but not turn them into decimals and have //Result to come out as a fraction anserw Result = one + two; result = Result.ToString(); label1.Text = result; } Thanks Hi As for y ...Show All
SQL Server capture line of flat file [Error]
Hi, I have a flat file with several rows of entire type in one of the rows a string comes and when it goes away to guard in the BD it falls, since I can know in that this row of the flat file the string PastillaReturn wrote: Hi, I have a flat file with several rows of entire type in one of the rows a string comes and when it goes away to guard in the BD it falls, since I can know in that this row of the flat file the string Sorry, this is getting lost in translation. Do you mean that you require to know which row(s) of the flat file failed -Jamie ...Show All
Visual Studio Deployment of Package in MS Dev 2003
I am having trouble deploying my VSIP Package in Dev Studio 2003. The merged menus are not available when running Dev Studio (this works in the debugger). I followed the directions in the Deployment guide, including: * Added the elements to the registry: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Packages\{<guid>}] "ID"=dword:0000006a "MinEdition"="Standard" "ProductVersion"="1.0" "ProductName"="<product_name>" "CompanyName"="<company_name>" @="<short_name>" "InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll" "Class"="<fully qualified className>" "Assembly"="" "CodeBase"="<full path to DLL>" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Packages\{<guid>}\SatelliteDll] ...Show All
Visual C# StringBuilder and System.Windows.Forms.Label
Hi I am trying to get all my links in a Stringbuilder and show them by a Label like this: DataSet LinksDS = GetLinks(); if (LinksDS.Tables[0].Rows.Count > 0) { StringBuilder sb = new StringBuilder (); sb.Append( "<UL>" ); foreach ( DataRow dr in LinksDS.Tables[0].Rows) { sb.AppendFormat( "<LI><A href='{0}' target='_blank'>{1}</A></LI>" , dr[ "LinkURL" ].ToString(), dr[ "LinkName" ].ToString()); } sb.Append( "</UL>" ); LinksLBL.Text = sb.ToString(); } but the problem is the label shows everything like this <UL><LI><A herf='http://www.canada.ca' ..... ...Show All
Visual C++ TerminateThread ???
In MSDN it is mentioned that TerminateThread is dangerous function and given some disadvantages of using it. So we should never use TerminateThread If so then what is the use of this function Consider a situation where I am calling a function from third party library and that function some time takes long time to return may be 5 hours or may be more than a day (I am not sure about the reason and that is not in my control). I need to implement some timeout mechanism so I called that function in a thread and waiting for 15 minutes to return it and then terminating the thread and proceeding further. The thread is just calling that function doing nothing else. So is it ok if I call TerminateThread to terminate that thread after tim ...Show All
Visual Basic Change class template
Does Visual studio use a template file when adding a class to a project and can we change it I would like that when I add a class that the file automatically contains some comment. Another option could be to create a snippet with all the structured comment code in it. Then you can insert the 'comment' to any class, procedure, module, etc. ...Show All
SQL Server Managing Selection defaults for (Select All) option
We have the hotfix for the (Select All) option applied (after applying SP1). However, when the users change another parameter filter which cascades to change to the multivalued parameter filter, the (Select All) option is not reapplied. In other words, if new entries show up in the multivalued parameters list, they are not checked by default, so some records will be missed. What is the best way to force a (Select All) again after the user filters on another dependent parameter filter ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Multiuser games?
Just curious... but has anyone used XNA/C# to develop MOG's or even MMOG's @jackline Yes, lots of people have created C# multiuser environments. Just look up client/server projects over at The Code Project, example (http://www.codeproject.com/cs/media/mdxsnake.asp). Easy, and good for a small number of players. That said... I've seen some MMOG C# projects, but honestly they don't get far off the ground. Mostly because it's hard to get the kind of support you need to make an efficient MMOG system. But also because an MMOG server should never be written in anything other than C/C++ simply because of the amount of data you need to move and info you need to process. One should never say never...but you do lose 15-20% performance moving ...Show All
Visual Studio 2008 (Pre-release) How to ... RichTextBox
Hi, I am using a richtextbox control and upon selecting a portion of the text on the control i need to find if the selected text is bold or not... similarly i need to do the same for the rest of the property like Italics, underlined... and so on... The code below gives me the text selected : ********************************* rtbWordDocument.Selection.Text.ToString() *********************************** But how do i find the properties / style of these selected text ~Ram you need to keep in mind that if the selection has normal and bold text then you cannot you wont get the property....other than that lee's soln will work ...Show All
Visual Studio Express Editions Real Time Display
Anyone knows how to implement a real time, time on a label in VB.Net 2005 (ASP.Net 2.0) My thought here is VB Express doesnt allow creation of web pages, thats visual web developer or other VB/VS products If would also recommend using the ASP.NET forums at forums.asp.net This is really there domain and they should be able to help assist you in getting a realtime label working. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. C# directinput Forcefeedback error
Hi. I have just bought the new logitech G25 wheel. Im download the aug2006 direct SDK for my VS2005. When I start the C# example FFconst it's not working. I get the error message "No force feedback device is found". The C++ sample works fine. Will this problem in C# be fixed to the next release Best regards Henrik Is there any way around this problem in C# I would really like to use the forcefeedback function in my C# program. Must I write C++ function calls to handle the force feedback Best regard Henrik ...Show All
Visual Basic deleting a record from a sqlexpress db
Hi I am using the code below to delete the current/active record from my Sql express db If (MsgBox( "Are you sure you want to delete this record " , MsgBoxStyle.YesNo) = MsgBoxResult.Yes) Then BindingSource1.RemoveCurrent() BindingSource1.EndEdit() End If This does remove the record. However if I close the app and go back into the app the record reappears How do I get the app to permanently delete the record without it reappearing I have tried placing a save button on the form to try and save after deleting. code below Me.LaheySerTableTableAdapter.Update(Me.Database1DataSet4.LaheySerTable) This doesnt save and gives the following error.. Update requires a valid DeleteCommand when pass ...Show All
.NET Development Unknown error "-1".
I am getting the following error when trying to use File.CreateText(filepath) Source: mscorlib Message: Unknown error "-1". We are only seeing this error on a few of our client machines (they are all XP Pro). We are unable to reproduce it in-house. Luckily I've been able to remote into one of our client boxes in order to fix the problem. Here are the steps that I have taken: 1. I've given the folder that we are writing to permissions for everyone full access (just in case). 2. Re-Installed the 2.0 Framework We are writing to the folder "Documents And Settings\All Users\Application Data\AppName" Our code is able to create the folder Under the "All Users\Application Data" I'm not sure w ...Show All
Visual Studio Express Editions How to get Function codes list for CTL_CODE
Hi, I wish to get the Function codes list for CTL_CODE, but I don't have any idea where to download it. Can somebody help me For example: #define CTL_CODE ( DeviceType, Function, Method, Access) Function <-- 0x0 - 0x2047 are reserved for Microsoft Thanks What I trying to ask is CTL_CODE list. But I cannot get that kind of information for the web you posted. For example: CTL_CODE(FILE_DEVICE_UNKNOWN, 0x813, METHOD_BUFFERED, FILE_ANY_ACCESS) This line is to command CPU to go into C1 state. How we know 0x813 is the function that command CPU to go into C1 So what is the function that command CPU enter C4 Is 0x814 ...Show All
Visual Studio Team System How do you hit specific runtime engines using webtests?
Hi, I am wondering how do you hit specific runtime engines using webtests Example: search.sample.com can point to 1 of 3 IPs login.sample.com can point to 1 of 5 IPs etc. I need to be able to check them all, but have not figured out how to do it. Manually we would just change the host file. Thanks in advance! I think you will find your answer here. http://msdn2.microsoft.com/en-us/library/ms182637.aspx This gives an overview of how to admisister a test rig. This page references "IP Switching" which is the functionality I think you're looking for. Thanks, Rick ...Show All
