SEARCH YOUR SOLUTION HERE  

Moving text / graphics in a canvas so it doesn't lock up the program in the process

I guess you could say I'd like to draw some scrolling credits with some text and graphics. But I want this to keep running while the program is doing other things. e.g. accepting input in EditFields and PushButton clicks... ...

Posted On: Sunday 11th of November 2012 10:17:00 PM Total Views:  470
View Complete with Replies




Related Messages:

moving files   (239 Views)
i need to create a script to check if there are files in a folder, if there is move them to a different folder. i am new to this and am having trouble debugging. any advice sSource = C\Users\jdowell\Desktop\A sDestination = C\Users\jdowell\Desktop\B Set objFSO = CreateObject("Scripting.FileSystem Object") Set fld = objFSO.getfolder(sSource) For Each f In fld.files If objFSO.FileExists(sDestination & f.Name) Then objFSO.MoveFile f.Path, sDestination & Left(f.Name, InStrRev(f.Name, ".") - 1) & "_1" & Mid(f.Name, InStrRev(f.Name, ".")) Else objFSO.MoveFile f.Path, sDestination & f.Name End If Next
moving VB6 to new computer without original installation disk   (280 Views)
I am buying a new computer with Windows NT 2000. My old one has Windows 98 with Visual Basic 6.0 Enterprise edition installed. I have long lost my VB6 CD's to reinstall it on the new computer. How can I ...
Adding and Removing Images from a Database using VB6   (285 Views)
I have questions stored in an access database, some with images. I have used a datacontrol to show the questions on a form in VB6 and used an OLE container control to display the image (I dont know if there ...
listview : moving a listviewitem-record to another line - How ?   (276 Views)
, I've got a listview full of names, and want to re-order those manually (after which I'm saving those names in that order). I've just got one problem : I can't seem to find a method to move a ...
removing date from database record -   (374 Views)
Using VB5 and Access 7 database. Not sure how to describe this problem - but I have 2 text boxes in a database program - they store a date and the properties in the DB are set as date/time. Works ...
Need help removing blanks from Grid / DataWidgets   (413 Views)
, I have a grid in which I need to be able to manipulate. If there are any blanks, then these need to be moved to the bottom and all the numbers below it should be moved up. Current Grid (blanks are shown here as asterisk) 5 6 1 4 9 3 7 8 3 * 1 5 9 * 5 * 3 * 1 2 7 6 5 9 Need it to be: 5 6 1 4 9 3 7 8 3 6 1 5 9 2 5 * 3 9 1 * 7 * 5 * I need to read the grid column by column. If a blank is found, I need to move everything up and place the blanks at the end of the column. For example in the 2nd column I have: 6 8 * 2 I need this to become 6 8 2 * There might be more than one blank and more than one blank in a row. For example in the 4th column I have: 4 * * 6 I need this to become 4 6 As an example of how the grid is named. Here is a small code section that shows how the program will swap numbers. For example in column 1 if I change the 7 to a 1, the grid changes from: 5 7 9 1 To 5 1 9 7 For X = FrmMain.grid.Rows - 1 To 0 Step -1 FrmMain.grid.Row = X If FrmMain.grid.Columns(UpdateCol).Value = newValue And FrmMain.grid.Row rRow Then FrmMain.grid.Columns(UpdateCol).Value = oldValue Exit For End If Next I am showing this code just so you have the naming convention for the grid and how I have been coding other areas. Thank in advance for reading this post, and any help is greatly appreciated.
moving through a spreadsheet left to right as opposed to top to bottom   (289 Views)
So, this is dumb and I'm probably missing the obvious but it's been a long week and this is bothering me. I have a macro that loops through a spread sheet. it goes top row to bottom row then left to right in each row. I understand how it loops through the rows but I'm not quite sure how it's told to work through each cell in the row. Sub QuoteCommaExport() ' Dimension all variables. Dim DestFile As String Dim FileNum As Integer Dim ColumnCount As Long Dim RowCount As Long Dim NumCols As Long NumCols=67 For ColumnCount = 1 To NumCols Columns(ColumnCount).EntireColumn.AutoFit Next ' Prompt user for destination file name. DestFile = InputBox("Enter the destination filename" _ & Chr(10) & "(with complete path):", "Quote-Comma Exporter") ' Obtain next free file handle number. FileNum = FreeFile() ' Turn error checking off. On Error Resume Next ' Attempt to open destination file for output. Open DestFile For Output As #FileNum ' If an error occurs report it and end. If Err 0 Then MsgBox "Cannot open filename " & DestFile End End If ' Turn error checking on. On Error GoTo 0 Selection.Columns.AutoFit ' Loop for each row in selection. For RowCount = 1 To Selection.Rows.Count ' Loop for each column in selection. For ColumnCount = 1 To NumCols ' Write current cell's text to file with quotation marks. Print #FileNum, """" & Trim(Selection.Cells(RowCount, _ ColumnCount).Text) & """"; ' Check if cell is in last column. If ColumnCount = NumCols Then ' If so, then write a blank line. Print #FileNum, Else ' Otherwise, write a comma. Print #FileNum, ","; End If ' Start next iteration of ColumnCount loop. Next ColumnCount ' Start next iteration of RowCount loop. Next RowCount ' Close destination file. Close #FileNum End Sub So as you can see numcols is a number but I don't see where we are telling the sheet to loop throught the columns instead of the rows. Like I said, long week. If someone could explain this to me, that would be much appreciated.
removing certain text from a srting.   (294 Views)
If URL = "[TS] " Then URL = Right(URL, 4) Shell "C:\Program Files\Internet Explorer\iExplore.exe http://www.imdb.com/finds=tt&q=" & URL, vbNormalFocus End If this is my problem. I have a text file that has a name like "[TS] Gamer" but i want to remove the first "[TS] " section so that IMDB reads the name a bit better. In order to do this i am using the Right function but am unable to use wildards in the code like "[*]" to make it eliminate the problem. Does anyone know how i can do this i need gone is the [TS] but cannot figure out how to eliminate it.
removing decimal point only in vba   (312 Views)
I would like to convert numbers into whole numbers without removing decimal numbers except the decimal point. this is required by the system i'm doing right now. Here's what i wanted to happen: 1437.21 = 143721 1437.00 = 143700 Hope you' ll give attention to my queries.
moving through a spreadsheet left to right as opposed to top to bottom   (293 Views)
So, this is dumb and I'm probably missing the obvious but it's been a long week and this is bothering me. I have a macro that loops through a spread sheet. it goes top row to bottom row then left to right in each row. I understand how it loops through the rows but I'm not quite sure how it's told to work through each cell in the row. Sub QuoteCommaExport() ' Dimension all variables. Dim DestFile As String Dim FileNum As Integer Dim ColumnCount As Long Dim RowCount As Long Dim NumCols As Long NumCols=67 For ColumnCount = 1 To NumCols Columns(ColumnCount).EntireColumn.AutoFit Next ' Prompt user for destination file name. DestFile = InputBox("Enter the destination filename" _ & Chr(10) & "(with complete path):", "Quote-Comma Exporter") ' Obtain next free file handle number. FileNum = FreeFile() ' Turn error checking off. On Error Resume Next ' Attempt to open destination file for output. Open DestFile For Output As #FileNum ' If an error occurs report it and end. If Err 0 Then MsgBox "Cannot open filename " & DestFile End End If ' Turn error checking on. On Error GoTo 0 Selection.Columns.AutoFit ' Loop for each row in selection. For RowCount = 1 To Selection.Rows.Count ' Loop for each column in selection. For ColumnCount = 1 To NumCols ' Write current cell's text to file with quotation marks. Print #FileNum, """" & Trim(Selection.Cells(RowCount, _ ColumnCount).Text) & """"; ' Check if cell is in last column. If ColumnCount = NumCols Then ' If so, then write a blank line. Print #FileNum, Else ' Otherwise, write a comma. Print #FileNum, ","; End If ' Start next iteration of ColumnCount loop. Next ColumnCount ' Start next iteration of RowCount loop. Next RowCount ' Close destination file. Close #FileNum End Sub So as you can see numcols is a number but I don't see where we are telling the sheet to loop throught the columns instead of the rows. Like I said, long week. If someone could explain this to me, that would be much appreciated.
IS there any way of removing...   (419 Views)
when you publish a project you have to ba an admin is there anyway of getting rid of that
Help with creating/deleting/moving files.   (260 Views)
I am trying to create a file, add contents to the file, delete if the file already exists, and move the file to a new location. Im getting an error somewhere in my code. I was wondering if you could look at it and help me out with it. The file seems to create properly, but I don't think that the file that may or may not be already existing is getting deleted, and the file that was created is not getting moved to the location I want. Keep in mind that I want to move the file, not copy it. Not sure if this makes much of a difference. Any help is appreciated, thanks a ton. I'm new to vbs, so any shortcuts that you know of would be appreciated. Heres my code so far Wscript.CreateObject("Scripting.FileSystemObject") Dim objFSO, objFileCopy, objTextFile, objFIleDelete Dim strFilePath, strDestination Dim strFileText1, strFileText2, strFileText3, strFileText4 Dim strFileText5, strFileText6, strFileText7, strFileText8 strFilePath = "C:\Users\Andy\Desktop\text.txt" strDestination = "C:\Users\Andy\Documents\text.txt" strFileText1 = "a" strFileText2 = "b" strFileText3 = "c" strFileText4 = "d" strFileTest5 = "e" strFileText6 = "f" strFileText7 = "g" strFileText8 = "h" Set objFSO = Wscript.CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.CreateTextFile(strFilePath, true) objTextFile.WriteLine(strFileText1) objTextFile.WriteLine(strFileText2) objTextFile.WriteLine(strFileText3) objTextFile.WriteLine(strFileText4) objTextFile.WriteLine(strFileText5) objTextFile.WriteLine(strFileText6) objTextFile.WriteLine(strFileText7) objTextFile.WriteLine(strFileText8) objTextFile.Close WSCript.Echo "Written " & strFileText & " to " & strFilePath ' Delete file if it already exists in the destination. Set objFileCopy = objFSO.GetFile(strDestination) objFileCopy.Delete () Set objFileCopy = objFSO.GetFile(strFilePath) ' Move the file destination objFileCopy.Move (strDestination) WSCript.Echo "Copied to " & strDestination Set objFileCopy = objFSO.GetFile(strFilePath) ' Move the file destination objFileCopy.Move (strDestination) WScript.Echo "Copied to " & strDestination Set objFileCopy = objFSO.GetFile(strFilePath) ' Move the file destination objFileCopy.Move (strDestination) WScript.Echo "Copied to " & strDestination Wscript.Quit -Andy This post has been edited by ajpacho: 05 March 2008 - 12:14 PM
Removing last line from string   (278 Views)
Hi. I'm trying to write a program that deals with certain text files. I'm using the following code to open and load the files to a string: ffile = "1.txt" Open ffile For Input As 1 While Not EOF(1) Line Input #1, strTemp Part1 = Part1 & strTemp & vbCrLf Wend Close #1 This works just fine however I don't want to have the vbCrLf on the very last line - is there any easy way of removing it from the end or just not putting it in there
Adding and Removing Combo items   (288 Views)
, I am new to VB6 and kindly ask for advice... I have two combo boxes...PriCombo and SecCPri SecCombo is dependant on PriCombo so i have something like this; if PriCombo.text = "one" then SecCombo.additem "two" SecCombo.additem "three" SecCombo.additem "four" else if PriCombo.text = "two" then SecCombo.additem "three" SecCombo.additem "four" endif endif This is what i have tried and SecCombo still shows items of both text one and two. Any idea how i can rectify this... One more thing, is it possible to have a VB6 program that can run without being installed on a computer, just as a stand alone Thank you in advance.
Removing the first line in a word document   (236 Views)
I'm working in Access but I have the object stuff taken care of. Admittedly, I don't have much experience with VB in Word so I'm not quite sure what function(s) to use. My original thought was define the beginning and end of the line then find the length of the text and delete that but I'm drawing a blank. This is probably easier than I'm making it out to be. If anyone could point me in the right direction, I'll fill in the blanks. Dim PF As New Public_Functions Sub test() Dim wdFile As Word.Document Dim Strt As String Dim EndStr As String Dim strToFind As String PF.InputFile = PF.GetFile("TEST") Set wdFile = GetObject(PF.SelectedFile) Strt = "REPORT NAME" EndStr = ",,,,," & "" strToFind = Strt & EndStr wdFile.Content.Find.Execute FindText:=strToFind, ReplaceWith:="", Replace:=wdReplace wdFile.SaveAs PF.SelectedFile Set wdFile = Nothing End Sub As always,
Shorter Code for removing letters and characters in a textbox   (282 Views)
Basically, your code does the job. Speaking about multiple controls, what about creating a control array and then loop through each text box control to apply your code You can find out more in this MSDN article: http://msdn.microsof...18a(VS.80).aspx
Stopping a moving image as it reaches specific area.   (185 Views)
Hi . Well i have been asked to produce a maze game for my college assignment. (Im sure this is the right forum as its not on the actual game itself) Well what i am trying to acomplish is: Char = My character. Line1 = The line i dont want my char to cross. Line2 = Another line i dont want my char to cross. Here is what i have so far. If KeyCode = vbKeyLeft = True Then If char.Width = Line2.X1 And char.Left > Line2.Y1 And char.Top + char.Height < Line2.Y2 Or _ char.Left = Line1.X1 And char.Top > Line1.Y1 And char.Top - char.Height < Line1.Y2 Then 'do nothing Else char.Left = char.Left - 100 End If End If I have made all my items like lines and characters divisible by 100 so it doesnt skip past the line. How will i stop the character passing that line Thank you if you understood that im a bit stressed.
Adding and moving data in Excel   (139 Views)
I have been asked to add a macro to an exisiting excel file using Visual Basic. I have not used this language in 3 years and so am very rusty. I appreciate any help I may receive. What I need to do is as follows: I have a file that covers daily task planning for a 21 day period. I need to add a 22nd day, shift the exisiting data for the previous 21 days to the right by one day, thus filling in the 22nd day. The reason for the shift is to account for the upcoming holiday in which we will be closed, so I also need to have that day overwritten as a holiday and remove the data. After that, the planner must print and shift everything back to the way it was. Thank you
moving a image randomly in the programe   (172 Views)
Private Sub Form_Load() Image1.Picture = LoadPicture(App.Path & "/images/bimal.jpg") End Sub Private Sub Timer1_Timer() Randomize (1000) e = (ScaleWidth * Rnd) d = (ScaleWidth * Rnd) Image1.Move ( d,e) 'here is the problem' End Sub
moving Images   (147 Views)
Sub Window_onload() picBall.style.pixelLeft=200 picBall.style.pixelTop=100 picBall.style.pixelRight=200 End Sub Sub btnRight_onclick() picBall.style.pixelLeft=picBall.style.pixelLeft + 10 End Sub Sub btnDown_onclick() picBall.style.pixelTop=picBall.style.pixelTop + 10 End Sub Sub btnLeft_onclick() picBall.style.pixelRight=picBall.style.pixelRight + 10 End Sub Sub btnUp picBall.style.pixelBottom=picBall.style.pixelBottom + 10 End Sub i need help in being able to use the left & up button can some1 tell me wot im doing wrong pls