tunesmith's Q&A profile
Visual C++ Releasing resources used by Image::FromFile
Good day, I have an application in which I am dynamically generating images, which I subsequently load into a Picture Box Control, with code something like the following: Image^ image = Image::FromFile( "figure1.png" ); this ->pictureBox1->Image = (Image ^) image->Clone(); delete image; My problem is that the "delete image" does not free up the system resources for the FromFile operation (ie, there is still an O/S file lock on figure1.png). In a nutshell, I'm looking for a methodology which would allow me to write figure1.png any time I want, and view it in the Picture Box Control. I'm aware I could potentially c opy the .png file first, so that the file name I use to write to is neve ...Show All
Visual Studio Express Editions Intellisense not working
I have two Windows Forms projects. Intellisense works in one but not the other. I have tried the things in help (deleting the .ncb file, setting options, etc.) to no avail. Not sure what else to try. Any suggestions as to where else to look Thanks. Thomas Yes. What I did was to delete it with C++ Express closed, restarted the IDE and rebuilt the solution. And, I have tried it on two different computers, one running Windows XP Pro and the other XP Home. The Intellisense is really nice to have so I'd like to work my way through to a solution since it may happen with the next app. Thanks. Thomas ...Show All
SQL Server Database Mirroring Transport is disabled in the endpoint configuration.
Hi. I am getting this error. Msg 1486 , Level 14, State 2, Line 2 Database Mirroring Transport is disabled in the endpoint configuration. Someone please help me.It's urgent. I am using same PC with 2 different intsances. This is how i have done it: CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'test@#56' GO -- CREATE CERTIFICATE PRINCIPAL_CERT CREATE CERTIFICATE PRINCIPAL_CERT WITH SUBJECT = 'PRINCIPAL CERTIFICATE' , START_DATE = '03/07/2006' , EXPIRY_DATE = '01/01/2010' GO -- CREATE ENDPOINT NAMED (EPMIRRORING) USING CERTIFICATE AND ALGORITHM CREATE ENDPOINT EPMIRRORING STATE = STARTED AS TCP ( LISTENER_PORT = 6025 , LISTENER_IP = ALL) ...Show All
Visual Studio Menu items disappear on first use
Following the model suggested in sample code, I've been able to add to the main menus in the Visual Studio development environment with my Add-In. Curiously, however, my menu items disappear after my first attempt to use any of them. The menus don't, nor do submenus. Only the menu items do. Here's how I am creating them: IdeCommand = IdeCommands.AddNamedCommand2( _ _addInInstance, UniqueName, MenuCaption, Description, True, 0, Nothing, _ CType(vsCommandStatus.vsCommandStatusSupported, Integer) + _ CType(vsCommandStatus.vsCommandStatusEnabled, Integer), _ vsCommandStyle.vsCommandStylePictAndText, _ vsCommandControlType.vsCommandControlTypeButton _ ) IdeCommand.AddControl( _ ParentMenu.CommandBar, _ ParentMenu.CommandBar.C ...Show All
Visual Studio 2008 (Pre-release) Receive timeout
Hi! I can create a simple WCF application. In service I write: [ ServiceContract ] public interface IPhotoGet { [ OperationContract ] Image GetPhoto( string name); } ServiceHost svcHost = new ServiceHost ( typeof ( PhotoImplement )); svcHost.AddServiceEndpoint( typeof ( IPhotoGet ), tcpBinding, @"net.tcp://localhost/photo" ); svcHost.Open(); And in client I write: IPhotoGet photoGet = ChannelFactory < IPhotoGet >.CreateChannel(tcpBinding, new EndpointAddress ( String .Format( @"net.tcp://{0}/photo" , tbAddress.Text))); Image result = photoGet.GetPhoto(tbPhotoName.Text); pbResult.Image = result; When I try to execute method GetPhoto, which m ...Show All
Visual Studio remote debugging in vc8
Hi My local (VS) machine and remote machine are XP SP2, I add my username to the remote machine's Administrator group and Debugger Users group,I cannot debug my c++ code remotely, getting the following error message: Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named "domain\user@computer". The Microsoft Visual Studio Remote Debugging Monitor on the remote computer does not have permission to connect to this computer. Please see Help for assistance. these two machines are in the same domain and same subnet. these two machines turned off windows firewall. pls help me ,thank you Hi, It is not clear if you are using VS 2005 or an earlier version. In ...Show All
Visual Studio How To extract content from *.img format file .
Hi, I have a visual studio 2005 setup in a single file which is having extention as *.img. I donot have a DVD Writer/Reader by which i can write this image file into DVD and then can executes the setup. Can you please tell me how i can get the content of this *.img setup file. For any solution and suggestion, i will be thankful to you, Thanks in advance Daemon-Tools is pretty good at this. Just make sure to uncheck the toolbar when installing it ...Show All
SQL Server Union for two sets with where clause
Hi, I have situation where I'm returning comparing data from two date ranges in a chart in MS Reporting Services. In regular SQL, I simply do a UNION between two select statements. I also have a dummy column returned to distinguish between the two selects. i.e. Select *, 1 As 'DataSet' from tblData Where startDate >= @sdate AND endDate <= @edate UNION ALL Select *, 2 As 'DataSet' from tblData Where startDate >= @sdate2 AND endDate <= @edate2 In MDX, I've only seen a UNION for the columns, but not with the WHERE clause included. Is it possible to have a where clause for each set What's the syntax Thanks a lot! WITH MEMBER Measures.Set1 AS 1 MEMBER Measures.Set2 AS 2 SELECT Uni ...Show All
Visual Studio 2008 (Pre-release) Complex (?) Layout
Hi all, I'm trying to make a layout which looks like the following image (drew with Expression Design so i have XAML code) : http://img443.imageshack.us/img443/2481/layoutoz8.png The gray area is where the content will be. I want that when i resize my app the "borders" keep the same size and only the gray area gets bigger and thus allow more visible content (ie no Zoom). Is there another way to do this than using a layout "a la Web" : divide my decoration as a grid with 3 columns and 3 rows, the first and last columns and rows gets a fixed size so that only the center gets resized Thanks, Guillaume Hi , Seems this too works. < Grid > < Grid.RowDefinitions > ...Show All
Windows Forms Why isn't LinkCollection derived from CollectionBase?
Why isn't Windows.Forms.LinkLabel.LinkCollection derived from CollectionBase like other collections One level up, LinkCollection implements ICollection, so does CollectionBase. CollectionBase.InnerList wouldn't make sense for a LinkCollection... ...Show All
SQL Server Amazon Web Service Call with Web Service Task
With the new improvments to the web service task, we can now use variables as arguments in web service calls. I am trying to setup a call to the amazon web service ECS. I am trying to do a simple sellerlookup. I have played with the settings and gotten nowhere. I get one of two error when I try to execute. I can always use a scripting task or write my own task, but I would like to use the built in task if it is possible. Has anyone used AWS with SSIS [Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Object reference not set to an instance of an object.. at Microsoft.SqlServer.Dts.Ta ...Show All
Smart Device Development Alternative of System.sr.dll
I have a application for which if I to add extra cab file for system.sr.dll for exception error message strings . Is there any other work around so that I can show exception error message strings without system.sr.dll {I don't want an extra cab file foir this system.sr.dll} Thanks Ilya, That's seem to be the solution of my problem. I have an solution which have multiple project{a C++ service,c++ today plugin,C# application [all are the part of the solution}. and a smart device cab project. I make the cab file from the solution.Now Please let me know how can I bundle[package] SR cab in my solution and then how to install it on first run. Awaiting eagerly for little detailed solution ...Show All
Visual C# Show Startup Programs
How can i show the startup programs from: HKLM, HKCU, and the startup folder i made this, but it's totally wrong, neve tried switch before ! private RegistryKey GlobalReg; private void Read() { switch (startup) { case "HKEY_LOCAL_MACHINE" : GlobalReg = Registry .LocalMachine.OpenSubKey( @"Software\Microsoft\Windows\CurrentVersion\Run" ); break ; case "HKEY_CURRENT_USER" : GlobalReg = Registry .CurrentUser.OpenSubKey( @"Software\Microsoft\Windows\CurrentVersion\Run" ); break ; } foreach ( string programas in GlobalReg.GetValueNames()) { ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Software vertex processing
Hello, i;ve 2 questions: i'm building 3D engine using DX9 & C++, all is working fine but when i tried to render using software vertex processing i couldnt see anything on screen (just the clear color in device clear function) although its working fine when using hardware vertex processing, what is happening there when i try to run some demos on my machine it works fine ( Geforce 5700) but when i tried on low spec machine like (Geforce 2) it renders but everything is a mess like the zbuffer isnt there at all and all models draws on top of each other, i'm not using any advance shaders, only shaders for state , i've tried to disable shaders still same problem !! Any help on those dudes When ...Show All
Game Technologies: DirectX, XNA, XACT, etc. error LNK2019: unresolved external symbol _DirectDrawCreateEx@16
Hi this a piece of my code: //create the timer (0.02 seconds) SetTimer(hWnd,1,3000,NULL); //create the direct draw object hRet = DirectDrawCreateEx(NULL,( void **)&g_pdd,IID_IDirectDraw7,NULL); And i keep getting thEsE error message: 1>Random Colour.obj : error LNK2019: unresolved external symbol _DirectDrawCreateEx@16 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" ( WndProc@@YGJPAUHWND__@@IIJ@Z) 1>Random Colour.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7 1>C:\Documents and Settings\Marcello Marabese\My Documents\Visual Studio 2005\Projects\Random Colour\Debug\Random Colour.exe : fatal error LNK1120: 2 unresolve ...Show All
