VS 2005 Properly Handle All The Windows?

Apr 9, 2009

The app Im working on is dunning on an embedded xp machine. It recieves input from the serial port from an industrial process, and then a backgroundworker class calculates and updates the single form GUI with the results from the process. Very simple.Now, the customer want to allow automatic download of log files by an USB memory. The process should work like this:

1)User plug in an usb memory

2)SHow a virtual keypad (touch screen) where the user enter a security code

3)If code ok, show a 3 choice screen, if not ok show error message and allow the user to try again.

4) If user choose the "export all" button, this choose form will close and i display another form with a progress bar that show how all files are copied to the usb memory. When this process is complete, I will display teh form that says "remove the usb memory and press ok to restart the application.

As you see here lots of forms are created and disposed based on user choices. My biggest issue here is that I have no clear design pattern to work from.For example.. should I have this "chain" in the main gui form, or should I let each form create the next form. For example on the "select action" form, when I press export, should this form create and show the "copy progress" form, or should all forms be created and destroyed from the main gui form?

Also, such an issue like with the password. I put it as a constant on the main form, to avoid "magic numbers" in the code. And then I ran into problem because the "keypad" form is created on another thread and I can't access the costant on the main form, so I got a cross thread exception.Everything starts when an USB memory is connected. And the OnConnected eventhandler is running on a different thread than the main UI thread. how to design this chain of window creation/deletion is greatly appreciated. I show all forms with the SHowDialog because I dont want the user to be able to close the form unless he/she presses a button. And not by accident press somewhere else.

View 2 Replies


ADVERTISEMENT

Windows Forms Text Editor Control That Can Handle MS Word Documents Properly?

Aug 13, 2011

I need to find a Windows forms Text edit which can handle MS Word documents correctly.That is documents with Images, textboxes etc (.doc, .docx).I have tried Devexpress Xtrarichedit and TXText Control but when you load a MS Word Document (.doc, .docx) the document does not appear as it does in MS Word.That is Textboxes overlapping images are misaligned or have no transparent background option, so the white background of the textbox hides part ot the image.Has anybody had experience with 3rd party Document .net editors which mamage MS Word Documents correctly?

View 3 Replies

Properly Handle Disrupted TCP Connection?

Dec 19, 2010

I'm using TCP socket connetion between a server program and a client program. Multiple client programs shall connect to the same port. The problem is that if I close a client program I get the following error on the server-program:

System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)[code]......

View 1 Replies

IDE :: VB App Will Not Work Properly On A Windows 7 64 Bit PC?

Mar 8, 2012

My VB app will not work properly on a Windows 7 64 bit PC.When I launched it on the Win7 PC it will open up OK but when I open a crystal report, the form page comes up ok but the report is missing.Then I get a pop up window asking me for a user name an PW:

[Code]...

View 9 Replies

VS 2005 Now() Not Resulting Properly?

Nov 23, 2010

vb.net
"Button_Click event"] Dim dt As Date
dt = Now
Select Case cmdUserSave.Tag

[Code]....

my problem is : when i am trying to save data in sql server management studio 2005 then data will be saved but with some garbage date. date is not saving properly.

View 13 Replies

VB File Debugs Properly, But Will Not Run In Windows

Dec 17, 2010

I have a very basic Visual Basic Program that I created in Visual Studio 2010. It's a form application where clicking a button runs a simple calculation and then outputs the answer with MsgBox. When, I debug it works properly, however when I successfully build and run the exe, nothing happens.

View 1 Replies

VS 2005 - Counter Not Incrementing Properly?

Apr 7, 2010

why my counter is not working properly. It starts by counting all of the files in a directory and everything is set to 0 initially at the start of the program. For some reason when I debug it in certain places the counter increments correctly but with no debugging and once it reaches my DoSql function the counter is not set to the correct number of files anymore.. Below is my code, filesRemaining should be initially set to the number of files then decrement everytime.. when I debug this method itself it works fine but say I put a debug point elsewhere or don't debug at all the counter is not right.

'Declare global variables
Dim fileNumber As Integer = 1
Dim arrayPosition As Integer = 0
Dim changeType As Integer = 0

[code]....

View 1 Replies

VS 2005 AcroPDF Not Loading Properly?

Nov 11, 2009

I have a desktop application that shows a list of pdfs, and when the user selects one it shows it to him/her. I use the AcroPDF control for this, and it seems to work, but if the user goes back and forth between viewing the file and viewing the list, then the control randomly decides not to show the file (showing a blank page instead).

View 4 Replies

VS 2005 Application Doesn't Run Properly On Win 7

Jul 22, 2011

I have an application that runs perfectly on XP. When I run in on Win 7, it works perfectly when I run it in the IDE but when I deploy it, the application starts OK but some of the functions don't work as they should. I know it could be anything but does anything stand out?

View 1 Replies

VS 2005 Handling Currency Properly?

Feb 9, 2009

VS 2005 Handling currency properly

