js123's Q&A profile
Visual Basic Avoiding duplicate reading of image files
If an application needs to display a JPEG, TIFF, or other image file on disk it uses something like picBox1.Image = System.Drawing.Image.FromFile(myFile) to read the file. If it needs to retrieve image data like Exif or IPTC fields from the same file it uses ByteArray1 = My.Computer.FileSystem.ReadAllBytes(myFile) to store the data in a byte array. Is there a way to eliminate that time-consuming duplication I don't see any examples in the help file of loading an image from a byte array, or of building a byte array from an image. That pointer gives me a "cannot display" in both IE7 and VS; not sure why. But the MemoryStream concept is a new one for me, and may be just what I was looking ...Show All
Software Development for Windows Vista CBaseFilter::Notify
How can I use Notify member from Filter I've implemented IMediaEventSink interface on my filter class (I dont forget changed my NondelegatingQueryInterface method). I may think wrong about this interface. I'll talk about what have I done. My purpose is send and custom notify from my input pin to my filter. I suppose my notify passing Graph after my filter. I don't think I shouldn't use as: HRESULT CMyIn::CompleteConnect(IPin* pPin) { .... m_pFiltX->Notify(MY_CRE_TASK_NOTIFY, 0, 0); //My purpose is send notify to my filter through graph. :) It might be wrong. } How should I use CBaseFilter::Notify(long EventCode , LONG_PTR EventParam1, LONG_PTR EventParam2 ) funtion When will call this member Should I call it O ...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 OK you can create an xml document that houses the information and what code to run, that way when a user adds a new type you can update it via the xml doc or use a web service to examine the user input ...Show All
Smart Device Development How to hide a DataGrid column that uses SqlCEResultset?
Hi All, I am assigning a SqlCeResultset to datagrid because it loads much more faster compared to dataset, my problem right now is how do I hide some of the datagrid columns. Here is the sample code that I'm using to hide other fields: commandRoutes = new SqlCeCommand("Select * From Customer", connection); rsCust = commandRoutes.ExecuteResultSet(ResultSetOptions.Updatable | ResultSetOptions.Scrollable); this.datagrid1.DataSource = rsCust; DataGridTableStyle ts = new DataGridTableStyle(); ts.MappingName = "Customer"; DataGridTextBoxColumn colPosition = new DataGridTextBoxColumn(); colPosition.MappingName = "position"; colPosition.HeaderText = "Pos"; ...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
Visual Studio 2008 (Pre-release) Setting an attached property by a Setter element?
I have the fragment below as contents of a <Grid> element. The idea is that if the checkbox is checked the <TreeView> element should only span one instead of two columns. When I check the checkbox the background of the treeview turns red, but the treeview continues to span 2 instead of 1 column. It's a bit like the attached property Grid.ColumnSpan does not get assigned by the <Setter Property="Grid.ColumnSpan" Value="1"/> at all. What should I do in order to achieve what I want Best regards, Henrik Dahl < TreeView x:Name = " Blas " ItemsSource = " {Binding Path=BlasRoot.Children} " d:LayoutOverrides = " Width " Margin = " 0,0,0,8 " Gr ...Show All
Visual Basic does form exist?
Is there a way to check if a specific form exist from code Davids Learning To check if an instance of a specific form type exists There is an Application.OpenForms property, I believe, you could iterate through them all and use the is keyword to see if any of them is of the type you're looking for. ...Show All
SQL Server RS2k5: Sum(field,scope??) problem
Hello, I have problem with aggregation methods in RS 2005. I have a query thar returns data set: Department, Storage, Article, Invoice, Quantity, Value, ValueX 3, 1,'Art A' ,'Inv 1',2,30, 5 3, 1,'Art B' ,'Inv 1',4,40, 7 3, 1,'Art A' ,'Inv 2',1,15, 5 3, 1, 'Art B' ,'Inv 2',2,20, 7 3, 2,'Art A' ,'Inv 3',1,18, 3 3, 2,'Art B' ,'Inv 3',2,16, 4 ValueX - this is value returned by UDF. It is unique for every "Article & Storage group". In RS my report looks like this: (grpDepartment) Department, Sum(Quantity), Sum(Value), Sum(ValueX, scope ) (grpStorage) +Storage, Sum(Quantity), Sum(Value), Sum(ValueX, scope ) (grpArticle) ++Article, Sum(Quantity), Sum(Value), ValueX ...Show All
SQL Server Move database file
I want to move my database file to a new directory, I search in MS and I use the following steps: USE master ; SELECT name , physical_name AS CurrentLocation , state_desc FROM sys.master_files WHERE database_id = DB_ID ( N 'test' ); ALTER DATABASE test SET OFFLINE ; ALTER DATABASE test MODIFY FILE ( NAME = test_Log , FILENAME = 'D:\Databases\test_log.ldf' ); ALTER DATABASE test MODIFY FILE ( NAME = test , FILENAME = 'D:\Databases\test.mdf' ); ALTER DATABASE test MODIFY FILE ( NAME = test_Log , FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\test_log.ldf' ); ALTER DATABASE test SET ONLI ...Show All
SQL Server Full text search with MSQL 2005
Does MSQL 2005 Full-Text-Search engine make use of Microsoft Search Service like the previous version (MSQL2000) If yes, where there any improvements in performance Is MSQL 2005 Full-Text-Search recommended AND ready for large scale / enterprise systems with lots of traffic If yes, how is the performance I've been doing some research, but I can't find any good articles on it... if you know of any please add them to the thread! :) Thank you very much! Although this is for SQL Server 2000, the information still holds: http://support.microsoft.com/ scid=http%3a%2f%2fsupport.microsoft.com%2fsupport%2fsql%2fcontent%2f2000papers%2ffts_white+paper.asp Buck Woody ...Show All
SQL Server Encrypt Column
Is there a way to encrypt one column of data in a table in SQL Server 2000 Thanks! -Dave Yes, there are third party products that allow you to do that. An Internet search should bring up some. You could also write your own extended procedures for performing encryption/decryption. SQL Server 2000 does not have any builtin encryption capabilities. SQL Server 2005 does have such capabilities. Thanks Laurentiu ...Show All
Game Technologies: DirectX, XNA, XACT, etc. render a copy of the backbuffer
Hello I have read several posts about that, but nothing seems to work for me, I try to save my backbuffer (to store it in a surface) then I would like to draw this saved surface... so, I need two things. 1: save my backbuffer MyBackBufferSurface=graphics.GraphicsDevice.GetBackBuffer(0,0); 2:render my backBuffer spriteRenderer.Draw(MyBackBufferTexture, new Rectangle (0, 0, 512, 512), Color .White); I used : MyBackBufferSurface= MyBackBuffertexture.GetSurfaceLevel(0); to assosiate my surface with my texture I end up with a black surface when I render my texutre please help me I on this since a week and it makes me crazy. thanx a lot i appreciate your ...Show All
SQL Server Help with Filtering
I have table with the following columns. ID, DearlershipLocation, VehicalMake, VColor, VType, VYear 1, London, Buick, Red, Sedan, 2000 2, 2006, Windsor, Ford, Blue, Jeep, 2002 My question is, how do I write a query to filter fron all Dealership location a speciif car like Ford with a red color and a sedan type Please help. Thanks. Juvan you can use the where cclause in the select statement here are some examples 1. select * from cars where color='red' --- return red car 2. select * from cars where color='red' and vehicle make ='ford' -- return red ford ...Show All
Visual Studio Express Editions DirectX managed code samples for Visual C++ Express 2005 programmers
It is now just a week or so, that I had painstakingly downloaded the DirectX SDK for February 2007. I happily installed it hoping that it would atleast have some (if not all) managed (.NET Framework using code) code samples for Visual C++ 2005 Express Edition. The SDK had samples for C++ but using APIs and the rest of the samples in managed code but in C#. I have always viewed API programming for hardcore low-level programmers able to reinvent the wheel. I knew that if I used APIs I would just give up on the first sample. In addition, to that handling all the memory allocation and release is a tedious and ugly job. By the way, what was the use of using Visual C++ 2005 Express Edition if I used APIs for programming So I had t ...Show All
Visual Studio Tools for Office Read Application Manifest Without Using ServerDocument
Does anyone know how to read the application manifest from the currently opened document without using the ServerDocument class I know you can loop over all the Shapes in the document and until you encounter the shape with the ProgID "VSTO.RuntimeStorage.1". But then what do you do with that shape How can I extract the XML for the embedded application manifest Thanks in advance for any advice... I'm not sure we really support this scenario. However, the runtime storage control is simply an IStorage implementation containing some streams. You can use the VS Doc File View tool to open a Word/Excel document to view the streams. Why doesn't ServerDocument meet your requirements All this really does is wrap the IStorage ...Show All
