pfontyn's Q&A profile
Visual Basic contorl's desktop location
Hi, how can i get the desktop location of a control on a form i mean i want to know where my contol is on the desktop and not on the form.... thnx Hi Attila I think that there is no code for it. but I suggest you this: you can get the form position on desktop and control position on form, then plus them. hope this help ...Show All
.NET Development Is there a way to Redirect STDOUT/STDERR during AppDomain.ExecuteAssembly like Process.Start's redirection streams
I'm trying to locate the ability to redirect the stdout/stderr within an AppDomain when making calls to the ExecuteAssembly method similar to the ability to do so with Process.Start's RedirectStandardError/ RedirectStandardOutput Thanks, Ty thank you for responding. I was assuming that just about everything that does gui or in/out of any kind eventually goes into unmanaged code (even though its MS OS code). So, I assumed that AppDomain handled the unmanaged/managed code transitions. I think I am understanding what you are saying though as far as redirection is concerned. ...Show All
Visual Studio Error in ReportViewer with Available Parameter Values From Query
I'm getting an error ("Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index") when running a server report in the ReportViewer control in a VB .NET 2005 windows form. This error does not occur every time the report is executed or refreshed. The report runs fine on the report server with the same parameter values entered. Also, when I get the error in ReportViewer, I can click "View Report" without changing any parameter values, and the report will run without any errors. The error appears to be caused by having a parameter with available values from a query. When I change the parameter available values to non-queried, I no longer get the error. The report was crea ...Show All
Windows Forms Need global reference to main form
(I originally posted this in the Visual C++ Express forums but I realise that I would probably get a better response here) Ok, so I've got a form with a bunch of ComboBoxes that are created at runtime instead of at design time. I want to give each of those ComboBoxes the same ContextMenu, which is a member of my MainForm: public ref class MainForm : public System::Windows::Forms::Form { // ... private: ContextMenuStrip^ myComboBoxContextMenu; // ... } I figured I should create a sub-class of ComboBox which automatically assigns the context menu in the constructor: ref class MyComboBox : public ComboBox { public: MyComboBox() { this->ContextMenu = /* reference to context menu in M ...Show All
Game Technologies: DirectX, XNA, XACT, etc. which 3d program
I'm fairly new to xna and i was Does anybody know a good free 3d image program or where i can get a good program for free! thanks for your support. Wings 3D is my favorite 3D modeling application. It is free and very powerful. Along with that I also use Ultimate Unwrap 3D for my UV mapping needs, it works great also. For animation I use Character FX , which does excellent bone animation. While the later two programs are not free, they are very low cost and provide very strong alternatives to the high cost of things like 3D Studio Max. ...Show All
.NET Development i need help for asp.net tree control
Hi, Am implementing Asp.net in my project and new to treeview structure concept i have treeview structure which contains one root node and two child node and child node have two leaf nodes with check box control. For example: root note is Destinations Two child node is Belize and Bonaire Belize contain two checkbox control nodes. and same for Bonaire if the submit page.aspx destination=BELIZE (belize subtree s/b expanded). If page.aspx accommodation=SUNBREEZE (destination BELIZE tree expanded and accommodation SUNBREEZE checked) Please help me With Regards S.Senthil Nathan You may want to check Asp.net forums for this question. http://forums.asp.net/ ...Show All
Smart Device Development Hard-reset a device, how to?
Hello, I want to perform a Hard-reset to the device. I use the following code but only soft-reset is happening. Can you please help me out for Hard-reset. Thanx a tonnn in advance. Code: Dim outbuff(1) As Byte Dim dwOutBytes As Int32 = 0 If Not KernelIoControl(IOCTL_HAL_REBOOT, _ IntPtr.Zero, _ 0, outbuff, 0, dwOutBytes) Then MessageBox.Show( "KernelIoControl failed" ) End If -------------------------- Private Shared METHOD_BUFFERED As Int32 = 0 Private Shared FILE_ANY_ACCESS As Int32 = 0 Private Shared FILE_DEVICE_HAL As Int32 = &H101 Private Shared IOCTL_HAL_REBOOT As Int32 = (&H1 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Some questions about XNA & 2D games
Hello, world. I have limited experience with programming, but I've been doing some hobbyist programming of late. I wrote a couple text adventures (in Inform 7 and TADS 2), and for the last couple weeks I've been trying to learn the basics of Visual C# Express Edition. I've watched almost all of Bob Tabor's excellent "Beginner's" videos on C#, and I feel pretty comfortable with the syntax and structure of the language. I'm interested in starting with a 2D hex-based wargame, although my grand ambition might be a turn-based wargame that uses 3D terrain, or perhaps a 3D adventure game a la Nancy Drew. I've been tootling along, whipping up a primitive little wargame interface using the visual designer in Visual C#, and I have a few qu ...Show All
Visual Studio Express Editions image in picturebox
Hi I wonder if anyone can help with a piece of code. I want a image in the picturebox to corrospond to a number in a text box . So I have put numerous pictureboxes on top of each other to show images as the numbers would change . But it only works once. How can I write code to clear the last command and accept the new command. ie new number = new image. Thanks Rob Images are in the resources and are fixed. In the properties the picturebox visibility is set to false , so the no image is shown until the textbox number corrosponds. here a copy of the code so far . Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim r As Doubl ...Show All
Windows Forms How to sort a datagridview by two columns
Most of you are probably familiar with Windows interface. I need help with sorting my datagridview which has the same idea with what Windows Explorer does. When you choose to "View -> Details" then if you sort by "Type" Windows will sort by type and also it will for each type sort by name Example : Filename Type (Sorted By FileName) aFile.mp3 &nb ...Show All
Visual Studio Problem is getting page number
I am writing a VB windows application with VS2003 when I use the code Dim nPages as Integer nPages = crReport.FormatEngine.GetLastPageNumber(New CrystalDecisions.Shared.ReportPageRequestContext whcih is copy from http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do;jsessionid=A4E59B144061F70675DA8A210C1FC317 cmd=displayKC&docType=kc&externalId=c2013559&sliceId=&dialogID=360384&stateId=1%200%20356275 I don't why the crystal report viewer get nothing to display and error it would be great if someone could help me to solve this problem Thank you Depending on how big your report is, it may be still trying to calculate how many pages are in ...Show All
SQL Server Performance in SSIS
Hi: I've written new SSIS packages to do what DTS packages did and the performance I'd say is about 20 times slower. In this package, I have a loop that loops through different servers based on server entries in a SQL database. Each loop pumps 10 tables. The source query is set by a variable and the destination table is set also by a variable, since all this data goes to the same tables on the SQL server and the definitions are all the same on the source server (Sybase). It's still going and has taken about 12 hours to pull roughly 5 million records. The source query ends up being: SELECT *, 'ServerName' FROM SourceTable1 WHERE Date >= Date The 'ServerName' , the "sourcetable1" and the "Date" are all set ...Show All
Visual Studio Express Editions C# Newb - XMLSerializing a List
Hi, I'm pretty new to C# and am trying to write a class with data in it that i can save and load from an XML file, are there any built in Generic Containers/Collection, something like List or Stack that XML can serialize, my code is below, but whatever container i use i get an exception complaining about how it can't serialize the collection i am using (List) in this case. How do i have to go about serializing a collection of objects Is it something that can be done with a similar amoutn of code as below or am i dreaming namespace Test { public class ClassA { public List<ClassB> Events; public ClassA() { Events = new List<ClassB>(); Events.Add(new ClassB()); } #region Load/Save Code ...Show All
SQL Server More grouping questions - sum of maximum
I have a table with two groups, unit and domicile. Structure appears as follows: GH1 - Domicile Group: Bentwood GH2- Unit Group: 200 Detail: LegID Unit ID Miles TripMiles 1 200 25 150 2 200 75 150 3 200 50 150 Subtotal for GH2 Count(Fields!legID.value) Sum(Fields!Miles.value) First(Fields!TripMiles.value) 3 150 150 This works, what breaks is the subtotal for GH1. on the TripMiles Field. It doesnt like Sum(First(Fields!Tripmiles.value,"Unit_Group")), nor can I do Sum(ReportItems!Trip_group.value) I get the error that an aggregate cannot occur on a report item unless it is in the page header or footer. O ...Show All
Visual C++ Class View is not updated automatically
I've created a plain C++ win32 project with Visual Studio 2005. And as I add new functions or variables, the class view doesn't get updated automatically. Only way to get class view populated with newly added functions or variables is to restart VS. But every thing works fine with C# projects. ONLY with C++ projects. I've tried to reproduce this on other machines at my work and on my laptop, but I have failed to reproduce the same problems. I am seeing this problem only on my pc at home. I've also tried re-installing XP SP2 and VS2005 with nothing else installed to see if some other program is causing this to happen. But still same problems with the class view. Also, I am seeing the same problem on Windows Vista RC2. Could ...Show All
