Greg McPherran's Q&A profile
Community Chat Here is my first application
About a month and a half ago, I discovered Visual Basic 2005 Express and now, here is my first application. My first software "baby" is a simple Stopwatch accessory. It features a stopwatch that counts up to tenths of a second, and a countdown timer. Documentation is included in HTML and plain text formats. Installer and uninstaller are provided. Main UI screenshot Coundown dialog screenshot Source English and Spanish executables with installer/uninstaller and documentation. I figured that's what virus scanners and anti-spyware are for. Plus, distributing the .exe is part of the excitement of creating an application anyone can use, not just those who have Visual Basic ...Show All
Visual Basic FileCopy Program
I am currently trying to make a program that will allow a user to select a file orgin. Then the user selects where the want the file destination. Then they can click a button that will show the file origin and destination on the main form and show a progress bar at the same time. Thanks, QWERTYtech sure no worries from looking at the code, the first code snippet is pretty much doing as the comments suggest, it is opening a file for reading and reads it line by line in a while loop until no more lines are left to be read but in between the while loop, you have to put some code in, what code that is I have no idea and guessing its up to you to process the file. the second code snippet appe ...Show All
Software Development for Windows Vista How to use DirectX.AudioVideoPlayback????
Hello.I have used DirectX.AudioPlayback in my application to play MP3 Files But I have a problem.How I know when the playback is finished, because I need to start the next melody. I have tried to use audio.ending() event, but I don't see any result. the code is the following: .... // backmusic is the name for audio InitializeComponent(); this.backmusic.Ending += new EventHandler(backmusic_Ending); .... private void backmusic_Ending(object sender, EventHandler e) { MessageBox.Show("The playback is completed1!!!"); } thanks Check out the DxPlay sample at http://DirectShowNet.SourceForge.Net . It is c# and uses the IMediaEvent event method he describes. ...Show All
Visual Studio Express Editions A load of errors I don't understand...
Hello. I get the following errors when trying to build a program that uses Winsock: ------ Build started: Project: Winsock, Configuration: Debug Win32 ------ Compiling... ws-util.cpp main.cpp Generating Code... Linking... main.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function _main main.obj : error LNK2019: unresolved external symbol "int __cdecl DoWinsock(char const *,int)" ( DoWinsock@@YAHPBDH@Z) referenced in function _main main.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function _main ws-util.obj : error LNK2019: unresolved external symbol _WSAGetLastError@0 referenced in function "char const * __cdecl WSAGetLastErrorMessage(char ...Show All
.NET Development disposing/freeing memory for image
every few seconds (5) I recieve an image from a server. This works fast and well with wireless and usb connection, bluetooth is of course slower, i guess its advantage is that we can catch any possible errors. now, when I recieve an image, I read the contents into a memory stream until an EOF flag is sent. This all works great. Once fully recieved, I raise an event from my thread (non UI) to the UI, which in turn, raises another event to another form (so UI -> UI). This final event in the UI (picture viewer) then calls a delegate method to show the image recieved by reading it from memorystream: public void DoShowImage( MemoryStream theMemStream) { if ( this .InvokeRequired) { DoHandleSho ...Show All
Smart Device Development installing my WinCE SDK corrupts VS2005??
Hello people, Actually i have made a Win CE OS using platform builder 5.0 and also made a new SDK n build that , i installed that .msi (in my SDK) file on my development machine but than starange thing happened.... when i started VS 2005 and made a new C# smart device application.... it throws an error : "platform [MYSDK] has no device " i clicked on OK..throw 2nd error "The project could not be opened because it refers to a platform tha does not exist in your datastore" i mean now i am not able to make smart device application... i do not know whether it corrupts my VS2005... but i cheked in VS2003..oh it is working fine there and i can see my SDK as a target platform over there.. than wha ...Show All
Visual Studio 2008 (Pre-release) Events in DataTemplate in a ResourceDictionary
I'm trying to figure out how to handle the following situation: We have a page with some code behind that handles an Expanded event for an Expander. The Expander is defined inside a DataTemplate which is in a ResourceDictionary. I know this is not the ideal situation, but we need to use ResourceDictionaries for the DataTemplates because we need to be able to modify them without recompiling code. So the question is, how can I reference an event that is in the code behind inside a DataTemplate in a ResourceDictionary I've tried a few different ways, but none seem to work. I've tried putting the event as usual on the Expander - Expanded="TestExpanded". I've tried referencing the public method like you can for a command - Expan ...Show All
Audio and Video Development style attributes
1) In some of the style namespace attributes(like style:height, style:width), it was given in spec that it Applies to : all display elements but non-replaced inline elements display elements are : body, br and object inline elements are : br, span, area, button, input, object what are the elements that will come under display elements but non-replaced inline elements Pls explain this. 2) Are all style namespace attributes have default values Is there any style namespace attributes that must be compulsorily mentioned in elements or all are optional Peter, I am not able to understand clearly - "things like images and text areas that have explicit sizes set,". Can ...Show All
.NET Development How to Console.WriteLine (SqlConnection.GetSchema) ??
My end goal is to find out if a particular table exists in Sql Server database . I tried a few tricks with dismal result and finally stumbled on GetSchema method. I thought it would give me all the information I need. The problem is I cannot get it exposed for review: SqlConnection connHist = new SqlConnection ( "server=ddmnvt61\\sqlexpress;" + "database=hist_Tick;Trusted_Connection=Yes" ); connHist.Open ( ); DataTable sqlDt1 = connHist.GetSchema ( ); for ( int ii = 0; ii <= sqlDt1.Rows.Count; ii++ ) { for (int jj = 0; jj <= sqlDt1.Columns.Count-1; jj++) { Console.WriteLine (" {0}", sqlDt1.Columns[jj].DataType ); } ...Show All
Visual Studio Team System TFSSERVICE & TFSREPORTS Account permissions
Hi, The installation manual says, that TFSSERVICE & TFSREPORTS accounts "Must have the Allow log on locally permission on Team Foundation Server computers." Can somebody please explain why these accounts needs to log on locally rather than log on as a service Is it ok to have log on as a service and do the installation, the reason this question is asked is to provide a justification to the Network support group in my company as why those permissions are required Any help in this regard is highly appreciated. Thanks, Kalyan Here http://blogs.msdn.com/robcaron/archive/2005/10/05/477565.aspx you have a little bit explanation for this, but the resume, is this accounts ...Show All
SQL Server Grouping problem
I am working on a report for a small POS. The report should allow the user to choose the time interval to group sales records, e.g. 1 hour, 2 hours or 4 hours. I believe I can setup this by the DiscretizationMethod and DiscretizationBucketCount of the Hour attribute in my DimTime dimension. However, the problem that I am facing is this POS will support multiple branches. Each branch will have their particular opening and closing hour. So, how can I group all the transaction into groups, said "Before Shop Open" and "After Shop Closed" This sounds strange but will happen quite often as overtime work is always expected in my living place. If this is infeasible, is there any workaround I think the business user certainly want to know how many ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Solution for people that can't upgrade directx from 9.0b(or 8.1) to 9.0c {windows xp users}
This thread is for people in two scenarios: 1) Those that can't upgrade their directx version from 8.1(standard windows xp starting version) 2) and Those that can't upgrade their version from 9.0b to 9.0c. Today is your lucky day! These two solutions largely will work for people who keep trying to upgrade their version of directx and continually get a dialog box appearing, which says, “The components installed are now ready for use.” That being said, these poor unfortunate souls(myself included up until an hour ago), know better, as they check the diagnostic tool and see for themselves the version has not changed and they are stuck in version 8.1 or 9.0b. I spent an accumulative of 6 hours on the phone with Microsoft technical support a ...Show All
Visual C# Notepad syntax higlight code
How can i add syntax higlight in my notepad application, i am a newbie in c# and this forum. :) you would need to use the RTB (RichTextBox) control in your application. This will allow you to syntax highlight/format your document and save it to an rtf (or plain text) format. you can use things like select() method which will allow you to select characters and highlight them http://msdn2.microsoft.com/en-us/library/system.windows.forms.richtextbox.aspx ...Show All
.NET Development Lifetime of MarshalByRef objects
I have a MBR object which is being constructed by the server itself when a client connects and a reference is passed to the client as an out parameter of the function call. and is being used by the client. In this case, would the lease mechanism be required to keep these objects in memory (since it is not remotely activated, but is remotely used) How shall I control the lifetime of this object Try to use LifetimeServices by setting it's LeaseTime and RenewOnCallTime property. cheers, Lok ...Show All
Visual C# resize image
I have an image that is really big. I need to find a way to resize ...Show All
