dmb13's Q&A profile
Software Development for Windows Vista How can I retrieve a path to currently active folder(in explorer)
What I meant is that for ex. I've got c:/test folder opened in explorer aaand I want to know is there any Api or Interface method witch will retrieve that path(c:/test) form explorer window Thanks p.s. Sorry if I posted this in wrong place There is no documented way of doing that. And why would you want to What if there was more than one Windows Explorer window opened About the only think you can do is enumerate all windows looking for Windows Explorer windows and try and get the text for the address combo box. But, I wouldn't recommend doing that because the user can disable that control and checking the caption is unreliable because the user can disable the full path in the window caption... ...Show All
.NET Development DNS.GetHostEntry doesn't display the hostname as dns.resolve did
In a small console application I used DNS.resolve to obtain either the IP-address(es) or hostname depending on the parameter passed (computername or IP address). I've rewrited the little thing in Visual Studio 2005 and so I saw that I needed to use dns.GetHostEntry instead of dns.resolve because the last method has become obsolete. So I did. But when executing the code the behavior is somewhat different: dns.gethostentry doesn't retrieve the hostname if you pass an IP address, were dns.resolve has no problem in showing me the hostname found. Is this a known issue Is there a workarround or solution I want to thank Microsoft for ruining a perfectly operable code such as Dns.Resolve(stringIp). I ...Show All
.NET Development Confused about Module.ResolveMethod(int, Type[], Type[])...
Hi, I'm a little confused about the overload of Module.ResolveMethod() that is (I think) supposed to return a MethodBase for a method on a constructed generic type. As I understand it, I can pass the generic arguments for a type as the second parameter, and should get a different MethodBase than the one on the generic type definition. At the very least I ought to get a different MethodBase than if I passed null in for the second parameter, but I don't. The code sample below should explain what I'm talking about here I expect the same MethodBase to be written to the console in both WriteMethod calls, but instead it prints: Example+TestClass`1[T].M(T) Example+TestClass`1[System.String].M(String) If I've just totally misunderstood this ...Show All
Audio and Video Development Playlist.Titles..
Hi, I have some simple questions about working with the playlist.titles objects. 1. For some reason I can't seem to figure out to dynamically get the number/names of the titles using the script: Player.playlist.titles Is there a way to do this 2. If I have a title can I dynamically figure out the number of chapters for the title 3. Is there a way to dynamically get the title’s duration, either by getting each of the chapter’s duration or by asking the title object for it Thanks, D.C. Regarding #1: You can use the for-in iteration functionality of ecmascript to enumerate each title object as follows: for (var curTitle in Player.playlist.titles) { var titleObj = Player.playlist.title ...Show All
SQL Server Significant bug in SSIS import function
I have encountered what I consider to be a significant bug when importing Excel spreadsheets using SSIS. If in the first data row a particular column does not contain a value (i.e. it is null) then SSIS assumes that every row has a null value in that column. This disfunctional beahaviour has cost me hours and hours of wasted time loading and debugging data. Hopefully someone from the appropriate area within Microsoft will read this post and get this bug fixed. Gee - I am sorry to have offended you with my post! I am aware that it is a community forum and my hope was to get constructive response from anyone participating in the forum and also hopefully to hear from Microsoft. I believe that they monitor these forums and fro ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Library support
Hi. I posted this in a thread earlier, but the thread dropped back half a dozen pages in a few hours. This place is popular! If we want to use external libraries or middleware, do they have to be written in C# and come with source provided I'm thinking of libraries like SQLite, Lua, ODE and so on that would normally be included as a .dll reference in your C# project. I assume that's not possible if you want your code to run on all available platforms That means that basically we're starting with a very clean slate here. There seem to be precious few libraries that are useful for games developers and written in pure C# for the XNA platform. The concern that I have is that not only will it take many months before a decent array of middlewa ...Show All
Visual Studio Express Editions what day in week?
how do detrimen what day it is .. monday, tuehusday, etc.. or with an integer with 1 = monday 2 = tuehusday ... hehe just a way do deside the current day in the week . thanks :D DateTime has a DayOfWeek property so it's Dim weekday As DayOfWeek = DateTime.Now.DayOfWeek ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Anyone else find projects from BETA are 'incompatable or corrupt' in RELEASE 1?
I dont' see this mentioned in the FAQs - or in any other post so here goes. I have a project I started working on in the beta - but the solution won't open in the new XNA studio - it complains of 'incompatable or corrupt'. Is there a change log to tell me what what's changed exactly from the beta to 1.0 (gone ins the component name space , the graphics.device seems different etc..) Or better yet is there a utility anyone has to convert Better yet, just remove the references to the XNA libs under References and re-add them. This seems to solve the problem for me every time. ...Show All
Visual C# Get custom type by sting-parameter
Hello! I've made an dll-assembly with different classes. In an console application, I made a reference to this assembly. I want the user to determine one type via console: He writes a string. Then the console application has to get the type by string and than instantiate an object of this type. Now my Question: How do I get the custom type by string thanks, kind regards, matti First you'll need to make sure the assembly is loaded: string assemblyname = "......"; Assembly.Load(assemblyname); Then you need to get the Type: string typename = "......"; Type myType = Type.GetType(typename); Then you just have to create it: object myInstance = Activator. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Direct3D Retained Mode Documentation
Where can I find documentation on Retained Mode objects and functions. Seems as if it is now omitted from the current Visual Studio documentation. Somewhere there has to be documentation on Direct3D Retained Mode. The last version of the DirectX SDK to include the retained mode documention was the DirectX 7 SDK. It was already obsolete in that SDK but it included the documention as an appendix. See this recent thread for a discussion on where you might be able to find this old SDK. ...Show All
Visual Basic ComboBox: VB Code to select first one.
Hi I have the following VB code, when someone selects the worksheet name from the combo box in the summary page it takes them to the worksheet. However, the problem is that if they select, for example, worksheet "B" it takes them to the worksheet fine but when they are back in the summary worksheet the "B" is still selected in the combo box and you can not select "B" anymore. You have to select other worksheet name before you can select "B" again. Is there any way to instruct the combo box to always select the first item in the list Thanks in advance. Private Sub AFISGBox_Change() Dim strSheet As String If AFISGBox.ListIndex > -1 Then strSheet = AFISGBox Sheets(strSheet).Select End If End ...Show All
Visual FoxPro excel and foxpro
Dear friends, when exporting datas to excel from foxpro using the copy to command, there after trying to do some calculations and formating the excel file using automatation macros how could I integrate this in foxpro, I don't know where to start. thanks for explaining me the functionality satish Dear Cetin, Finally I succeeded. my code looks like this LOCAL oExcel oExcel = CREATEOBJECT ("Excel.Application") SELECT * FROM cTariff_CompareRep; into cursor crstoexcel ; nofilter With oExcel .Workbooks. Add . Visible = .T. ncurrent_row=0 scan ncurrent_row = ncurrent_row + 1 With .ActiveWorkbook.ActiveSheet FOR i=1 TO ...Show All
Visual Studio 2008 (Pre-release) XPath relative binding causes StackOverflowException
Lee d has been helping me with some relative binding problems I'm having. Basically I'm using an XML file for the test data and the relative binding is causing a StackOverflowException. All the binding is defined in XAML: Parent StackPanel defined as < StackPanel.DataContext > < Binding Mode = " Default " Source = " {StaticResource CatalogDS} " XPath = " /Objects/Instances/Instance " /> </ StackPanel.DataContext > Relative that causes the exception: < StackPanel DockPanel.Dock = " Left " Margin = " 0,0,0,0 " x:Name = " BillToStackPanel " Orientation = " Horizontal " DataContext = " {Binding XPath=BillTo} &quo ...Show All
Windows Forms RichTextBox
Ok. I have a richTextBox and a ListBox. I already know how to add each "character" into the listBox, but I wanted to add each line at a time. Something like this : foreach ( line line in richTextBox1.Text) { listBox1.items.add(line); } Something like that. Could someone help me please One should also be able to do: string[] lines = richTextBox1.Lines; listBox1.DataSource = lines; Also, string[] lines = richTextBox1.Lines; listBox1.Items.AddRange(lines); ...Show All
Smart Device Development Problem pls help!
Hi, i am trying to write a program for smart device. However when i am trying to deplay in the emulator is get this error message. "Deployment and/or registration failed with error: 0x8973190e. Error writing file '%csidl_program_files%\online_patient_information_system\system.windows.forms.dll'. Error 0x80070070: There is not enough space on the disk. Device Connectivity Component ". What wrong with it Did i miss out something VS is trying to deploy flat framework assemblies and you're running out of space. Usual reason for that is having reference to some desktop assembly in device project. That is not allowed, so you need to find and remove this reference. ...Show All
