davidelloyd's Q&A profile
Windows Forms WM_PAINT
Hi, I'm using a windows form, and i want to repaint an area of the form continuously using a HBITMAP which is pointing to a bitmap that is continously changing. I've had a look around, and it appears WM_PAINT may be what I am looking for. Could someone please tell me how I would go about using this function I'd like to click a button in a form, and by clicking it, my code-generated animation will play on the form. Thanks in advance, Ljubica ...Show All
.NET Development Error on adding custom section to roaming users configuration
Hi, I'm actually trying to write a custom configuration section class and use it to write into a roaming users file. I took the base code on MSDN Help, but the example works only with ConfigurationUserLevel.None. In my application I like to use ConfigurationUserLevel.PerUserRoamingAndLocal. In fact all works well, I can build the section object, and can attach it to the configuration, but if I try to set the SectionInformation.ForceSave to true or try to use the Save method on the configuration himself, an exception will be thrown with Message "ConfigurationSection properties cannot be edited when locked". The lock will exactly be done on ad ...Show All
SQL Server provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
Hi All, I am new to dotnet. I tried connecting to the database MS SQL Server 2000. I gave the code like, the one below, in form load event, SqlDataReader dr = null ; SqlConnection myConnection = new SqlConnection("Data Source=IP;Initial Catalog=name;User Id=uid;Password=pwd;"); myConnection.Open(); myConnection.Close(); But I could not connect. The error message highlights the line myConnection.Open() and displays the error An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default setti ...Show All
Visual Studio Tools for Office Infopath listbox question
I have a listbox on my form that gets its values from a sharepoint list. For normal users of the form, the values are filtered. I would like to have the filter go away for specific users. I'm stuck on how to accomplish this. Can I programmatically change the filter that is on the values of a drop down list Hi, I have re-posted this question on the InfoPath news group... http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.infopath&lang=en&cr=US Darryn Lavery [MSFT] ...Show All
SQL Server Cluster nodes
Hi All, I've heard in a presentation that the number of supported nodes in a cluster on 64bit system is going to be limited to 4. Can you confirm that What about the number of instances These are the informations that I have: 25 in a cluster (a drive letter is required per cluster group) 50 in a standalone server with Enterprise Edition 16 on the other Edition Can you confirm as well Thanks for your response. Jerome SQL Server 2005 Enterprise Edition will support as many nodes as the underlying operating system supports .. which is 8 nodes in current versions of Windows (in the editions that support Server C ...Show All
Visual Studio Team System team explorer?
anyone know is there difference in RC and TRM. RC team explorer seem working fine with team foundation server RTM. do i need to update The last major breaking change happened just before the RC, so you don't have to update. I'd recommend it though -- there were bugs fixed in RTM, and the uninstall/reinstall process only takes about 3 minutes. ...Show All
Windows Forms Multi-threading problem with Windows Forms (possibly SerialPort too)
I've been having a problem when updating a windows form from a different thread. Data is received on using a SerialPort class which fires the DataReceived event (on a different thread). This thread then calls a method on a form which updates a text box. The code used in the method is just like the sample from the MSDN below, which reroutes the call so that the textbox update is done from the same thread. private void SetText(string text) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.textBox1.In ...Show All
Visual Basic How to automate "Importing a xsd header structure of an xsd into excel sheet using VB 6.0"
Creating dynamic maps should also help.Please send the information to gladsays@hotmail.com . I"m sorry, but VB6 support has ended, and VB6 questions are off topic in this forum. I would certainly recommend moving to VB.NEt if you have the option, otherwise you can try sites like www.vbcity.com and www.codeproject.com . ...Show All
.NET Development InternetDial VB 2005 ???
I have a bunch of code VB 6 currently using the Wininet.dll API for connecting via modem or connecting vpn connections - uses already configured dial up networking. I currently do not see any classes in visual studio 2005 that will do this. Has this been left out I don't want to send commands to a modem, I see you can do that. Just want to use the already configured dial up networking to call back to home office. Thanks! I will be watching for the blog.... ...Show All
SQL Server Date parameter format incorrectly interpreted
Hi, I am using SQL Server 2005 Reporting Services. I have a report with a Startdate and Enddate parameters setup through the report parameters box. The datatype is datetime, so I have the date pickers. My machine regional settings are set to Ireland for datetime format dd/mm/yyyy. The database field being queried is storing the date as dd/mm/yyyy. My problem is when I type in the values Startdate = 01 aug 2005 and Enddate = 31 aug 2005. The report runs correctly, but it refreshes the parameter boxes and if I try to run it again I get the following message "An error occured during local report processing. The value provided for the report pa ...Show All
.NET Development Settings in referenced dll
Hi, I have created a dll (Data.dll) wich encapsulate data acces. This contain same Tableadapters wich ConnectionString is saved to application configuration file. I have created another project (menu.exe) with a reference to the data.dll. When I deploy menu.exe application, How I can modify the values for connectionString used by the Data.dll settings Thanks How i can do if the dll contains references to web services... and then in mi web project that make reference to that dll, needs to change the dll setting of the web service ...Show All
Visual C# Cannot read from a text file - FileNotFound Exception, although file is there
Hey guys, For some reason, I keep getting a FileNotFound exception while trying to read from a text file, although the path that the StreamReader is looking in is correct - which I know for a fact. Here is the method that does the reading: public void setDescription(String file) { string currentDir, desc; try { currentDir = Directory.GetCurrentDirectory(); // Read the file as one string. System.IO.StreamReader myFile = new System.IO.StreamReader(currentDir + "\\" + file); desc = myFile.ReadToEnd(); myFile.Close(); label11.Text = desc; } catch(IOExce ...Show All
Windows Forms refresh the form?
say i have a table with 5 columns 1 2 3 4 5 now the first time it will display column 1 2 3 but then theres a link on the form and if you click on the link it will refresh the form and display column 1 2 3 4 5. i have this so for Private Sub Form1_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Load If bllong = true then display 1 2 3 4 5 Else display 1 2 3 End if End Sub Private Sub LinkLabel2_LinkClicked( ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked bllong = true Me ...Show All
Visual Basic Amazing super serious bug..
Using 2005 RTM In our file based Webb application, we add a new page. Then we add this simple code. Dim bTest as Boolean = True If Not bTest Then Debug.WriteLine("bTest is false") End If And Guess what, the debug line is printed. If I do a breakpoint on the If line, and add a watch for bTest its TRUE, still it goes into the if statement. Rebuilding the solution dont help. I cant replicate it on any other project at the moment, but it happens in our main development project. Any tips are welcome!! This bug seems hard to repro. But, we at MS are committed to find and fix it. We need more info on the bug. Does this repr ...Show All
Windows Forms Disabling Buttons until Event has finished/finalised.
Hi all, I have a Button on a Form that populates a ListView with different ListView Items each time the Button is pressed. Currently, it may take some milliseconds (noticable) for the ListView to populate, and yet the user is still able to press the Button rapidly, so that the ListView Populates/gets scraped/populates/get scraped/populates etc - which I don't want. Is there a way I can press the button, then cancel the functionaly (not allow the button to be pressed) of the button, do the processing, when the processing has finished, then enable the button to be pressed again I have tried enabling and disabling the button within the Button ...Show All
