vb5prgrmr 143 Posting Virtuoso

Okay, start a new standard exe project and add the following to form1... 2 textboxes (text1, text2), 2 picture boxes (picture1, picture2), vertical scrollbar (VScroll1), horizontal scrollbar (HScroll1), and then add the code...

Option Explicit

Private Sub Form_Load()

VScroll1.Move Me.ScaleWidth - (VScroll1.Width + 30), 30, VScroll1.Width, Me.ScaleHeight - 60
HScroll1.Move 30, Me.ScaleHeight - (HScroll1.Height + 30), Me.ScaleWidth - (60 + Me.ScaleWidth - VScroll1.Left)
Picture1.Move 30, 30, Me.ScaleWidth - (60 + (Me.ScaleWidth - VScroll1.Left)), Me.ScaleHeight - (60 + (Me.ScaleHeight - HScroll1.Top))
Set Picture2.Container = Picture1
Picture2.Appearance = 0
Picture2.Move 0, 0, Picture1.Width * 2, Picture1.Height * 2
Picture2.BackColor = vbButtonFace
Set Text1.Container = Picture2
Text1.Move 30, 30
Text1.Text = "Left side top"
Set Text2.Container = Picture2
Text2.Move Picture2.Width - (Text2.Width + 60), Picture2.Height - (Text2.Height + 60)
Text2.Text = "Right side bottom"
VScroll1.Min = 0
VScroll1.Max = Picture1.Height
VScroll1.Value = 0
VScroll1.SmallChange = 30
VScroll1.LargeChange = 300
HScroll1.Min = 0
HScroll1.Max = Picture1.Width
HScroll1.Value = 0
HScroll1.SmallChange = 30
HScroll1.LargeChange = 300

End Sub

Private Sub HScroll1_Change()
Picture2.Left = (HScroll1.Value * -1)
End Sub

Private Sub VScroll1_Change()
Picture2.Top = (VScroll1.Value * -1)
End Sub

Now, the above was designed on a vista home machine and for the most part should look good on any system but if it does not then you may have to calculate the forms borders by subtracting width/height - scalewidth/scaleheight...

Also, you will need to do different calculations for your horizontal scrollbar depending upon the width of the picture box you eventually use.

And …

vb5prgrmr 143 Posting Virtuoso

See... http://support.microsoft.com/kb/231847 and http://support.microsoft.com/kb/28150/EN-US/ although this is a bit out of date... and this is probably a bit too indepth on math functions for you but here it is anyways... http://support.microsoft.com/kb/196652

and it should be ByRef card() if you want to pass the contents of an array as you cannot pass an array byval. Or it should be ByVal card if you only want to pass one element of an array (Call MySub(MyArray(1)))...


Good Luck

vb5prgrmr 143 Posting Virtuoso

So then your windowstate property is set to vbmaximized... Use the picture box with the scroll bar(s) outside of the pic box and you should be fine...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Yes, that is the expected output of the listbox when sorted is set to true. Now, there are a couple of ways in which to get around that...

One is to do the sorting yourself and with a search for vb6 sorting routines with your friends (yahoo, google, ask, answers, bing) you should be able to find some code out there like this most excellent tutorial... http://www.vbforums.com/showthread.php?t=473677 This of course is with the sorted property set to false.

The other way is to make all your strings the same length by using the format function... Format(Text1.Text, "0000")...

Good Luck

vb5prgrmr 143 Posting Virtuoso

You will need to set the picture boxes scalemode to vbpixels. Then using the currentx/y properties, you can then print the text to the graphic using the left/top property of the textbox as a guide for the currentx/y properties. You might also want to use the me.textwidth just in case your textbox is multiline but no carrage returns are entered.

