SCADirector's Q&A profile
Software Development for Windows Vista HBMMENU_CALLBACK in vista
The following code always failed in Windows Vista (Beta 2 Build 5384). It is deemed a completely legimite code and works fine in Windows 2000, XP. Is this a known bug or HBMMENU_CALLBACK is not supported anymore Debugger shows that USER32!ValidateMENUITEMINFO sets the last error code as: LastErrorValue: (Win32) 0x57 (87) - The parameter is incorrect. MENUITEMINFO menuItemInfo = {0}; menuItemInfo.cbSize = sizeof(MENUITEMINFO); menuItemInfo.fMask = MIIM_BITMAP; menuItemInfo.hbmpItem = HBMMENU_CALLBACK; ATLVERIFY( SetMenuItemInfo(hMenu, ID_FILE_NEW, FALSE, &menuItemInfo) ); Any leads or information would be appreciated. Thanks I just downloaded and ran your binary on Vista build 5493 and ...Show All
Visual Basic Using a declared function in a dir' address.
Hi Guys, Ill be upfront, i am extremely new to VB and am still learning the ropes, so apologies if i do not make much sense lol! Ok, what i am trying to do is place the current user logged on to the computer into a directory. Eg, ------------------------- ChDir "C:\Documents and Settings\ USERNAMELOGGED IN \Desktop" Workbooks.OpenText Filename:= _ "C:\Documents and Settings\ USERNAMELOGGED IN \Desktop\IMEI.xls", Origin:= _ xlMacintosh, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _ xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _ Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(1, 1) ----------------------------- I am wanting to repla ...Show All
Windows Forms from string to form
Suppose you have the name of the form : string fname = "FormSomething"; How do I create a form object with fname as name Apparently this is not enough: Form f = new Form(); f.Name = fname; Also tried: f.CreateControl(); Can anyone please tell me how to get the form object Thanks!!! Anyway, this may be helpful to you: http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.name(VS.80).aspx Thanks ...Show All
SQL Server Trouble installing SQL Server Express as part of Click Once Deployment
Hello, I've developed a desktop application for a company. It uses click once deployment and has a few prereqs: .NET Framework 2.0, j# .NET redistributable, windows installer 3.1 and SQL Server 2005 express edition. Most of the time the application downloads and installs fine. However, one user has a problem. I'm fairly certain it's machine / OS related and I wonder if there is a way to get around it. The user has a Windows 2000 machine, Pentium III, with 512 MB of RAM. On their first try, they received an error while installing SQL Server 2005 Express. The error code the user found in the install log was 70095. Apparently the user found some information directing them to install the current MDAC 2.8 SP 1. After rebooting and ...Show All
Internet Explorer Development Does the IE7 Favorites Import/Export Wizard support Unicode?
I have Chinese names and URLs in my favorites list. When I tried to export the favorites using the Import/Export Wizard, I examined the output xml file (bookmark.htm) and all the Chinese characters are gone, replaced with " ". I have the various Chinese languages (zh-HK, zh-CN, zh-TW) in the list at Internet Options > Languages but apparently this didn't matter. Does the IE7 favorites Import/Export Wizard support Unicode, or is there a way to make it support Unicode Thanks! I've just tried this myself, with similar results. It appears as though the Import/Export Wizard outputs the HTM file as an ANSI stream. Unlike a page 'Save As' operation, I don't know of a way to force it t ...Show All
.NET Development Type conversion and xml serialization
Alright, this one has been stumping me, have tried it multiple way to no avail. What I would like to do is serialize some classes and deserialize them, without xml schema's or xslt transforms involved, just the xml files, and the classes that represent them. Here is what a specific serialization/deserialization looks like in my program: --------------------------------------------------------------- [code language=C#] public void Deserialize() { XmlSerializer serializer = new XmlSerializer(typeof(TextureInfo)); using (XmlNodeReader reader = new XmlNodeReader(XmlDocument.DocumentElement)) { TextureInfo texInfo = (TextureInfo)serializer.Deserialize(reader); item = texInfo.item; mySize = texInfo.Size; } } public void Seria ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Scene statistics
It is possible to get scene statistics: total number of triangles, number of visible triangles How to do it On Windows, you can use the PIX tool (part of the DirectX SDK) to obtain all kinds of information about your scene. The overlay statistics mode is particularly useful here. We don't have any automatic way of doing this on Xbox, so you'd have to add your own instrumentation to your drawing code. ...Show All
Visual C# Playing a resource sound on form load?
have imported a .wav audio resource into my Visual C# 2005 Beta IDE and want the sound to play on form load. The documentation I've read gives a sample: private void playSoundFromResource() { SoundPlayer sndPing = new SoundPlayer(SoundRes.GetType(), "Ping.wav"); sndPing.Play(); } SoundRes = A sound resource name. How do I get my sound to have a name Forgive me for being stupid - I'm new to C# and .NET. I want to do exactly what Dean wants to do, but I just don't understand the answer! I have added an audio resource, but I cannot access it. Could you explain to me further the meaning of " ... you should be able to specify a type in the same assembly/namespace " ...Show All
Windows Forms COM interop in ClickOnce
Hi All I was wondering is it possible to include a COM interop in the ClickOnce deployment project. Would it register itself or would it cause it to dynamically register using the manifest Also what steps should I follow to include a COM interop into the ClickOnce project. (It is a VB6 COM object). Would it be beter to register it in the registary or dynamically as the COM object version gets update quite regularly. Thanks l0n3i200n ...Show All
Visual Basic Using tableadapter cannot populate table
Hi, I am very new and just started to learn to use MS Visual Studio VB.Net 2005 to do programming to create database to populate data/information into table/forms. But no matter how I try, the table/form is empty. In other words, I cannot insert data/information into the table/form. Pls help and advice as soon as possible. Thank you. Rgds, cehor If your DB is an Access it should be pretty straightforward, the use of the wizard works for most of the time. If your DB is in XML, TableAdapter does not work, instead use XmlReader. Otherwise check about your connections settings, especially the credentials. good luck ...Show All
Visual Studio 2008 (Pre-release) No master page?
It seems that there is no mater page in WPF. And someone has advised to use Frame. But now I am developing several pages. These pages share a list of properties(These properties just belong to the pages, so I don't want to store them in Application Properties). When I extract them to a BasePage, and make those pages inherited from the BasePage, I get an error "Partial declarations of 'Page1' must not specify different base classes " I am afraid this can't not be solved use Frame. So, do I get a wrong way How to do that Thank you. Dear LeoXue, Try using ControlTemplates if you do not want frames. HTH, Suprotim Agarwal ...Show All
Software Development for Windows Vista DirectShow: get_StreamLength inaccurate
Sorry for yet another DirectShow query. I'm using the IMediaDet interface to find out the footage duration and consequently the number of frames in the footage for lots of different formats. I've tried two methods to obtain the number of frames. 1. Call get_StreamLength and get_FrameRate and then multiply the stream length by the frame rate to get the number of frames. 2. Use the number of frame calculated in 1, subtract 15 from it (magic number, nasty I know but I'm getting desperate) to get a frame number 15 frames from the end of the footage, let's call it frameNumber2. Then run the graph from frameNumber2 and use the IMediaEvent interface to WaitForCompletion. Check that the event is the EC_COMPLETE event. Use the IMediaSeeking ...Show All
Architecture Passing Business Objects through tiers?
I typically build my application using a three tier design with a domain model. Domain Model Presentation (windows or web forms) Business Logic Data Access Logic I see many examples out there that don't use a domain or logical model and just business tier. In some of those examples i have seen the sql generated in the business tier and then passed to a data access tier for execution. I don't like this approach as i don't like seeing sql in the business tier. What is the best way to pass the business entities to the data access tier without a circular reference I typically create a class library project for the business logic and another for the Data Access logic along with my windows/web application. To solve this pro ...Show All
Visual Studio What is the properties for rebuild a solution/project
Hi; What is the correct syntax to tell it to rebuild (not build, rebuild) a solution. To build I have: <MSBuild Properties="Configuration=Release" Projects="WindwardReports.sln" Targets="Build"/> but I don't think that does a rebuild. Same question for building a single project in the solution. thanks - dave ps - if stuff like this is answered in a url somewhere, please give me the url. Hi; Where can I find the documentation for all of this. I hate to have to ask here if this is all documented. But I have looked and looked and can't find it. And to bring in a previous post - how can I do a Rebuild on a single project thanks - dave ...Show All
Architecture Full multi-tier ASP.NET code generation solution?
Any recommendations ...for a full multi-tier ASP.NET code generation solution/tool/tool set Thank you, Michael. Have a look at BLINQ preview. http://dotnetwithme.blogspot.com/2007/01/orcas-blinq-preview.html vikas goyal ...Show All
