Answer Questions
Tryin2Bgood Help with disable keyboard, mouse and screen
I currently doing a project tat requried a pop up to warn the user to take a rest. Upon the pop up the user will not be able to continue using the computer is there any suggestion on how i can do that thank alot. you can use a timer to achieve what you are doing. So if the application is in use for say, 5 minutes, then the application/timer will kick in and say "take a break" and wont be available until another 5 minutes or whatever. You need to convince me that this app has a real use and not some fabrication to learn how to write a virus. i currently a student in ngee ann poly. I am making a project call vision guardiancontroller this help younger childrens to have the conc ...Show All
Jonathan Hseu ' ' is ambiguous in namespace ' '
I am working on a project in vs2003 that consists of 2 class libs and a main app. From time to time after weeks of everything going ok, I will make a change in one of the libs and suddenly get a forest of ' ' is am.. errors. Even deleting completely the changes I had made did not fix the problem. Today I finally realized what was going on. One of the libs, call it MyClassLib, defines many custom controls that are either derived from Windows controls such as Textbox, etc or UserControl. I have finally discovered that the problem arises when I try to define a new control via the designer that contains one or more controls from MyClassLib. Everything seems to go along fine until I try to compile. Then LOTS of errors. The answer is that vs add ...Show All
Bill Foust-DAI Optimizing Search
I am using VB.NET 2003 and MS Access. I have a TextBox and below it is a ListView control. As the user types a character in the TextBox, the records starting with that character get filled in the ListView control. The records are fetched from either Oracle or Access database. Previously, I used to execute a SQL query, which looked something like this: "Select FirstName from TableName where FirstName like '" & TextBox.Text & "'%" This query was set to execute as the text in the TextBox changed. If the TextBox is blank, then all the records get displayed on the ListView alphabetically. Now I have decided to use a different approach so as not to query the database again and again. Now what we are doing is that ...Show All
Sacristy How to sort a list from A to Z
Is there a way i can sort a list from a to z. Its this kind of list. System.Collections.Generic.List(Of T) Ah, and the VB solution is shorter all those big words, too. It's all the same underneath, though... I still dont get how i would sort it if i was using a structure. Those examples dont help. because I can't stand VB, this is in C# (it blows away VB. . . again if I you think its all the same underneath, you don't know what you are talking about!!!!) using System; using System.Collections.Generic; using System.Text; namespace SortStruct { class Program { public struct MyStruct { private int _a; public int A { get { return _a; } set { _a = value; } } ...Show All
Troy Lundin Need help on call fx in a do loop
I am trying to call 4 functions together in a loop With a 2s delay in between each fx However only the last fx is called What is goin on Timer2.Start() Do While Timer2.Enabled = True Call RLeg_Up() If Timer2.Enabled = False Then Call RLeg_Down() Timer2.Start() If Timer2.Enabled = False Then Call LLeg_Up() Timer2.Start() If Timer2.Enabled = False Then Call LLeg_Down() 'Only LLeg_Down is called Timer2.Start() End If End If End If Application.DoEvents() Loop Still a noob btw This is how i think the code should be Unless you actually tell us what occured rather than a generic - it didnt work the ...Show All
LISA86 Trouble preventing duplicate instance of application
Hi, Regarding preventing or allowing a second instance of my application to run...I need the user to have a choice, so coded up the following. Friend Class FormSplash ... (the splash form is active for < 2 seconds) FormSplashLoad() ... If (closeCuz2ndInstance()) Then Application.Exit() End If ... continue with initializations ... close splash and open subsequent form(s) Function closeCuz2ndInstance() As Boolean 'Check to see if another instance of this program is already running. 'If so, ask user what they want to do. 'Reply True iff there are other instance(s) and the user wants to close. Dim openAnyway As Boolean If (PrevInstance()) Then openAnyway = MsgBox(& ...Show All
thukralz animate system tray
I can animate the system tray while my program still do events (for example: while program query database and fill all listboxes, the system tray will have a animated icon) Yes, you can use a timer to control this. You will want to make sure though (possibly through DoEvents() that you long running background work is giving a chance (from time to time) to the timer to do its work and the UI to be drawn. and can I have a timer to do that and at same time do the other operations There is no direct way to do this in the framework instead it would be up to you to replace the image being displayed over and over again to achieve the desired effect. ...Show All
rfiddelke Experimental Learning
I am making a front-end program for the lame mp3 encoder simply for learning experience. I can get it to handle all the options and output the files perfectly. There are a few questions I still have though. 1. Is there a way to hide the command window that pops up when encoding a file and instead show my own progress window 2. How would I detect the progress of the encoding 3. When I have a list of files to encode the only way I can think of is to encode them all at once. Is there a way to encode them one at a time 4. Is there a way to find the bitrate of a file When I add files to the list i want to show the bitrate of that file. That is what I have for now. Thank you to anyone that can help. As an aside, I have thought about contacting a ...Show All
Wee Bubba Custom control problem
This may well show my idiocy but here goes. I decided to build a custom control using visual basic in Visual studio 2005. I created a control library and built a control by dragging a Text Control from the tool bar. I managed to add the properties I wanted and modified the key down and key press events to accomplish what I wanted. The idea was of course to have this custom control available in many areas in a project. I then added the control library to the visual basic windows project. I am able to select the control from the toolbar in the project and add it to forms in the project. This all works (the control works as designed). The problem I have is when I add code to say the got focus event of the control in the project th ...Show All
Jonesj3599 Logging ?
I'm doing a net 2.0 windows application and I'm wondering if the net framework has classes for logging errors into text files. Also some tutorials on how to use them would be nice, thanks in advance. I don't understand how the net framework 2.0 doesn't have logging capabilities, hopefully 3.0 will have them. Anyway, I just when the easy way and made a stupid class with a static method and just call the method on the catch block. Public Class logger Public Shared Sub log( ByVal ex As String ) Dim f As New IO.StreamWriter(Application.StartupPath & "\errors.log" , True ) f.WriteLine( Date .Now.ToString & " - " & ex) f.Close() End ...Show All
little_girl progress bar
I am trying to put a progress bar on a media player can you help please Public Sub Readtrack() ProgressBar1.Minimum = track start() ProgressBar1.Maximum = track end () Dim i As Integer For i = 1 To 100 ProgressBar1.Increment( ) Next i End Sub dont know what I am doing wrong this is what I got now and it wont work for me Bar1.Minimum = 1 Bar1.Maximum = 100 Dim TrackLength As Integer Dim TrackPosition As Integer = 1 Dim TrackPositionPercentage As Integer = 1 Dim trackPercentageCompleted As Integer = 0 If TrackLength > 0 Then trackPercentageCompleted = TrackPosition \ TrackLength * 100 End ...Show All
Sarah21 Datagrid Scrollbar
Can some one help me please In my program i need to turn off the enable of the datagrid the problem that when I turn it on again it's scrollbar becomes inactive , so the user can't use it to move between the datagrid rows I use VB 2003 thanks for your help Use the readonly property which would set the grid so you could enter or chnage anything but the scrollbars would still be active enabling you to scroll around and view the data. are you sure that scrollbars property of the DataGrid is not none Thanks for your reply, but the problem is that I need to close the Datagrid so the user can'nt choose another row for some minute ...Show All
MeZKaL How can I replace the newline character with something else from a textbox?
In my database I have addresses in one line, comma separated. That way they can be as many lines as they want... I read from the database and put addresses in a textbox as you would like to read them - on individual lines. I use a simple string substitution: txtAddress.Text = Replace(cmbAddress.Text, ",", vbNewLine) I'm having problems saving it back to the database with commas if the user modifies it. I tried variations on: Replace(txtAddress.Text, vbNewLine, ",") with vbCrLf or chr(13) isntead of vbNewLine with no success so far... Anyone know how I can succesfully find my new line characters and replace them with commas Thanks, James It was a silly mistake on my part. I am conver ...Show All
IamWasim The referenced assembly is not installed on your system. (Exception from HRESULT: 0x800736B3)
I have an application that is distributed with click-once. One of my users already makes use of it for quite some time without any problems. Only recently, he is not able to launch the application anymore. During the check that is made to see if there is a new version of the software, he gets the message: "Application cannot be started, contact vendor" If I copy my application manually, he is able to launch it without any problem. I included the detailled log below. Any suggestions PLATFORM VERSION INFO Windows : 5.1.2600.131072 (Win32NT) Common Language Runtime : 2.0.50727.42 System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200) mscorwks.dll : 2.0.50727.42 (RTM.050727-4200) dfdll.dll : 2.0.50727.42 (RTM.0 ...Show All
Bene_Ries Accessing Clipboard
Hi, I wanted to take a screen shot and save that image as .bmp file using VBA. Could any one please let me know how to do this Thanks, Suraj Hi, I was trying with following code. But CopyImage function is returning handle to the image. I am not getting how to use that handle to store that image. Public Function GetclipboardBitmap(ByVal hwnd As Long) As Long ' Handle of the clipboad data Dim lngHandle As Long ' Handle of bitmap Dim hBitmap As Long On Error GoTo ErrorHandler If OpenClipboard(hwnd) <> 0 Then ' Get handle to global memory holding clipboard text lngHandle = GetclipboardData(CF_BITMAP) ' Could we allocate the memory If lngHandle & ...Show All