After that, the save picture function will only save the graphic as a bitmap,... but there is code out there that will convert a bmp file to a jpeg file or there is code out there that will take the current picture displayed and save it as a jpeg file. Alls you need to do is to use your friends (yahoo, google, ask, answers, bing) to search for something like... vb6 save as jpeg, vb6 convert bmp jpeg, and so on...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Are you sure you are using Visual Basic 6.0? I'm almost ready to say that you need to be in the VB.NET forum and if you are using VB.NET, well then you will need to PM a mod to have your thread moved...

Good Luck

vb5prgrmr 143 Posting Virtuoso

And what does that proceedure look like? Also, the randomize statement should only be called once in the lifetime of a program, which means you should move it to your startup object, either sub main or form load.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Hmmm... You might have problems with that... see http://en.wikipedia.org/wiki/Symbian_OS and the subsection Developing on Symbian OS

Good Luck

vb5prgrmr 143 Posting Virtuoso

Besides Walt's advice, it sounds like you want to make your form scrollable via the use of a horizontal scrollbar. The easiest thing to do, would be to put all your controls into a picture box except the scrollbar. Then you could use the change event of the scrollbar to change the left value of the picture box instead of having to enumerate through each control and changing its left property. Of course, during design time a picture box also makes it easer to design the off screen area of the contents of the picture box as you can just drag it around... Now, if you don't like the sunken effect of the picture box, you can change its appearance property to flat, but if you do that, you will need to also change it backcolor property back to buttonface.

Good Luck

vb5prgrmr 143 Posting Virtuoso

See my other post over at vbforums...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Keep reading that tutorial and now that you know the keywords it should make it easy for you with your friends (yahoo, google, ask, answers, bing).


Good Luck

vb5prgrmr 143 Posting Virtuoso

See third code segment in second post of this tutorial... http://www.vbforums.com/showthread.php?t=384076

Good Luck

betabasic commented: very nice :D +1
vb5prgrmr 143 Posting Virtuoso

hmmm... well it seems you are right as I can no longer find what I thought I saw so long ago... Sounds like it would be a great project to undertake if you are willing to do so...

but have you tried ... http://search.yahoo.com/search;_ylt=A0oGk71T639L.4EAhCVXNyoA?fr2=sg-gac&sado=1&p=vb%20form%20extractor&fr=yfp-t-701-s&pqstr=vb%20form%20ex&gprid=cK4_gv0nT_CbLE51DKNPpA&sac=1&sao=1

and that is all I will say on this subject as I know realize what you are doing and I'm not so sure it is legal.

Good Luck

vb5prgrmr 143 Posting Virtuoso

