smithalovesdotnet's Q&A profile
Visual Basic Missing Items....
Hello everyone, I am hoping someone can help me. I have been working on a small project in VB.Net 2003 and I was doing a good bit of Cut/Copy and pasting some text boxes, labels, etc. Anyway I suddenly have my items on another form with names like TextBox1 and Label3. And the original items are still showing on my Properties Drop down, but they are no where that I can find. How can I get these orphaned items out of the project so I can rename my items correctly Has anyone ever seen this before Navigate to the top of Solution explorer and hit the "Show All files Button". You will notice a plus sign appeared next to your Form file. Exand it and edit the file that ends with Designer.vb. All of th ...Show All
Visual Studio Express Editions menu item to display the contents of a folder
How do you program a menu item to display the contents of a folder (Like internet explorer does with favorites) well you would get the list of files from a specified folder: dim theFiles as String() = System.IO.Directory.GetFiles( theFolder ) then to display the list of files found in a menu item, you would go through each file in theFiles and add a new menu item Dim theMainMenu as New MainMenu() for each currentFile as String in theFiles theMainMenu.MenuItems.Add(currentFile, new System.EventHandler(AddressOf MenuItem_OnClick) next Me.Menu = theMainMenu private sub MenuItem_OnClick(ByVal sender as System.Object, ByVal e as System.EventAr ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Area in Form for DirectX stuff
I have simple question. I want to have some area in form for directX animation (not whole area of form) because I need some space in form for other stuff, buttons etc. I am using Microsoft Visual Studio 2005, managed directX 9 and C# I managed something but that is not it, so if someone can help ... thanks Use a panel to render on. Just place a panel on your form and render to the panel. Just pass the panel's handle to the device's constructor and you should be set. I hope this helps. Take care. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Checking for capabilities
I have a simply game where I'm drawing a flat terrain made up of tiles, each tile being made up of two triangles, and I'm using index + vertex buffers. On my computer (Geforce 6600GT, AMD Barthon 2600+) everything works fine. On my laptop (Centrino 1.7, Intel on-board graphics) nothing shows, so I guess the vertices aren't being drawn. I'm assuming this is because the on-board card does not support some feature that the 6600GT supports. I checked the GraphicDevice.SoftwareVertexProcessing property, and on my computer it is false, while on the laptop it is true, so I'm assuming that's set right, since most on-board cards don't support much hardware stuff. I'm also using a BasicEffect so that might be it.. I guess I have to check some ...Show All
Visual Studio Express Editions need datagrid view code
I need a code that will force my datagridview to display the LastName, FirstName of the user that are in the groups contained in my combo boxes. In other words I want to select an item in my combo box and have the names of all the user in the combo box selection show in my datagridview. So I guess this would be a search based on a combo box selection. FYI: Combo box info is coming from a database. I need a code that will....... display my database info into a datgridview I am totally lost with this datagridview. I need to find a book that shows me how to create apps both on the coding side and the visual side. I keep bying books but I am a visual learn and all the books I get are show code but not the visual side of th ...Show All
.NET Development OleDb and datagrid
Hi, I created a simple database using Microsoft Access and I try to display the data using datagrid. However, there is an error occured if I update the change in the datagrid (update,delete and add). The code is the similiar for Sql database and it works fine. So I just don't understand why there is an error. [code] dim da As OleDbDataAdapter Dim db As OleDbCommandBuilder = New OleDbCommandBuilder(da) Dim dsChanges As DataSet If ds.HasChanges(DataRowState.Modified) Then dsChanges = ds.GetChanges(DataRowState.Modified) &nbs ...Show All
.NET Development How does Process.Start() redirection work?
Hi All, I've been working on creating a program that automates my program building and testing. I am doing the code in C#, but there is a problem with the StreamReader.ReadLine() function where if it tries to read from a Process output pipe before the Process finishes writing to the pipe, it causes the thread reading from the pipe to block and the process then blocks too. However, if the process is short lived, I have a likelier chance of getting all the output. So now, I'm testing the Win32 API equivelants and a portion that I'm having issues on is collecting the stdout and stderr on process's children processes (the output is collected properly in .NET). My que ...Show All
Visual Studio Problem Removing Visual Studio Team Suite Trial
Hi All, I'm having trouble removing Visual studio Team suite trial. I had Visual Studio Team Suite Trial installed on my machine. I decided not to continue the trial and instead install Visual Studio Professional So I installed Visual Studio Professional and tried to run it, but up came the message saying my trial period had expired. Since then I've tried to uninstall/reinstall Visual studio professional, with no change. I then tried to uninstall the team suite trial (its still in add/remove programs list) but it cannot find the setup file to perform the uninstall. I tried to reinstall team suite (so I could the fully uninstall it), but cannot since it thinks there is already a trial version installed on my machine. I tried the msiinv to ...Show All
Visual Studio 2008 (Pre-release) URL Escaping.
Hi, I know this isn't a WCF question per say - but related. I'm calling a WS from a .NET WCF client. The endpoint is formated like this: http://IP/wsgwsoaphttp1/soaphttpengine/http%3A%2F%2Fblah.dk%23ACTION Now this is a URL-encoded string for: http://IP/wsgwsoaphttp1/soaphttpengine/http://blah.dk/ACTION When the endpoint is opened a Uri is created behind the scenes. This URI escapes the string into: http://IP/wsgwsoaphttp1/soaphttpengine/http:/blah.dk/ACTION (Notice missing "/"). This is done in the canonicalize function of the URI : http://msdn2.microsoft.com/en-us/library/system.uri.aspx "Canonicalizes the path for hierarchical URIs by compacting sequences such as /./, /../, //, including escaped representations." ...Show All
SQL Server DateAdd narrowing conversion error
I am simply trying to take a date and add the value from another field to it using the following expression: =dateadd("d", " & Fields!new_tgddatefrom.Value & ", Parameters!HolidayDate.Value) new_tgddatefrom.Value is an int data type HolidayDate.Value is a date The expression works fine if I use an acutal number for the value to add but when I use the field.value I get an error: Overload resoution failed because no accessible 'DateAdd can be called without a narrowing conversion. Why or why is it so difficult to work with dates! ! If anyone can help me get this working I would sincerely appreciate it! Debra Debra: The multiplier in the dateadd function must ...Show All
Visual Studio 2008 (Pre-release) Image flashing when resizing Image control inside FlowDocumentScrollViewer
Hi, I have reproduced a strange behaviour that seems to be a bug. If I resize a FlowDocument that has an Image inside, the image begin flashing with two different sizes. There are no timers, no special code, nothing. The Xaml code is the following: <Window x:Class="WpfImageTest.Window1" xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml " Title="WpfImageTest" Height="300" Width="300" > <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="27"/> &l ...Show All
Visual C# C# Programming->Structure
Hi Ques1 :-> Can be instantiate the object of a strcuture using default constructor after declaring the parameterised constructor in the structure if yes why bipro wrote: No. Let's say that you have the following code: public struct MyStruct { private int _x; private int _y; public int X { get { return this._x; } set { this._x = value; } } public int Y { get { return this._y; } set { this._y = value; } } } what you'll find is that the compiler adds in a default public constructor like so: public MyStruct() { } as a non static class needs to be instantiated in some manner. If, however, you specify a constructor, say: public MyStruc ...Show All
Visual C++ Error in creating Handle for HandleDestroyed
I am trying to create a handle for a custom handle when the window is destroyed I am using the code: this ->HandleDestroyed += gcnew System::EventHandler( this , &cheat::HandleDestroyed); I have this placed in the InitalizeComponent event of my windows form. When the compiler reaches this line it tells me that i need to point to a member function. I think I am doing this wrongly, so could anyone please point me in the right direction. Thanks in advance. :-D It still gives the same error I detailed above in a previous post... Thanks for pointing out that I needed to use &cheat::cheat_OnClosing. But I still need to find out what I need for the: this ->OnClosing += gcnew System:: ( this , &cheat::che ...Show All
Visual Studio 2008 (Pre-release) How to use hardware rendering / video flicker
How do you tell your application to use hardware rendering The following call is returning 0 Thanks for replying and for all the information Adam! I ran the first program and my app now reports a tier of 2. Very good. On Seema's blog, it states to check out what the it looks like with hardware rendering disabled, so I tried adding: [HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics] "DisableHWAcceleration"=dword:00000001 to my registery. Note that the Avalon.Graphics key didn't exist before so I had to add it. Has the location, were this should be located, changed Anyway, after I added that entry, there were no changes to the tier value nor the rendered output, so I'm guessing it didn't work as it was supposed to. Any ideas ...Show All
.NET Development Efficient way to remove double quotes from a string.
For some reason, I am reading a string out of a config file, and rather than just getting the string, I am getting it in double quotes. Here's a clip of my App.Config file < setting name = " TextLogFileName " serializeAs = " String " > < value > C:\CodeTracingFile.txt </ value > </ setting > When I read this value into a variable, the variable ends up with ""C:\CodeTracingFile.txt"" I don't know why the double quotes are being added, but I'd like a simple efficient way to get rid of them. I tried using String.Replace, but it wants a character, and I don't know how to specify a quote as the item I want replaced. Peter Ritchie wrote: Strings in .N ...Show All
