YewMing's Q&A profile
Windows Forms multiline problem
i have likes this equation; "label1.text = textbox.text" when my users click my button my form get the index of textbox to label but it arrange auto size for label and enlarge the width of label ;;; but i want this, when text is reached to 10 letter so text must continue to new line; summary i need multiline property in label; is it posssible and if it is yes how can anyone help to me; your sincerely; You can calculate the text height your self some thing like private void SetLabelHeight( string text) { //Get Graphic object Graphics g = label1.CreateGraphics(); //Get Text Height SizeF size = g.MeasureString(text, label1.Font, label1.Width ); //set label Height label1 ...Show All
Smart Device Development VB 2005 & SQL Server 2005 Express
Hi guys, this is my first post here, im a VB Win developer with some experience, and now id like to try Smartphone programming, but i reaally need some help, heres my case: Im using VB 2005 and i have installed SQL Server 2005 Express. I create a new project and add a reference to System.Data.Sqlclient, located in: C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v1.0 Then i procceed to import the namespaces: Imports System Imports System.Data Imports System.Data.SqlClient Since i just wanted to test if the connection works just like it does in VB Windows Applications, i added a Textbox (named Textbox1 ) and added the following code in the KeyPress event: Dim strconn As String = "Data Source=XZIBIT;Initi ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Managed, yes, but which one?
I understand the XNA Express pack will let indie-style game developers and hobbyists develop for multiple platforms, INCLUDING Xbox360. I've heard that we'll have to code in a "managed" language. My question is this: Yes, C# is managed, but will we be able to develop with Managed C++ The Managed extensions in VC++.net make it a managed language, and there's many devs who love C++ and despise/hate/loathe C#. I'm one of the latter ^^; cybikbase wrote: I understand the XNA Express pack will let indie-style game developers and hobbyists develop for multiple platforms, INCLUDING Xbox360. I've heard that we'll have to code in a "managed" language. My question is this: Yes, C# is manage ...Show All
Windows Forms Datagrid rows remove at problem
Dear All, I have a small form where there is several text box n a submit button. When I click the submit button the values are populate into a datagridview using dataGrid.rows.Add method. Then I also have column of checkbox where user can select which of the rows to be delete. Thus I run a for loop to determine which of the checkbox is checked and by using dataGrid.Rows.RemoveAt() I perform the delete. The problem is over here. For example I have 6 items and I select item 5 and 6. During the for loop first item 5 gets deleted and then the datagrid size becomes 5 and item 6 cant be delete How can I solve this problem of the datagrid refresh Hope some one can help me pls. Thanks in advance. For ...Show All
Visual Basic Load an Executable From a Service
Hi, I have a very huge application and it will take me ages to convert it to run as a service, is it possible to create a service that when loaded calls my application if this is not possible what can I do Thanks in advance George not entirely but there are work arounds. Firstly, you need to run the service in your user account than the local system network account (as 99% of services do) in order to run your executable. You can they try to use System.Diagnositcs.Process.Start(" Path\file ") to see if it will execute your application from a Service but not really recommended as the whole point on a Windows Service is to be independant/alone and work in the background ...Show All
SQL Server Clustering Dimension
I am new to data mining and have a question about OLAP dimensions built from models. Do you know if you can use a dimension that was created by the mining model wizard in the same cube that is being used as the source for mining model it self I keep getting an error about a dependency loop and just want to make sure that I am not trying to do something impossible. If this is illegal, do you know of a way of doing this without essentially having one cube dependant on another via a mining model and dimension I tried to use the wizard to create a mining off of a table but it did not give me the option of creating a dimension from it. You have to create a new cube that is "essentially" dependant on the other ...Show All
Visual Studio Express Editions MSXML from a Dll
I have written a DLL for use with mIRC, which connects to a local shoutcast server and downloads and parses the shoutcast XML stats. When i run the code i have written from a console application, all functions correctly and the document is parsed, however when i compile the code into a DLL and run from mIRC, the XMLDocument::load method fails, any ideas why Here is the section of code causing problems: std::string f_xml("http://localhost:8000:admin.cgi pass=mypass&mode=viewxml"); _variant_t varf_xml(f_xml.c_str()); IXMLDOMDocumentPtr DOMDocument; IXMLDOMNodeListPtr NodeList; IXMLDOMNodePtr NodePtr; IXMLDOMNodePtr ChildPtr; EVAL_HR(DOMDocument.CreateInstance("Msxml2.DOMDocument.6.0")); ...Show All
SQL Server ADO 2.7 with sql server using oracle syntax
Hi, I've been tasked with investigating how we can migrate from oracle to sql server. I have successfully converted a typical schema with 97% success using SSMA and have a query regarding ADO and oracle syntax. I have heard that the SQL server provider can interpret oracle syntax into its own syntax, but i am unable to find any reference/examples on the web. Is this possible and if so could any kind soul please post some links. Thanks in advance, Michael The SQL Server provider (SQLOLEDB or SQLNCLI for SQL Server 2005) does not directly interpret Oracle SQL syntax if that's your question but you can get at Oracle data from SQL Server in a linked server scenario or by using the OPENROWSET T-SQL command. Se ...Show All
SQL Server I can't debug my SQL Server project
I'm coding a TVF in C# and the debugger doesn't stop at all. It used to work when I was coding scalar functions, but it stop working since I removed my assembly from the DB and register it manually to test my SQL scripts. I removed the assembly again from my DB and re-deployed it with VS.2005 hoping that will fix it, but it didn't work. Right now I can't debug. Have anybody had a problem like this before Any help will be appreciated. Got it. There was a problem with a commented section in query. Thank you. ...Show All
.NET Development Creating Subdomain
I'm Writing a weblog application and it's almost finished but I have a big problem, I don't know how to create subdomains programitically for example when you go to www.blogger.com and you create a new weblog they will create a subdomain for you automatically. How can I create subdomains with ASP.NET programming Better Post this Question on ASP.Net Forums, All here are dealing with Sockets, IPs NetworkStreams, ssl, FTP etc. So may be you cant get answers here! So give it a try here: http://forums.asp.net I hope this will help you better than doing here! Best Regards, ...Show All
Windows Forms Windows Form Dictionary
Hi All, I want to make a dictionary with windows application. My data is html format. therefore, i use webBrowser control on my windows form. If the user click any word in webBrowser control, word mean must browse to user (like babylon). I have a windows form. My form has webBrowser control. I fill a html content with javascript (Dictionary.js) to webBrowser. Javascript (dictionary.js) can obtain the word if user double click on the word. I must to send this word another windows form. Thus, i will learn this word mean. My question is; Can the javascript call the windows form server code if it can not, how can i do that Note: Visual Studio 2005 C# Thanks any suggestion. Oznur I mea ...Show All
.NET Development Dataset to Xml file with sub nodes
Hi, I am trying to write an XML File in the following format <xml> <Person> <Name> <FName>John</FName <LName>Philip</LName> </Name> <Address> <Blk></Blk> <Unit></Unit> </Address> <Sex>Male</Sex> <Age>33</Age> </Person> <Person> <Name> <FName></FName> <LName></LName> </Name> <Address> <Blk></Blk> <Unit></Unit> </Address> <Sex></Sex> <Age></Age> </Person> </xml> I have a dataset (dataset schema) with multiple tables. Table 1 with Person information, Table 2 with Name information, and Table 3 wit ...Show All
SQL Server databases on SAN will not reattach @ SQL server reboot
Hello. I have a SQL 2000 server running on server 2003. The databases are located on a lefthand networks SAN. At SQL server reboot, the databases will not automatically reattach. You can however manually attach them. Nick, We have seen this frequently on our SQL Server instances connected to our Lefthand SAN. In every instance of the problem, restarting the SQL Server instance/service after the boot had completed fixed the problem (rather than going through and manually attaching each database). As others have mentioned in replies, it is just a matter of the SAN Volumes not getting finished mounting before SQL Server tries to bring the databases online. ...Show All
Visual C++ How to write a UTF8 Unicode file with Byte Order Marks in C/C++
What is the correct way to write utf8 byte order markers (BOM) to a UTF file with WriteFile I tried this... TCHAR* sbuffer = TEXT("Some text in a utf8 file"); char * smarker = ( char *) malloc(4); smarker[0] = 0xEF; smarker[1] = 0xBB; smarker[2] = 0xBF; smarker[3] = 0x00; WriteFile(hFile, smarker, 3, &dwBytesWritten, NULL); // write the bom free(smarker); WriteFile(hFile, sbuffer, (_tcslen(sbuffer) + 1) * sizeof (TCHAR), &dwBytesWritten, NULL); // write the data + null When the file opens in notepad the BOM does not display (good), but each character has a space showing after it. ie.. "S o m e T e x t ...." My original need ...Show All
Software Development for Windows Vista Shortcuts for "all users"
Hi, Is there a way to create desktop shortcuts programticlly (c++) for all users without administrator privileges. My client add applications to the user and I want to create shortcuts for them. Will it help calling directly to msi to do that Shapupu You must have administrator privileges to create desktop shortcuts for all users. Even if you use MSI you will receive the elevation prompt. You could simply create the desktop shortcut for the current user, especially since you won't be able to add the application to HKLM or Program Files unless you are elevated. ...Show All
