Brad Smith's Q&A profile
Visual FoxPro how to shutdown the OS without error
good day to all. i use my Net monitoring system developed in VFP at my net cafe for almost a year now, and so far it works fine. But there is a little problem that although it don't bothered the user and me but it much better if it does not shows-up. When i shutdown the workstation or restart it from the server, before it will totally close there is sometimes that a VFP error message will pops-up, which will prompt to send the error to MS. How could i prevent such error as if there is still missing in my shutdown code, clear events, clear dll's, etc and etc they've all there already. it seems that the PC can't wait any longer to shutdown. Thanks for any help regarding this matter Madix_t wrote: When i shutdown the workst ...Show All
Gadgets Changing the desktop settings with a Gadget
I'd like to learn how to change windows settings with a gadget. I want to make a gadget that has a slide show like the default one but instead of loading in the Windows photo gallery program it would become a desktop background image on mouse over. Mainly I need to know is what command line would set the desktop and the syntax. intital setting | check directory selected | count images | show image | while waiting check for mouse over - if mouse over set desktop to current image shown | increment image file | check for end of file list - if not go back to {show image} | else go back to {check directory selected} Can I get help with this project Please help. ...Show All
Visual Studio Express Editions Error LNK2019
Hello, I am seeing the following Linker error while building a program using Visual Studio 2005 PRO for x64. 1>Linking... 1>Add_Application_Rule.obj : error LNK2019: unresolved external symbol "char * __cdecl _com_util::ConvertBSTRToString(wchar_t *)" ( ConvertBSTRToString@_com_util@@YAPEADPEA_W@Z) referenced in function "public: char const * __cdecl _bstr_t::Data_t::GetString(void)const " ( GetString@Data_t@_bstr_t@@QEBAPEBDXZ) 1>\\sbtusrv\scratch\hjulka\Final_CPPCOMAPISamples\Add_Application_Rule\x64\Debug\Add_Application_Rule.exe : fatal error LNK1120: 1 unresolved externals I have added the path to the comsupp.lib for x64 in the Directories under "options". It still returns the ...Show All
Visual C# I have a really newbie question on scope
Under C I would do something like “const int Max = 25”, And place this in a header file which I #include in all the C files, so the whole application had scope to Max. I know I have to use static and C# doesn't have include files, so where do I put it so the whole application h as scope to it (Max=25), without physically coding it in every file You could also use static classes, so you dont have to instantiate a class every time you need to get static, constant values. //using C# 2.0 public static class Constants { public const int MAX = 25; public const int MIN = 0; public static double _2pi; &n ...Show All
Visual Basic Question on class inside an objet
hello. A question please. A have an objet toolstripitem. When I do a "watch" on it, I see all properties and a class called system.windows.forms.toolstripmenuitem. How can I access to this system.windows.forms.toolstripmenuitem class There are informations I need. Thanks... So you are seeing a list of ToolStripMenuItem objects within the Item property of the ToolStrip In order to actually access each ToolStripMenuItem you'll need to extract it and then convert it to the desired type as the Items references its contents as ToolStripItem s. ...Show All
SQL Server Derived Column Logic to replace empty string with null?
Ok.. so I have a fixed position data feed. I read the file in as just whole rows initially, process a specific position and evaluate a conditional split to determine direction of the file for proper processing (file contains multiple recors with different layouts). This all works fine. I then use the derived column feature to process all the columns. Most of the columns are as simple as SUBSTRING(RecordData,1,10) for example to get the first column. This all works for string data. I then have a column that is a date field. The problem occurs that the code SUBSTRING(RecordData,20,10) returns either a date or empty set of data if no date was in the original file. When this gets sent to the OLEDB connection (SQL Server 2005) into the date ...Show All
.NET Development VS2005 - Create SQL Indexes in dataset
I'm currently filling several datatables in a dataset using sqldataadapters. I can pull the data and schema from the tables using da.Fill and da.FillSchema, but is there a way to pull the indexes (other than PK) from the SQL database into the dataset as well Thanks. No, database indexes are not supported in a DataSets. DataSets will create their own internal indexes, depending on reletions and what kind of DataViews were created based on data in a DataTables ...Show All
Visual Basic Process not completing
I have a vb form that runs a command line executable that creates a diff file from two existing files. When I run the program from the command line it creates a 419Mb diff file. When I run it as a process from my VB program it gets to ~400 Mb and stops. If I kill the VB program the command line executable continues to run and finishes the diff file. So I have 2 questions. Why does the process stop before for it finishes when I run it inside vb Why does the program continue to run when I kill the VB app. Here is my code Private Sub xdelta( ByVal strFile1, ByVal strFile2, ByVal strDelta) Dim strError As String Dim p As New Process Dim info As New ProcessStartInfo info.UseShellExecute = False ...Show All
Visual Studio Tools for Office VSTO Runtime Installation
I noticed the below in the MSDN documentation concerning the VSTO runtime installation. "How to: Install the Visual Studio Tools for Office Runtime - You do not need to install Microsoft Office applications on computers that you install the Visual Studio Tools for Office runtime on. For example, you can install the runtime on a server and use the ServerDocument object to access document files. If you do need Office applications on the computer, install them before you install the runtime. If you install Office after installing the runtime, you must run VSTOR.exe again and repair the installation." This seems like a hassle, since the end-user will install my app and I have no control over whether they install it before and/or afte ...Show All
.NET Development Help with ICMP packet
Is there a way to modify the source address of a icmp packet i send Dim a As New System.Net.NetworkInformation.Ping Dim b As System.Net.NetworkInformation.PingReply Dim txtlog As String = "" Dim c As New System.Net.NetworkInformation.PingOptions c.DontFragment = True c.Ttl = 64 b = a.Send(host, 1000, bt, c) ...Show All
Visual Basic Backgroundworker Fundamentals
Are these background workers slow or what If you give it a simple 2-3 lines of codes, it could take a long time for it to execute. No, that's not true. The background worker will execut the code but it appears to have amensia, because the error - thread cannot run multiple tasks at the same time... which means, even though it has finished running the code, it cannot automatically dispose itself and therefore is still active until some element deactivate it. Oh, I can understand on a single core CPU, it might have to "wait" until it turn is up - but come on, on a dual core... what's the wait I don't suppose if you tell ******** to give more processing power to background services would help ...Show All
Smart Device Development Form inheritance
I have to have form2 inheriting all the methods and variable in form1. but I don't want to have the graphical stuff from form1. how to by pass that because when i specify form2 inherit from form1 and run the program, it shows on the graphical components of form1 on form2. In Form2's Load event, you could set Visible = False for the controls you don't want to see. Marc's approach is the right OOP way. ...Show All
Visual C# How can I Instantiate a dynamic array and still be dynamic after?
Hello, I have a program which pulls config information in from a file. The files length will vary depending on how many items are configured in the application. the application stores the config information in an array while reading the file. since the file's length varies the array must be dynamic after instantiated. From all the information I have found I know I can prep a dynamic array but I cannot find any info on instantiating it dynamically. All the info shows is instantanting the dynamic array to a static one. anyone have information on keeping the array dynamic Either that or is there a way to determine how many lines in the file are left from the current Stream position It would have to be in lines, not characters. Thanks ...Show All
SQL Server Data migration from MSAccess to SQL Express 2005
Hi , I have a requirement to migrate the data from an existing MS Access database to a newly designed SQL Express 2005 database . Need less to say the table structures in both are totally different.I would like to know how can i handle a scenerio where i want to map table A in access to table B in SQL express (the schema of both different and the number of columns can vary too) , how do i migrate the data from table A in Access to Table B in SQL express using SSMA Also i would appreciate if some one can tell me is SSMA the right tool for this , or should i use the upsizing wizard of MS Access. The constraint here is that the data needs to be migra ...Show All
Software Development for Windows Vista Correct way to create a State Machine
Hi I am trying to create a statefull booking service (state machine workflow exposed as webservice). It has the following states. Created, TicketSelected, Pay, Comfirmed. My question is twofold. First: The Created state is the Initial state and has an eventdriven activity that waits for a webserivce call to arrive. When this comes i need to do some actions and the wait for a new webservice call (SelectTicket) so I can go to the "TicketSelected" state. My question is. Where should i wait for this "SelectTicket" webservice call In the "Created" state og should i create a new state called "WaitForTicketSelect" I guess my problem is that my Created state would have to listen for two web service ca ...Show All