View 1 Replies

Properly Add A Registry Key So The Application Startup With Windows?

Feb 21, 2011

I am making a setup application and I need to know how to properly add a registry key so the application startup with windows. I have made what you can see on the image but I get an error when my PC restarts.This setup is nothing special I just need to make the registry key properly.

View 10 Replies

How To Make A Windows Service Work Properly

Aug 3, 2010

My project requires that a windows service checks up a table on a sql database(MDF) and if product existence is 0 then sends an email to some mail address and keep checking every 24 hrs.Now Im able to send mail messages but what Im not able is to make the service itself to work or at least make sure that is working.I do the following(correct me if I do something wrong or missing a step):

1. create a new project and choose windows service

2. add a timer and set to 4000 ms just to test not wait the 24 hrs lol

3. then open its event timer_elapsed and put some code on it, like a msgbox that would keep spamming every 4 secs just to test

4. at the event onstart I enable the timer by: timer1.enabled=true

5. at the event onstop I disable the timer by: timer1.enabled=false

6. right click then choose add installer

7. in the newer installed with the two objects:

a. serviceinstaller1 set its properties to: displayname: myservice and servicename: myservice

b. serviceprocessinstaller1 set account property to LocalSystem

8. build the project and install it by opening the VS console and type: "installutil c:path blah blahservice.exe" then hit enter

9. all successfull installed open the pc manager and run the service from the list and this should be the deal

