LalewicZ's Q&A profile
Visual Basic Getting a listbox selected value from a seperate form
Hi all, I'm having a rather strange problem with listbox.selectedvalue. I have a form (Form1) that has a listbox populated with values from a database. I also have a button on Form1 called 'delete'. When you select a listbox item and click delete it brings up a new dialog form (Form2) thats asks if you are sure you want to delete the selected item from the listbox/database. You can choose 'Yes' or 'No' via two buttons on Form2. When you click the 'Yes' button, it calls my deleteItem() subroutine from Form1 which deletes the selected listbox item (note: this code works fine and has no errors if you call it when you click 'Delete' from ...Show All
Visual Studio 2008 (Pre-release) How can I put one canvas on top of another? or How can I draw multiple layers in the same area?
Pretty new to graphic dev, so please bear with me. I have an animation (a wheel with colored circles on its outer edges, that spins), which I accomplish by drawing a large ellipse, and some smaller ellipses (sp ). I do this on a transparent canvas, then I rotate the canvas. Conceptually, what I would like to do is draw an opaque rectangular structure over the animation layer, but provide a small "hole" or view through the opaque layer so that you can see the underlying animation. I can't seem to draw over an existing canvas though. To summarize, I want to display a 2D box with a spinning wheel inside of it. A hole in the ...Show All
Software Development for Windows Vista Ifelse activity in workflow
How can I set the condition for the ifelse activity . how do I invoke the branching based on the condition. Raskal, I ended up writing an IfElseActivity of my own, due to an additional requirement I had. My requirement was to select multiple conditions for the branch, and I also wanted to pass parameters to the conditions. So I implemented an ifelse activity that takes conditions in the form of activities that implement an interface called IConditionActivity. You can go have a look and download the solution at: http://dotnet.org.za/hendrik/archive/2006/07/04/53953.aspx ...Show All
.NET Development Datareader and class'ing
I am trying to find a way to class my datareader code. the code opens the DB connection and reads the information. then the datareader is used to populate a listbox. is there a way to return a datareader from a class file when I try doing so with 'private void ReadDatabase(string Command)' I get an error that void does not return a value. obviously private int would not work or other similar calls. So how do I return the reader I have to allow the calling code to populate the listbox because there are actually 3 listboxes that will use the code. each listbox has different names and has different database commands. ...Show All
Visual Studio Express Editions XML...add new XML elements to existing document
I asked this earlier, but didn't get an answer. I'd really like to figure this out. It seems like it shouldn't be too hard to do. I'm making an application to keep track of recipes. I'm able to add two recipes, but when I add a third, it overwrites the last one in the file with the new one I'm adding. Can anyone give me any suggestions on how to do this Here's my code. Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click Dim newdoc As Xml.XmlDataDocument Dim olddoc As New Xml.XmlDocument Dim xtwcurrent As Xml.XmlTextWriter xtwcurrent = New Xml.XmlTextWriter("C:\recipe\ ...Show All
SQL Server IF Command
Hi All, I am having a few problems writing a sp for the sales team, I have to display a target figure from a customer dates start_date target_year1 target_year2 target_year3 target_year4 target_year5 01/01/2004 100 150 120 150 170 01/01/2003 90 20 30 30 30 the start date for each customer is different so the target year 1 ,2 ect will be different time periods. i need to display the start_date and the target year which relates to todays date: so no 1 would be year 3 and no2 will be year 4. any help would be much needed!! rich ...Show All
SQL Server DTS DB2 Dates 0001-01-01
Hi, I am trying to transfer a table from DB2 to SQLServer 2000 through a DTS package. The DB2 table contains fields with default dates of "0001-01-01". The DTS package errors out whenever it reads this date as "invalid data value". In SQLServer 2000, the date fields are of type ShortDateTime. I have searched the Internet but did not find a workable solution. Please, can anyone help me find a solution Older applications sometimes used dates like '9999-12-31' or '0001-01-01' to signify that the date was either NULL, invalid or not-entered. If DB2 is using that date as a valid point in t ...Show All
Visual Basic For - Next loop should wait for a button to be clicked
hey i am kind of new to visual basic and as yet its a lot of fun if anyone can help me with this problem, i'll really appreciate it, I am running windows xp sp2. Problem: At the beginning of a program the user enters the number of enteries he / she wants to input using a combobx I am trying to run a For - Next loop in order to get these multiple enteries into an array using a single textbox. The problem is that i want the user to click a button each time he completes a single entry. and then the for - next loop should continue How do i code this into the program hey thanks That does ...Show All
SQL Server Copy databases
Hi, Maybe a stupid question, but I'm trying to copy some databases from one server to another. The copy databases wizard says the job is successful and I can see that the job has been done on the remote server. But the copied databases are not there. What do I do Make sure you connected (during the copy) to the right (the same as you have inspected later)instance of SQL Server. HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
Visual Studio Express Editions Problem With Forms
Hi, im new to C++ express edition, and the first thing I went to do was create a simple program using a form and a few control items. When I go to add a control item from the toolbox, I get the following error message. Any help would be appreciated. Could you report the issue at http://lab.msdn.microsoft.com/productfeedback/default.aspx so that owners would take a look Also, please reply back with the link to your report so that others can follow up on the status. Thanks in advance for taking the time to report the issue! Thanks, Ayman Shoukry VC++ Team ...Show All
SQL Server Service Broker Tables
Hi, We have a customer whos database just grows and grows. Not the customers own tables, but the: sys.sysconvgroup sys.sysdesend sys.sysdercv And these tables are linked to the Service Broker, and according to http://msdn2.microsoft.com/en-us/library/ms179503.aspx these tables exists in every database and are used by the Service Broker. Now to my questions =) HOW do I delete rows from these tables How come these tables hust grows and grows, could it be any setting in the SQL 2005 Server or is it the customer who has programmed his application wrong Please respond as soon as possible. Best regards .Henrik ...Show All
Smart Device Development How to change current UI culture at runtime?
HI. I have a form and I want to change its UI culture at runtime. The method System.Threading.Thread.CurrentThread.CurrentUICulture = ... does not working in .Net CF. I am using VS .Net 2005Beta2, C#. Thanks. That is correct. Changing the UI culture at runtime is not supported (in v1 or v2): http://www.danielmoth.com/Blog/2004/11/cultureinfo.html Cheers Daniel ...Show All
Visual Basic making a .txt
When i click button_1, what code can i put in so it makes a .txt file thats called whatever is in textbox1 could someone help Try something like this Private Sub Button1_Click( ByVal sender As System. Object , ByVal e As System.EventArgs) Handles Button1.Click Dim sw As New System.IO.StreamWriter("C:\test.txt") sw.Write(TextBox1.Text) sw.Close() End Sub ...Show All
SQL Server Replication of Great Plains Data
Hi All, We have the requirement to replicate financial data to Aus from the UK, however I dont know if Replication is the best solution around Reason why I ask this, is that to create the publication, there are in excess of 10000 articles, which takes forever and a day to create, then when setting up the push subscription, this takes equally as long. DB's physically range between 100MB and 2GB. Link to Aus is 2MB E1. The accounts server isnt the most powerful of beasts (HP DL380, 1x1.4Ghx CPU) and with 4 DB's to setup and replicate, it's going to take some time. With this in mind, I would also be looking to script out the publ ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Run time error when attempting to toggle Wireframe mode.
I'm trying to design a simple button that toggles wireframe mode on a Mesh. So I tried the following code. (I am using the DXUT framework) private void OnWireClicked( object sender, EventArgs e) { if (( int )(sampleFramework.Device.RenderState.FillMode) != 3 ) sampleFramework.Device.RenderState.FillMode = FillMode .Solid; else sampleFramework.Device.RenderState.FillMode = FillMode .WireFrame; } I don't see what is wrong with this but it gives the following error at runtime System.InvalidOperationException was unhandled Message="Invoke or BeginInvoke cannot be called on a control until t ...Show All
