talraviv's Q&A profile
Visual C++ Changing Static properties.. Is this impossible?
Hi there.. I have been trying for days now to change the property of visible on a static text control in my application to false during runtime. I have researched this and researched this, and even posted on Expert Exchange, but no one seems to know how to do this.... I'll post the answer I was given on EE.com, and hopefully someone here will know more about it. I have only been programming in C++ for a week now, so forgive me if this is a stupid question.... I have several static text controls setup in my application (DirectX pong game) to report various stats that assisted me in creating the game and diagnosing troubles that may arise setup in a console.rc resource in my project. These are displayed in a control panel beneath the ...Show All
Windows Forms Multi thread
Hi, I have a while loop which keeps showing words in a label on a Form. I can still do events with the Application.DoEvents(). But the while loop contains 2 thread.sleep(). Which makes it slowing down in handling events. Its getting stuck for 5 seconds in total. I thought i might solve this problem by using multi threads. Once the first thread starts which contains the while loop, it should start a second thead that contains the Application.DoEvents() and not slowing it down anymore. Can this be done like how i described it Or does anyone has a better solution I'm all ears, thanks in advance! sure well yes, since its in a while loop it will constantly go insane and act as if your app is not responding bu ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Poor XNA performance or my poor code... or normal?
I've have created a simple scene that renders 8000 identical cubes. I know thats a lot of cubes, but I only get 4 FPS on a 2.0ghz dual core with a 7300 mobile graphics card at 640x480 with simply vertex shading and one directional light. This pc can run doom3 at 60FPS at that resolution and a program i wrote in MDX that draws about 1000 detailed spheres with specular lighting runs at over 100FPS Here is the code I'm using: using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; namespace WindowsGame1 { public class Game1 : Mic ...Show All
Windows Forms Where should I put the global variables?
Hi all, First step, I created a simple "Windows Form" Form1 project. There is Form1.h, and I have many functions like click(), paint(), buttom_down()...in it. How to pass the variables between these functions Should I use global variables or they are not recommanded For example: The program tries to get the screen size and pass into image display function I will have scr_width, scr_height, img_src_width, img_src_height, img_scr_width, img_scr_height, Bitmap^ img... What is the good way to set up them And the second step will be, I separate the buttoms and display area, should I use two Forms If so, how do I pass these variables between so many functions in two Forms Thanks! ...Show All
Visual Studio 2008 (Pre-release) Possible bug in pagination? AND (() = ())
I tried to make the simple project using DLinq and found this issue: var v = ( from blog in db.Blogs orderby blog.BlogID select new { BlogName = blog.BlogName, Login = blog. User . Login , NumEntries = blog.Entries.Count, LastPost = blog.Entries.Max(ee => ee.CreateDate), Entries = blog.Entries.OrderByDescending(e1 => e1.CreateDate).Take(5) }).Skip(20).Take(10).ToList(); is translated to : SELECT TOP 10 [t0].[BlogName], [t1].[Login], ( SELECT COUNT(*) FROM [Entries] AS [t9] WHERE [t9].[EntryID] = [t0].[BlogID] ) AS [NumEntries], ( SELECT MAX([t10].[CreateDate]) FROM [Entries] AS [t10] WHERE [t10].[EntryID] = [t0].[BlogID] ) AS [LastPost], ( SELECT COUNT(*) FROM ( SELECT TOP 5 NULL AS [EMPTY] ...Show All
Visual Studio 2008 (Pre-release) How to bind a property to resources in a Resource File
HI, I would like to know if its possible to set a property of a control in xaml to a resource in a Resource File. E.g Typically you have images/icons contained in the resource manager, normally you can access these resources with code, textBox1.Text = Properties.Resources.txtPageTitle; or image1.Source = ConvertToImageSource(Properties.Resources.MyImage); How wil this be possible in xaml <Image Source= ></Image> Or else, is it possible to imbed image data that is in base64 like the rtf format <Image Source="(base64 data)"></Image> Thank you very much, Jaco Check out this SDK entry and this article . I believe they should answer your questi ...Show All
SQL Server Copy SQL Server 2005 DB to SQL Server Mobile - is it possible?
I'm creating a prototype of a PDA app using CF.Net 2.0 and SQL Server Mobile for a prospective client and I've gone through and designed, built and populated a database using SQL Server 2005... and then realised where I really need it is on the PDA! Without going through all the pain of setting up SQL replication or writing all the code is there a way to export a 2005 database to SQL Server Mobile so it results in an .SDF file I know I can script each table out and run it via the SS2005 management studio when connected to a local .sdf file then copy that to the PDA but the thing is I really want to keep my test data so I don't have to re-enter it again. TIA for any help... there must be a way to do this but I'm quite new to SQL Server ...Show All
Game Technologies: DirectX, XNA, XACT, etc. get screen resolution & FullScreen
How do I get screen resolution of the computer Because my program will be shared between many computers, I want the program to find the resolution of the computer on wich it is running. By example, on my computer at home, the program will return the value 1024 and the value 768 in order to make 1024 X 768. On my laptop, I will get 1920 and 1200. I want to get the width and the height separately, in two variables. With those values, I will be able to set automatically on each computer the window size as I want it. To resume, I am looking for something like this: width = computer.ScreenResolution.width; height = computer.ScreenResolution.height; Also... If I ever decide to start the game in FullScreen (Make the wind ...Show All
SQL Server online index rebuild and update statistics
Hi .. Please advice whether i have to do update statistics along with Index rebuild (online /off line) Thanks in advance This depends on the traffic on your DB. IF its an OLTP/heavily used DB you might keep this for off peak use. Your Index scripts could be scripted to either update or do not update stats. You dont *have to* update stats. Its optional. But generally its good to keep updated stats. Again, depending on your Db size and usage, you can turn Auto Statistics ON or OFF. ...Show All
Visual Studio Team System New Schema import does not import extended proprities of the Tables
New Schema import does not import extended proprities of the Tables although the "Ignore Extended Proprities" check-box in the Options Setup was not cecked. I did this with the most innocent "Adventure Works" DB. Please advice. I just did this and they all show up. Can you check the ScriptsIgnoredOnImport.sql file to see if they ended up there I presume you are running the RTM version and not some older CTP version Thanks, -GertD ...Show All
Visual Basic About Notify Icon with windows service
Dear all, I am programming a windows service that will constantly run, and this application associated with a notify icon. I got a problem when I login and start this service menually, the notify icon displayed proerply. However, if the service is started automatically, the service will run in the background properly, however, if I login the windows this icon did not showed up in the system tray. I have tried search information on the Internet about the Notify Icon but no luck, I only got information that the tray will be destroyed once a user logoff, and recreated after logon. If do so, is there a way that I can capture this event in VB so that I can add this icon again I hope if someone in here can help me on the issue. Thanks, Dragon ...Show All
SQL Server Multiple time dimensions and inventory measures.
I got 2 time-dimentions: [Week] Hierarchised dimension based on Year - Halfyear - Week - Day ! The supply calculated based on the Week-dimension sum( generate ( ascendants([Week].currentmember), iif( [Week].currentmember IS [Week].firstsibling, {}, [Week].firstsibling: [Week].prevmember ) ) + [Week].currentmember , [Measures].[Mutation] ) [Posting Period] Hierarchised dimension based on Year - Quarter - Month - Day ! The supply calculated based on the Posting Period-dimension sum( generate ( ascendants([Posting Period].currentmember), iif( [Posting Period].currentmember IS [Posting Period].firstsibling, {}, [Posting Period].firstsiblin ...Show All
SharePoint Products and Technologies How can I execute code in Session Start/End, Application Start/End, etc.?
If I have code that needs to execute on Session Start, or Application Start, etc., what is the proper way of adding this code for a Sharepoint web application Just add global.asax as with ASP.NET SharePoint already installs with a global.asax file. You could modify it directly, but the standard 'modifying installed SharePoint files' disclaimer applies: hotfixes, patches, etc. could overwrite any changes you make to the file. ...Show All
Visual C++ How do I fix aspect ratio of CStatic object (MFC)?
I apologize if this question has been asked prveviously: I have created a simple dialog with a CStatic object as picture frame to show JPG image, however when I start the MFC program in different PCs it changes the rectangle size. For example, in my desktop I have it set to 320x240, but when I ran it a laptop (wide screen) it became (320x222). Is there a way to fix the dimension size of the CStatic object in the dialog resource editor I'm using Visual Stuiod 6.0 by the way. Any suggestions will be helpful! thanks in advance! Ayman Shoukry - MSFT wrote: BTW, you can still use these forums for MFC issues, but not VC6.0 MFC. My bad; that came off somewhat harsh. What I meant was ...Show All
Visual Studio Express Editions Disabling Buttons
I'm in the proccess of try to create a program that, at log in the user must accept the terms and conditions but I'm having trouble of diabling things like the windows key to stop people for bypassing it, does any one know of any coding I can put it to disable these buttons. Any help would be greatly apreciated Cheers Buttons include: Windows Key Windows Key + .......(e.g "e") Ctrl+Alt+Del any other that I've over looked hi, i don't like that sort of disabling things, but the onlything in my mind right now is to open it as dialog if the user accept the terms and click ok you should continue, if not return but be aware nothing can force the user to read it most of t ...Show All