Now my real problem is that by following those steps my service is sucessfully builded, installed, and started but after the 4 seconds no msg pops up so this leads me to think that is not doing anything or I did something wrong in the steps above. Is there another way to test if this service is working else than the msgbox or the log entry? Plus, Im working on my home pc which is a xp OS. I tried the same at college pcs wich are win7 and when I did install by the console it returned an error weird but in my home pc it doesnt(and I have to present my project at college at college and tomorrow

View 7 Replies

Properly Deleting Items From A Windows Form?

Jul 18, 2010

i am running into some difficulty with the .NET garbage collector. i have a custom control that i need to dispose and reallocate depending on user interactions. calling ctrl.dispose() and then instantiating a new control accomplishes what i want, with the nasty exception that the garbage collector (at least, i am presuming this is the GC, since this exception will happen on it's own after the application has been idle in the background for several minutes) will then periodically throw an exception: "cannot access disposed object

View 4 Replies

VS 2005 Appliction Settings Not Working Properly?

Mar 29, 2010

I am using VB.NET 2005 and running non embedded crystal reports from the SQL server and have following variables database name, server name, user name and password in the application settings editor and given the default values.

I have created a form that allows these settings to be changed by the user and the probem that I am having is that, the reports are still running with incorrect credentials. The following code runs when the user modifes the values and clicks OK button

[Code]...

View 3 Replies

2005 - Horizontal Scroll Event Not Working Properly

Jan 7, 2011

I am developing windows application in visual basic .net 2005. I am using datagridview and i want to handle its horizontal scroll event. i was using code below,

[Code]...

View 6 Replies

VS 2005 Data Grid Coding Not Working Properly?

Jul 17, 2009

I did this Imports System.Data Imports System.Data.OleDb Public Class Form1 Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

View 11 Replies

Finding Handle Of Windows?

Dec 2, 2010

I am trying to write a program which needs to interact with other programs.For this i need to find the handle of its window and have the user select the right windows. I am thinking of enumerating all windows and put the in a dropdown box. I was able to do this with visual basic but the code does not work wiht vb express. I need some pointer to find the solution.

View 4 Replies

How To Handle Windows Explorer

Dec 27, 2008

I have work on vb.net 2005, and want to create a small application for handle windows explorer by my application. In this application my needs are.Open Windows explorer on user define Root folder. For example Root Folder is D:ABC and in this root folder some sub folder are present (Number of folder depend on users). For example in under d:ABC three more subfolder are present 1.NSHARMA 2.APOORE 3.SKHANNA, name of folder is user login name in application.

View 39 Replies

How To Handle Windows Explorer By .net

Jun 11, 2009

I have work on vb.net 2005, and want to create a small application for handle windows explorer by my application. In this application my needs are.Open Windows explorer on user define Root folder. For example Root Folder is D:ABC and in this root folder some sub folder are present (Number of folder depend on users).

For example in under d:ABC three more subfolder are present 1.NSHARMA 2.APOORE 3.SKHANNA, name of folder is user login name in application.I need when NSHARMA login in application then in D:ABC folder only show NSHARMA folder and other folder will hide, D:ABC folder are present on Common Path.In this Application one more common Subfolder under D:ABC it's Name is SharedFolder, it will Share between all user , it can access by at same time all login users and only how will be see it how is permission for it. For Example NSHARMA and APPORE have permission for this then only they will see this subfolder. Then APOORE and SKHANNA will be login in application that time APOORE will see it and SKHANNA does not see it.

[Code]...

View 13 Replies

Error Creating Windows Handle ?

Aug 23, 2009

In vb.net and made a proj. in vb2005. but when i try to load a particular form(opens up in a mdi container like all others in the project) , an error-error creating windows handle pops up, the line is frmadmn(the form).show

What shall i do? i read a lil on the net about too many handles, user objects etc. but the stats of my proj. at the time of error are-handles-350,threads-17,user objects-235 gdi objects - 159. have these anything to do with the prob.. then what should i do..? i read about the dispose command also about how to use it ? what to dispose...?

View 5 Replies

Error While Creating Windows Handle

Aug 27, 2010

I get this error as below when I open my "frmAddPrivate" more than 5 times. How I can overcome it?

View 5 Replies

Handle Stopping Of Windows Service?

Sep 21, 2011

I have created a Windows Service in VB.NET (VS2010) that executes a certain task every minute. When the service is being stopped, either manually by the user, or when the system is rebooted, what can I do to make sure the task is being finished properly before the service is actually terminated?

View 1 Replies

Tab Control To Handle Child Windows In An MDI?

Nov 6, 2009

My application uses an MDI form, and there are instances where the end user will need multiple child windows open at a time. I need an easy way for the user to switch between windows, which made me think of using tabs kinda like Firefox, or like the tabs in the Visual Studio IDE up at the top where you can switch between open forms and code files.

I'm curious if there is a control in .NET that will already do this? I would rather not re-invent the wheel if I can help it. Google has failed me thus far.

View 5 Replies

VS 2005 - How Many Events Can Routine Handle

Apr 21, 2010

Is there any limit to the no. of handles assigned to an routine. Well actually my form form has about 80 controls and when ever the user press the enter key, focus must be to the next control. so can I handle all the 80 keydown events in one routine, or is there an better way.

View 3 Replies

VS 2005 Where - How To Handle Data Mis Match

Dec 16, 2009

I have a small databse program that reads a .csv or text file.

my code
Public Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
OpenFileDialog1.InitialDirectory = "c:"
OpenFileDialog1.Filter = "CSV Files (*.csv)|*.csv|Text Files (*.txt)|*.txt"
Me.OpenFileDialog1.FileName = ""

[Code]...

i am trying to Catch a data mismatch, if the user happens to select a .csv or text file but they arent of the right type of data. Dim result As DialogResult = MessageBox.Show("Wrong Data Type", "Data Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)If result = Windows.Forms.DialogResult.OK Then

(not sure what to put here)
End If
Catch
End Try

I want to make it so that if the user selects the wrong file, it stops executing shows the message box , the user is only given the option to hit "OK"then it starts the openfiledialog click event again or stops and the user can open the filedialog again It seems that even though the ex is caught the rest of the code will keep running and from what I can tell from the documentation thats by design?

View 11 Replies

[2005] Create One Handle For Several Controls?

Feb 12, 2009

I was just wondering if their was an easy way to create one handle for several controls. For instance, I have 20 buttons and I want them all to do the same thing when clicked. Instead of having 20 handles for each button.click, is there a way to create one handle that can cover them all, such as a grouping or something?

View 16 Replies

Best Way To Handle Resolution Monitor When Writing A Windows App

Apr 15, 2009

What is the best way to handle resolution issues on the monitor when writing a windows app from VB.Net.I developed an app on my laptop, it's widescreen and res is set to 1440 x 900. When I take my app and run it on a machine with an older Analog monitor and the res is 1024 x 768, all of the forms on the right and bottom are cut off.

View 2 Replies

Out Of Memory Exception - Can't Create Windows Handle

Nov 26, 2011

I have searched other forums, google, etc. and have not find a solution. I am creating a VB.NET application using Visual Studio 2010. My application runs fine inside the IDE. Outside of the IDE, it crashes immediately with an OOM exception. I have compiled the program in both VS 2010 and VS2008. The outcome is always the same. I increased my Desktop heap to 12288 meg from 3072 meg thinking that was the issue, but the outcome is the case. Although the increase does improve my response in the IDE. The error is also being reported as related to mscorlib.dll; and my version is for 2.0 framework is 2.0.50727 and for 4.0 framework is 4.0.30319. I am running Windows XP/SP3.

View 13 Replies

VS 2008 : SendKeys To A Specific Windows Handle?

Sep 17, 2009

Is it possible to send keys to a specific windows handle without having to bring that window to focus?Right now I have the following code almost doing the trick:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetForegroundWindow Lib "user32" Alias "SetForegroundWindow" (ByVal hwnd As Long) As Integer
Sub SendKeysToApplication(ByVal AppTitle As String, ByVal Keys As String)

[code]....

It will bring the windows calculator window to the top and set the value "1" on it.Is it possible to send the keystroke without poping the window?

View 7 Replies

VS 2010 Get Process Windows Handle And Title?

Jan 16, 2011

For an app. I'm making I need to find all the windows that belong to a process.
From all of this windows I want to have the handle and title.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved