Enkht's Q&A profile
Windows Live Developer Forums Longitude, latitude problem
I have been using the virtual earth control and have a couple of questions. I would like the map to initially focus over Turkey in Europe. I would then like to place a push pin over the city of Instanbul. My question is how do I find the longitude and latitude of this country and city so I can use the map control Or is there another way of doing it without knowing the longitude and latitude Thanks Danny I used my Mappoint 2004 for that but you can also use the virtualearth control for it. use following code for it var map = null; var pin=null; function Page_Load() { map = new VEMap('divMap'); map.LoadMap(new VELatLong( 51,7), 18 ,'r' ,false); map.AttachEvent("onclick" ...Show All
.NET Development is it good practice to pass datagrid to a helper class
If I want to populate a datagrid of a form. is it good practice to pass the datagrid as byVal or byref and populate the datagrid in the external helper class or should I populate the datagrid inside the form itself. By populating I mean setting all: DataGridtextboxcolumns, databindings, DataGridTableStyle, and so on and also the datasource and populating the data itself Thanks. Hi Tutus, No it is not a good idea. If you pass controls to helper clases and if you are developing using n-layered applications, you can not do that because your logic layer will be tied to the UI layer. This happens because if you are targeting windows forms for example, and you develope the helper class in that way, by the time you want to chang ...Show All
Visual Studio Get all classes from a Project?
I have this working fine, but the solution is not as elegant as I would think it could be... Just curious if there is some kind of command that I'm not aware of that will eliminate the need for walking the Project's ProjectItem tree and going into the FileCodeModel for each. dont really want to load the assembly from the bin and reflect on it if i there is another way though b/c i want the class list to be 'live' without requiring a recompile of the project. thanks ...Show All
Game Technologies: DirectX, XNA, XACT, etc. getting actually used texture information from a .fx file using DX9
I am trying to get the names of textures that are actually used in a .fx file. I have the texture file name to D3DXPT_TEXTURE2D name mapping. but how do I find out which texture objects are actually used by the shaders I have a couple of sample .fx files which I compile with D3DXCreateEffectFromFile giving: Parameters: 3 D3DXPT_TEXTURE2D and 6 D3DXPT_SAMPLER in the ID3DXEffect D3DXGetShaderInputSemantics: 0 Shaders (VS) and 5 Shaders (PS). Another .fx file gives: Parameters: 7 D3DXPT_TEXTURE2D and 6 D3DXPT_SAMPLER in the ID3DXEffect D3DXGetShaderInputSemantics: 0 Shaders(VS) and 1 Shaders (PS). So, which textures are actually used P.S. This is an off-line tool creating a "null" device and must be compatible with DX9. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Microphone input
Hi, is there _any_ way to get input (16bit PCM would be perfect) from a microphone connected to the XBOX360 I'm planning to write a karaoke game (like SingStar), but that's not really possible without microphone input support. I already have code to analyze input streams and everything that I need, the only thing which is missing is a way to get input from microphones. Any ideas Patrick What a shame! It would be a great feature to build great rich-media games. As SingStar is very popular on Sony's Playstation, a game like this would be a great addition to the choice of XBOX 360 games. ...Show All
Windows Forms How to display staus for a very long process..
Hi, am an asp.net programmer very new to Windows forms development.. I am developing an application that process large number of records from database. I have to excecute lot of very lengthy SQL queries. Some of the queries will take more than an hour to complete. When the application start excecute something very lenghty it is not responding to anything else, even if i minimize it I cant maximize before completing the process. I need to give some feedback to the user that the application is not dead. How can i do it Please help Anzer You should run your lengthy process in a seperate thread. The mainthread is then able to update the UI, while the performs, for example, the query on the database. An easy way to do this is by ...Show All
.NET Development easy Regex.Replace() question
I am using Regex.Replace(string, string, string) in this way: Regex.Replace("Gloria Estefan (1993) - Yesterday", "^Gloria Estefan (1993)", "Gloria Estefan"); So I want to change the artist name so it doesn't include the year anymore. The problem is that this doesn't work because of brackets! So this would work: Regex.Replace("Gloria Estefan - Yesterday", "^Gloria Estefan", "Beatles"); How can I make it work in all circumstances (brackets or no brackets).. I would prefer using Regex.Replace to something else, because it makes it easy to assure that text is replaced only if it appears at the beginning of the string (^). thank you..! David Well, if that's really all you want: Regex.Replace("Gloria E ...Show All
SQL Server Connection speed / timeout issues with only one server and vista client?
I have a very odd situation, if anyone can give me some ideas to test it would be much appreciated. I am experiencing speed / timout issues with one particular remote sql server when connecting from my vista development machine. Here is what I am working with: Vista Ultimate RTM SQL Server Management Studio (SP2 applied) And the remote server is SQL 2005 (sp1) I have found only when connecting to this server from my vista machine (other remote servers have no issues, also running sql 2005 sp1), that it takes ages to get the list of databases available and I get timouts when trying to open tables with anything over about 200 rows. I also get the same issues when connecting from .net code im writing so its not specific to Manag ...Show All
.NET Development URGENT HELP - LOCAL DATE/MONTH
C# - Windows Applications (VS 2005) ----- Hi, I need some help here. I have a button that onclick, will have a function to check the current month (Local time), eg. if current month equal Nov, open form X else if current month equal Dec, open form Y. Tks. The property Month is already of type int, so just do this: cur_mth = DateTime.Now.Month; switch(cur_mth) { case 10: // do your October stuff break; case 11: // do your November stuff break; } Month will contain values from 1 to 12 with 1 for Januar and 12 for December. Do not call this.Close() before you opened the next form because if you close your last form your app will exit. If somewhere else you need ToString, this is ...Show All
Windows Live Developer Forums Windows Live Problems, Signing in not working
When i sign in, it gives me and error message and says that the Windows Live Service is currently unavailable, i need help, is it me or is Windows Live not working at the pressent time. I'm having the same problems, I cannot sign into my Hotmail account from the hotmail website or MSN. Both sites redirect me to the Windows Live login where I get the screens mentioned above, it is VERY frustrating knowing I have email that I cannot get to!!! This all started the moment I signed up for Windows Live, any help ...Show All
Visual Studio 2008 (Pre-release) Listview: dynamic loading content possible?
I've got a listview containing a GridView. I'd like to fill the content of this listview dynamically. So, instead of loading all my items (could be thousands) into an observablecollection I'd like to give the ListView the count of items, and just load those items that are displayed right now. To get this data from the database is no problem, but I need a way to know which lines I need to load to be displayed right now, need to know when scrolling, resizing or similar is changing these. Is there any known way to achieve this Thanks, Sam You could write your own descendent of ViewBase that adds paging You would also need a paging descendent of ObservableCollection Then you could notify the ne ...Show All
Visual Basic Printing of Excel (Windows Applications)
Using VB2005 The following codes is for u see and my qns is how to: add in the data for additional table in dataset.. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexport.Click Using SourceDataset As System.Data.DataSet = db1DataSet Dim oXL As Excel.Application Dim oWB As Excel.Workbook Dim oSheet As Excel.Worksheet Dim oRng As Excel.Range ' Start Excel and get Application object. oXL = CreateObject("Excel.Application") oXL.Visible = True 'Get a new workbook. oWB = oXL.Workbooks.Add oSheet = oWB.ActiveSheet Dim Application As New Excel.Application Application.SheetsI ...Show All
.NET Development Failed to uninstall WinFX 3.0 Beta
I am trying to install WinFX 3.0 but I have to uninstall the beta version first, but failed to so. Anyone knows what happened [12/18/06,10:37:03] Windows Communication Foundation Beta 2: [2] Error: Installation failed for component Windows Communication Foundation Beta 2. MSI returned error code 1603 [12/18/06,10:37:06] WapUI: [2] DepCheck indicates Windows Communication Foundation Beta 2 is not installed. [12/18/06,10:37:06] WapUI: [2] DepCheck indicates WinFX Runtime Components 3.0 - Beta 2 was not attempted to be installed. [12/18/06,10:45:20] Windows Communication Foundation Beta 2: [2] Error: Installation failed for component Windows Communication Foundation Beta 2. MSI returned error code 1603 [12/18/06,10:45:22] Wap ...Show All
Visual Studio Express Editions Substitute for VB's 'Module', in C#?
Is there something thats similar to a module in VB, in C# Because I want my variables to be used widely, so I can use isclicked=true , instead of frmwhatever.isclicked=true I'm using C# 2005 Express Modules is just one of the many things that VB has the C# does not , or at least not easily. You actually have to create a class and give that class all static (shared in vb) members or methods. You then must reference those method through the classname. So your class would look like: public class myCommon { public static String csSQL = "myconnection string"; public static double TaxRate = 0.07; } and your consuming code would look somthing like: private void frm ...Show All
Visual Basic Application.DoEvents() resets my counters
Hi everyone.. I got a system that reads info in real time from database and from PLCs. I got several stations which read info in real time, so whenever a change is done in the PLC, it updates the information ASAP. In the routine, I got a FOR statement which helps me to do this. I use DoEvents() to keep all other messages and information working. In my VB6 version theres no problem with this, everything works wonderful. In my VB.Net code, I got the same exact code but whenever I do an Application.DoEvents() my counter is set to 0 so the information is not fully updated. I tried moving the line to another part of the code but still doesn't work. What can I do to ensure my info is read correctly and that my control statement works as ...Show All