If you click on the Go Advanced button you will come to a more advanced input box. On it there will be a (code) button. Click it and you will see that it creates this for you (without the spaces) ( code)( /code). Now, all you need to do is to paste your code between these two )( brackets and you will be fine... (on the other hand you can paste your code and then highlight it and then press the button)...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Is UAC enabled? Turn it off. Did you right click and run as admin? No, then do so. If still have problems then use Inno or windows installer 1.1 of which you can find a link to it at webarchive in my #6 post in this thread http://www.daniweb.com/forums/thread214396.html

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

badanaprasd,

It is not nice to attempt to hijack someone elses thread as you are attempting to do by asking your question in this thread. In the future, if you have a similar question to a previous thread then please create your own thread and if need be, copy the url of the previous thread into your posting.

As for your question, read my previous post...

Good Luck

vb5prgrmr 143 Posting Virtuoso

While in the IDE, when that error comes up, press CTRL+Break. If you are in a error handler, type in resume next as the next line in the error handler (don't forget to remove it when your done debugging) and then press F8 twice. This should bring you to the line after the line that caused the error. So we will need to see at least this portion of code. Now, if you do not have an error handler, then it should end up highlighting the line that caused this error and once again, we will need to see this code as this error is so ambigious, it is hard to tell what caused this error.

Good Luck

vb5prgrmr 143 Posting Virtuoso

No, and you are not saving the contents of each line into a variable so you can then later write out the corrected file. Presently you are doing nothing but reading the file and not even closing it, but beyond that, you logic is sound so far...


Good Luck

vb5prgrmr 143 Posting Virtuoso

I'm betting if you use your friends (yahoo, google, ask, answers, bing) and search for convert delphi to vb, you will find a couple of converters out there...

Good Luck

vb5prgrmr 143 Posting Virtuoso

It is so easy to create one yourself with a form, why are you looking for someone's elses code?


Good Luck

vb5prgrmr 143 Posting Virtuoso

Go over to adobe.com and download their pdf print driver. Then search with your friends (yahoo, google, ask, answers, bing) for vb6 webbrowswer.exec or vb6 printing webbrowser...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, so you are saying that you went to access and created a query, saved it (from within access) and now in VB, it is not showing up. Have you tried closing VB and reopening the project? It just may be a quirk with VB...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Here are some seach terms for you and some ideas... There are the api's sndPlaySound and PlaySound and then of course there is the MMC, which is otherwise known as Microsoft Music Control (which can also play AVI's). So use your friends (yahoo, google, ask, answers, bing) to search for examples on these and then if you have any problems with the code, then come back and post the relavent code, the line you are recieving your error on, the error number and error message.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Being that you can automate visio from visual basic, there should be no need to expose your code inside of a visio document... but with that said, you should have a look over at PSC (Planet-source-code.com) and give a search for the type of diagrams you want to create as several programs over there recreate some of visio's functionality...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Just so you and others know, this is not a place where you can request code. These forums are for recieving help on the code that you are having problems with... Now run along over to http://www.rentacoder.com or http://www.odesk.com and post your request up for bid and hope that you can get what you want for a decent price...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Time to use your friends (yahoo, google, ask, answers, bing) and search for vb6 convert mp3 or vb6 mp3 converter or vb6 wav converter or,... well you get the idea. Don't forget to search PSC (Planet-source-code.com) and if you really want to get down to the nuts and bolts, search mp3 over at http://www.wotsit.org

Good Luck

vb5prgrmr 143 Posting Virtuoso

Oh what is that (this is from memory...), something like SB.Panels(0).Caption/Text = FormName.Caption...

Best bet is to read all about the properties in the help files...

Good Luck

vb5prgrmr 143 Posting Virtuoso

As pointed out DOM is one way but you can also use a reference to one of the XML v?.0 objects under project references...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Yes it is possible to do such a thing and as debsasisdas says you will need to write some extra code... see these examples... http://www.vbaccelerator.com/home/VB/Code/Libraries/Writing_CDs/index.asp

Good Luck

vb5prgrmr 143 Posting Virtuoso

Via ADO and using the command object to execute the appropriate commands with the appropriate parameters. So I suggest you do some reading and if need be use your friends (yahoo, google, ask, answers, bing) to search for tutorials like vb6 ado tutorial...

Good Luck

vb5prgrmr 143 Posting Virtuoso

How about I tell you how to figure it out yourself. First place one on your form and when it is selected, press F1 and read all about it and its properties like min, max, value, smallchange, and largechange...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Download adobe's print driver... http://www.adobe.com/products/printerdrivers/ and print directly to it just as you would with any printer. Formatted text??? Create a RTF file, save to disk, shellexecute with the "print" verb...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well why do you need an array? You can use the recordset as your array. So far I only see a need for seven variables and even these for your subtotals can be replaced with the recordset by letting the db do it for you...

strSQL = "SELECT SUM(field1) AS TOT1, SUM(field2) AS TOT2, ... TOT7

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, first, in tools>options make sure require variable declarations is checked>ok. Then, at the top of each code module put option explicit as the very first line. Next, save and then press F8 to see if any errors are brought to your attention. Take care of those errors and add error handling to everything!!! And no that does not mean adding on error resume next, it means adding actual error handlers even if it is just as simple as I do with a msgbox "ProcedureName " & err.number & ":" & err.description. Then you will know where your errors are, what they are, and can figure out, with or without our help, how to fix them.

Good Luck

vb5prgrmr 143 Posting Virtuoso
If Rs.BOF = True And Rs.EOF = True Then
  'do something and exit sub
Else
  MsgBox "Exists!"
End If

Of course you are always going to get the msgbox that tells you your information exists. A recordset cannot be both BOF AND EOF at the same time even if there are no records...

You should do something like...

If Rs.RecordCount <> 0 And Rs.BOF = False And Rs.EOF = False Then
  'Record Exists
Else
  'No Record
End If

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well how can we help you with your syntax error if you do not post the relavent code???????

Use the AddItem method...

Good Luck

vb5prgrmr 143 Posting Virtuoso

On which line does it crash? I don't see where you check for EOF to set your loop flag to true. Make your loop do while not rs.eof and that should solve your problems.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Did you not read what I wrote??? If you can print it to the form, you can print it to the printer. How about the part of looking on the CD for CR???

Time to use your friends (yahoo, google, ask, answers, bing) to search as you can download version 8, 8.5, 9, 11, ... and other CR Products...

vb5prgrmr 143 Posting Virtuoso

Probably the reason you cannot find Crystal Reports is because your are spelling it incorrectly. Now, certain versions of VB6.0 came with Crystal reports 4.5 but you have to install it seperately. Look on your VB CD for a folder called Crystal and if you have it, install it. You can also find CR8.0 on the net but it is not free.

This however is not your only choice. As you have stated you can use Me.Print "MyString" or you could use a text box (Text1.Text = Text1.Text & MyString & vbNewLine) with its multiline property set to true. Then there is the RTB (RichTextBox) and as noted above a data report.

Now, if you use the text box or RTB solution, you can do one of two things to print the results out to the computer. One is Printer.Print Text1.Text (RTB.Text) or you can save the results to a file and use ShellExecute with the "print" verb.

Good Luck

vb5prgrmr 143 Posting Virtuoso

And while you are reading... look up Now()...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Priti, you had better check your quotation marks on that as it will raise an error like it is... and you should see the earlier posting I was mentioning... and you should check which forum your are in...

vb5prgrmr 143 Posting Virtuoso

No QuickT, I meant what I typed because if you look up to an earlier posting you will see where someone type where = "fielddate = date"...

vb5prgrmr 143 Posting Virtuoso

Look into Printer.Print "MyString" followed by Printer.EndDoc. You may also want to look at the Printer.CurrentX and Y properties along with me.textwidth/height if you need to line up colums.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Walt, search my handle and Open and you will see more often than not my suggest is to read in help about the following

FreeFile Function
Open Statement
Input Function or Line Input Function
Print Statement 'for writing out
Close Statement

But some days when I'm feeling charitable or when the OP has put forth the effort like this one has, you will see an answer like the above...


Have a nice day

WaltP commented: I can live with that :o) +9
vb5prgrmr 143 Posting Virtuoso

Here is a site for you... http://www.shrinkwrapvb.com/ (scroll down a little bit)

Good Luck

vb5prgrmr 143 Posting Virtuoso

Download Inno and use it...

Good Luck

vb5prgrmr 143 Posting Virtuoso

To begin with, this is not a code snippet! It is a question!

Option Explicit
'...
Private Sub ReadFileUpdateCombo()
Dim FName As String, FNumb As Integer
Dim LineContents As String

FName = "PathToFileandName"
FNumb = FreeFile

Open FName For Input As #FNumb
Do While Not EOF(FNumb)
  Line Input #FNumb, LineContents
  Combo1.AddItem LineContents
Loop

Close #FNumb
End Sub

Good Luck

vb5prgrmr 143 Posting Virtuoso

Windows Installer 1.1 is the same technology as the latest version and as such it is still viable and will work better than the PDW on Win7, it just does not have all the bells and whistles as the latest version. Also the latest version, as far as I know, does not know about VB6 and as such, you would need the SDK, which is in C++ and Windows Installer was made for visual studio as a replacement for the PDW...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Put the date in your calculations...

Good Luck