Dave Patricio's Q&A profile
Smart Device Development Using Resources
Hi I have a solution with two projects : 1) Smartphone 2005 project (s_ui) 2) Pocket PC wm 5.0 project (p_ui) Project 2 (p_ui) has a usercontrol which is to be added in a form in s_ui. This Usercontrol (usrLogin) has to be multiple languages depending on the culture info on the device. It should detect if the device is using "Danish" da-DK or english. So I have made to resource files (resx) in the p_ui project, one named Resources.resx and the danish one called Resources.da-DK.resx. The two files contains the values "Test" - "Hello" and for the danish "Test" - "Hej". When the control is added in a s_ui project form, the resources does not change for my string. But if I make the two ...Show All
SQL Server Permissions
I posted a problem with connecting programmatically last week. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=590672&SiteID=1 Nobody seemed to have any suggestions, however since then, I've mucked things up and recovered to the same problem and now I've mucked things up again in a different way. Also last week I didn't mention that I was running my connection through remote desktop. That apparently can be a problem although not the fix. I'm still getting the ServerVersion member status set to "'this.conn.ServerVersion' threw an exception of type 'System.InvalidOperationException' when I try to create a SqlConnection . I still don't understand why. But when I try to open the connection I now get the follo ...Show All
SQL Server single report with the data from "Multiple data sources"
Hi, In my project i want a report. In that report data is getting from more than one data sources(systems). While creating data source view i used named query for both primary and secondary data source. But at the time of crating "Report Model" i am getting below error. An error occurred while executing a command. Message: Invalid object name 'Table2'. Command: SELECT COUNT(*) FROM (SELECT SerialNum, ModelNum AS com_model FROM Table2) t Is there any way to create a report with multiple data sources In my report i am using 2 tables. Table1 is in database(machine1). Table2 is in database2(machine2). i need INNER JOIN of table1,table2 . What are the differnt methods to do this What are the other opti ...Show All
Visual Studio 2008 (Pre-release) Dependency Property's
this is a follow up post about my problems with custom controls. essentially i am creating a graph custom control, however the graph must display any number of lines, consequently i cannot say (in generic.xaml) <Canvas> <Polyline.............../> <Polyline.............../> <Polyline.............../> ................... </Canvas> because i never know how many lines to create. this means that i need to change my CS code to allow for any number of lines. this will mean i have a situation whereby either the company who uses this software can say <lineChart......................> <linePoints................/> <linePoints................/> <linePoints................/> ....... ...Show All
Visual C++ How to get known of a function's arguments that is in a dll?
The problem is that I only have the .dll, nor the .lib or .h, thats why I dunno the arguments accurately. That fact is that I've got a program in Labview (so I've got the source code also) , and that program uses the mentioned .dll. So I know the name of the functions, but there are some problems around the arguments' types, although -as I see it- I gave the same types in visual c++ as they were used in labview.. :S I've got a labview source code. Here are the prototypes of the dll's functions: (That's how labview shows): long DevNew(Cstr arg1, CStr arg2, unsigned short int arg3); long DevWrite(unsigned char arg1, CStr arg2, long arg3); long DevRead(unsigned char arg1, CStr arg2, long arg3); long De ...Show All
.NET Development Error in receiving binary data from socket
Hello all :) Am trying to call an aspx page that returns the contents of a photo as a binary blob .. Am using the socket method Here is the code : using System; using System.Text; using System.IO; using System.Net; using System.Net.Sockets; /// <summary> /// Summary description for WebConnector /// </summary> public class WebConnector { public static Socket ConnectSocket(string server, int port) { Socket s = null; IPHostEntry hostEntry = null; // Get host related information. hostEntry = Dns.GetHostEntry(server); // Loop through the AddressList to obtain the supported AddressFamily. This is to avoid // an exception that occurs when the host IP Address is not compatible with the address family // (typical in the ...Show All
Software Development for Windows Vista MFC Multi-UI-Threaded Application Hangs under Vista but not Classic Windows theme
Hi, I have a MFC multi-ui-threaded application that hangs under Vista theme but not under Classic Windows theme. My application is a MDI variant I have a Main window that contains multiple child windows. However, the parent window and each child window run in their own ui-thread, CWndApp. Sometimes all my windows loads nicely. Sometimes, they don't. Please give me some ideas on what I should look at to get all the child windows to load correctly. Hi, Oliver! I'm glad to tell you the hung up was due to SetWindowPos on WM_ACTIVATETOPLEVEL. I would really like to understand how window drawing is different between Vista and Classic Windows. I learned that Vista has a composition ...Show All
Software Development for Windows Vista Vista slow boot
Every week or so, my two different installations of Vista Ultimate, release version, take a very long time to boot up, say 20-30 minutes and run really really slow, etc. One configuration is an ASUS P5W64, 2G, dual core, the other an ASUS P5AD2, 1G, single core. Both are setup for mirrored RAID SATA. The hard drive activity light stays solid thoughout this period. It is like the drives are being reoganized or something. Automatic updates are turned off. They also take forever to shut off. Power cycling does not necessarily fix it. Anyone have any thoughts or similar experience Once again I ran into boot up problems this morning. I had not done anything to the machine when I last shut it down. Same old ...Show All
.NET Development WebClient (HTTPS) Credential Problems
Hi, I'm trying to download the web page source code from a HTTPS URL, my code is as follows: System.Net.WebClient WC = new System.Net.WebClient(); NetworkCredential Cred = new NetworkCredential(); Cred.UserName = "user"; Cred.Password = "pass"; WC.Credentials = Cred; System.IO.Stream s = WC.OpenRead("https://xxxxxx/data.html"); System.IO.StreamReader sr = new System.IO.StreamReader(s); string webpage = sr.ReadToEnd(); I get a 401 (unauthorized) exception, and i am 100% sure the credentials are correct, and work perfectly in my web browser for the file. I have tested this code without the credentials, on a standard HTTP URL and it works fine. ...Show All
Visual C# execute method from another form
I would like to have a class with many methods used by all my project's forms. but how can access those methods available from inside of a form's class. thanks in advance, Edward well you simply create an instance of the class you wish to use, from any class (or any form, technically a form is a class file) and then execute the method however the method or property in question MUST be made public for other classes to access that method outside the class itself which has those methods. Example: //class Test public void DoTest() { //do stuff } //main form: Test theTestClass = new Test(); theTestClass.DoTest(); //will execute this method, since its accessible and exists in the ...Show All
Visual Studio Team System Adding new window during Checkin-event
Hi.. I am trying to add a window which selects the reviewer during the checkin event. How do i capture the Checkin- event and how do i start the .exe file that opens up the window Thanks Aravind There is no check-in event on the client. There is a Check-in event on the server. But subscribers of this event will be notified after the check-in is complete (this is a post event) For your case you have to write your own check-in policy. Take a look at the following http://msdn2.microsoft.com/en-us/library/ms181281(VS.80).aspx http://blogs.msdn.com/jmanning/archive/2006/02/02/523125.aspx ...Show All
Visual Studio Express Editions Creating a media player.
hello, i am completely new to Visual C#, and i am wondering how to play music. i am mainly trying to make a media player with a web browser, but i am extremely confused on how to do this. i have googled this subject many times over with no luck. i dont know, maybe i am missing somthing. any help would be nice. i just got into C# about 4 days ago. go easy. :) well you would be better off using a WMP COM component. This will allow you to embed WMP into your application then you simply give it the path to the file via the URL property and you can play/pause and increase/decrease volume http://msdn.microsoft.com/windowsmedia/downloads/default.aspx you can drag this control onto your form. In design vie ...Show All
SQL Server Read CSV file - Save Columns into Rows
I want to import CSV file and convert columns into rows depending on Customer count(2nd record in each row of CSV file) and save to SQL table --CSV file format State, Customer_Count, Name_1, Total_1,Name_2, Total_2,Name_3, Total_3..can go upto 600 GA,2,'John Doe',14.00,'Roger Smith',15.00 FL,3,'John Doe',14.00,'Roger Smith',15.00,'Sally Cox',16.00 SC,5,'John Doe',14.00,'Roger Smith',15.00,'Sally Cox',16.00,'James Brown',17.00,'Rick Davis',18.00 Data in SQL table from csv file should look like this State,Name,Total GA,John Doe,14.00 GA,Roger Smith,15.00 FL,John Doe,14.00, FL,Roger Smith,15.00 FL,Sally Cox,16.00 I have multiple CSV files with millions of records. How can i achieve this using Integration Services or Bulk Data ...Show All
Windows Forms GUI problem
I have a problem I don't know how to solve: There are two controls on my form, lets assume two TextBoxes. The Leave event of the first TextBox disposes the other one - so if the focus is on the first TextBox and there is a mouse pressed on the second one - there is an exception because the second one is disposed and can't get the focuse. I know it is weird but I need it. Help anyone Thanks okay I guess I have to explain why the hell I want the component to be disposed. well - all the form is refreshed. Old components are disposed and new ones are created. ofcourse I can avoid diposing it and do it later, but the question is must I do it later - because my only problem is the mouse click on other component ...Show All
.NET Development Using Regex/Match to find decimal Index location from RightToLeft.
I am trying to find the decimal index location from RightToLeft using Regex/Match. When the code below runs, I keep getting the index value from LeftToRight even though I specified RegexOptions .RightToLeft . What am I missing here Regex r = new Regex ( @"[.]" , RegexOptions .RightToLeft); Match m = r.Match(tbMainInput.Text); if (m.Success) { m.Index.ToString(); } Thanks for your help... string test = "123.4561" ; test = test.Substring(test.LastIndexOf( "." ) + 1); int index = test.Length; Console .WriteLine(index); ...Show All
