Max Noyeke's Q&A profile
Visual C++ How do I Enable ActiveX Controls
When I created my project I unchecked - 'ActiveX Controls', thinking I would not need them. Now I need them, but I cannot work out how to change the project settings to enable ActiveX controls. Please could you tell me where in the project Properties dialog is the option to enable them Thanks I think you should add " #include <afxdisp.h> " line to your StdAfx.h file and call AfxEnableControlContainer function in InitInstance member of your application. Then rebuild your solution using Rebuild All command. To be sure this is enough, create two new projects with different ActiveX settings and then compare generated files and compiler options. I hope t ...Show All
Visual Basic Invalid Database File Header
I have an application which runs fine on the design station, but when installed on a non-design station Throughs this exception when attempting to open the SQL Database: The header for file 'C:\Documents and Settings\Administrator\PLDaq.mdf' is not a valid database file header. The PageAudit property is incorect. Cannot open database requested by the login. The login failed. Login failed for user File activation failure. The physical file name may be incorrect. I have insurred that the file name inside the connection string matches the physical file name, and I am using the logical file name and not the physical file name in the connection string, the data file is in the same directory on both machines. I have no idea wha ...Show All
Visual Studio Express Editions very simple calculator
Hi everyone, This will sound completely noobish ^_^" but i can't get it to work. The thing im tring to do is extremely simple but i can't find any info on it what so ever. Im still a C# beginner and i guess i got heaps to learn :D There are two textboxes and a button on my form on click it should collect the values from the two textboxes and add them together that's it. However, i keep getting a 'can't convert string into int' error. (when i try and pass the value as a string instead of a int it works without problems i.e. when i try to display my first and last name using the textboxes) Thank you for your responses :) Thank you so much for the reply i've been curiouse how to this for quite some time ^_^ Your solutio ...Show All
Visual Studio Extending code support for additional languages
I have a library of useful tools (Sources) written in languages other then than those supported by visual studio. Awk (gawk) and php are two examples. Most of these tools are for text manipulation that operate through pipes reading one or more data files plus a source file and outputting a new text file. That new text file may, for example, be generated C# or VB code produced by the processing. I give two simple examples: (a) a file containing the structure of an existing data base is processed to automatically generate the VB code to create an SQL database. (a) a file containing a mathematical formula is read to generate C# routines to apply the formula. I want to use Visual Studio so as to edit my Sources, maintain the fo ...Show All
Smart Device Development Self-installing Peripheral driver
Is there any way to have a driver install itself the first time a peripheral device is connected ...Show All
Visual Basic CheckBox Service control (VB, VS 05)
I decided to try and expand my project, I now wish to have the (current, I'm adding more as I find out which aren't required ) two processes here's a brief on what stage the additions are at. I have added 4 check boxes named; SpoolCheck1 SpoolCheck2 MDMCheck1 MDMCheck2 (more will be added as I find out more that can be stopped) and two command buttons named; StopCheckedButton StartCheckedButton I would like to 'link' the check boxes to the command buttons, but the checkboxes job (when checked, then clicking the start/stop command buttons) is to start/stop the selected program/process, in this case spool and mdm. I have these codes for starting and stopping the processes and return a message if there is a problem. ...Show All
Smart Device Development SIP icon location
Hello, on new WM5 devices, the SIP icon appears to be a bit more clever than before. If an old application is executed, it will appear in the bottom right corner of the screen. On other occasions it will appear in the bottom centre of the menu. This behaviour might produce decent results for most cases, but causes troubles in an application that i am assigned to. Does anybody know if there is a way to configures the SIP icon to show up in the bottom right corner of the screen I do not want to move the MS_SIPBUTTON window by force, but a more decent API that configures the SIP control to show up the old way. Thanks in advance, Peter Vrenken I am still having troubles with the SIP Icon location. At first, the solution given above s ...Show All
.NET Development assign object to data from webservice
I have assigned a variable of type object to a method. i.e. object o = getDataFromWebService(int intData); Then hovering over o or looking at the values in Locals Window for o, I can see the data has been returned. Something like: o[0] o[1] o[2] etc... Theh for each index, in the locals window I can see the fields returned also. In code, how can I refer to these values please I tried something like: string x = o[0].ToString(); but I get this errorL: Cannot apply indexing with [] to an expression of type 'object' Thanks If an array is returned from getDataFromWebService, then it's necessary to cast o to the array to be able use the indexer. Something like this: object o = getDataFromWebService( ...Show All
.NET Development Excel Interop..excel.exe process still alive
Hi, I need to realize a multisheet formatted excel file from an asp.net (c#) web page. I thought to use Excel Interop but I've some problems when I try to kill excel process after file generation.. I've read several threads about this argument on this forum and it seems to me that I'm driving in the right way.. but excel.exe process never die.. this is the class I wrote is this: using System; using System.Data; using System.Configuration; using System.Reflection; using System.Runtime.InteropServices; using System.Web; using System.IO; using Microsoft.Office.Interop.Excel; namespace FileHandler { public class ExcelManager2 { private string strPath = HttpContext.Current.Server.MapPath("./"); public ExcelManager2() ...Show All
Visual Studio Express Editions SQL Database with software update
I have an SQL database attached to my program that I publish with click once. The initial install goes fine, but any updates that get installed will overwrite the database on the client machine with the database included with the install. I can't simply remove the file because this update also gets installed on computers for the first time that need the database to be installed. Is there a way to not install the database on updates if it already exists From the visual basic help, it mentions: Files of this type will be installed to the data directory. When an update to the application occurs, a data file may be migrated by the application. When an update to the application occurs, migrate the information in this file into ...Show All
Commerce Server CS 2007 license and price ?
Hi all, I am using the CS 2007 Evaluation for Developer. But in the future I want to use it for my customer. Is using CS 2007 Evaluation against law And how much is the price of the CS 2007 Thank you. I believe Caeser meant to write that the customer needs to choose between Standard and Enterprise edition. The developer edition, while free, limits the system to ~10 client connections. That's more than enough for a single user to debug an application, but you could see how that might have some problems when scaling out in an enterprise scenario. ...Show All
Windows Search Technologies Does WDS update last access times of files that it scans and indexes?
I'm beta testing a new utility (UltimateDefrag) that requires accurate last access time stamps in order to place the most frequently accessed files on the outer tracks of the hard drive for improved performance. I'm wondering if WDS updates the last access time stamps when it scans and indexes If so, is there a way to disable this without affecting the indexing and search capabilies of WDS I think it must update the accessed times. Just did a search and found something I know I haven't opened in months and it shows a "last accessed time" of 9/3, which is when my last full index likely was. There is nothing obvious that allows you to disable setting the access time and indexing certainly is an "access". ...Show All
Visual Basic FileSystemWatcher want see if file is changed?
Hello, I have a problem with an application I am building that should copy a bgi file (from the program BgInfo ) each time the file changes (when a user has edited the bgi file). But my application doesn't want to copy the file, when it changes. This is the source code: Imports System Imports System.IO Public Class FileCopyAgentMain ''Declare the public variables that can be used in all subs and functions Public errortext As String = Nothing Public PathToFileToWatch As String = "\\5.121.178.206\test\BgInfo\" Public FileToWatch As String = "test.txt" Public PathToCopyTo As String = "C:\BgInfo\" ''When the program starts, it copies th ...Show All
Visual Basic Problem with msgbox
I have a problem in VB.Net with the msgbox function. When it runs, it does not always display. Sometimes it just pops onto the taskbar, but and I have to click it to get it to display. The msgbox is coded as follows: Dim Reply As Integer Dim style As MsgBoxStyle style = MsgBoxStyle.YesNo Or MsgBoxStyle.Question Or MsgBoxStyle.DefaultButton2 Reply = MsgBox( "You have made changes to this record, do want to save them " , style, "Cancel" ) If Reply = vbYes Then SaveRecord() End If This is a Web based project Thanks, I guess I'll just pop a simple form that looks like a message box. Since I'm developing it, the msgbox is popping up on my PC which is th ...Show All
Visual Studio Express Editions idiots code book
hi everyone, i am a beginner to vb as are many who post here, i am putting together a book that explains all code statements and explains how they work and what they are doing better then some of the books i have read. i there is anyone who can submit their error mesages and solutions that will be great, also i will be posting all kinds of command questions as i have already done to others on other posts and i would be gratefull for yoiur explanation comments. i want to start with accept changes why do i use it and wehn dio i use it, what is it for thanks hi andrew then you will know what i am wanting to do, this is for my own benefit also, i am finding it hard to undertsand what things ...Show All
