Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all 21189 articles
Browse latest View live

add newline to if same links

$
0
0
richtextbox1 has links like this

Code:

http://rapidgator.net/file/80207978/xxxxxhtml
http:rapidgator.net/file/80208016/f12.html
http:rapidgator.net/file/80208053/1.part3.rar.html
http://ultramegabit.com/file/details/2HL1Lgqe4Q
http:ultramegabit.com/file/details/Q_l3153cks4A
http:ultramegabit.com/file/details/6hYr36UIOQyk
http://ul.to/cpuxw37wk
http:ul.to/eksvpw4rk
http:ul.to/w9ap557gs


as u se unique domains shown on on richtextbox1

i want to add 2 vbnewline to these if unique links found


Code:

http://rapidgator.net/file/80207978/xxxxxhtml
http:rapidgator.net/file/80208016/f12.html
http:rapidgator.net/file/80208053/1.part3.rar.html


http://ultramegabit.com/file/details/2HL1Lgqe4Q
http:ultramegabit.com/file/details/Q_l3153cks4A
http:ultramegabit.com/file/details/6hYr36UIOQyk


http://ul.to/cpuxw37wk
http:ul.to/eksvpw4rk
http:ul.to/w9ap557gs

please help

Flipping Image Plus Text Labels Simultaneously?

$
0
0
If I were to reveal an answer in Family Feud and I wanted to flip the image plus the corresponding labels, what do I do?

What is the best method of coding for this flipping?

run time error 3421

$
0
0
I am using VB6 and I am getting a run-time error. I want to but a debug code @ the cm7 that tells me what the var is at the time. I know what the part number is that it gets the code. I am new to VB6 but I know vb enough to follow code but I am working in a code that someone else created.

Here is a piece of the code:
' If isSolution Then
' cm7("PART") = sdb2 (The error message happens here)
'Set sol_desc = cm7.Execute
'If Not sol_desc.EOF Then
' srvrOld = RTrim(sol_desc("DESCRIPTIO"))

and cm7 code:

'This command gets the description to display on the solutions page
Set cm7 = CreateObject("ADODB.Command")
cm7.ActiveConnection = SprovenConnection
cm7.CommandText = "select descriptio from SPLIST where PART_NUMBE = ?"
cm7.CommandType = 1
cm7.Prepared = True
cm7.Parameters.Append cm7.CreateParameter("PART", 129, 1, 25)
cm7.CommandTimeout = 1000

Msgbox with the good answer(work with file)

$
0
0
hi guys.I have to do a projekt for school.We have to do a quiz.We must take data from a file txt and I;ve got a problem.I've got 2 Option Buttons(Yes and No) and i need to make a msgbox with the correct answers.So when the Option index is the same with the number = correct answer.Can someone help me?I try everyhing,but nothing works.Here is the entire project to understand better.I've alread try some things but nothing works.You'll see there.I'm talking about Form4.
Attached Files

I need some help regarding in looping for scroll list :((

$
0
0
Hi Programmers, I have a problem regarding on how to display a multiple query values in scroll bar . Please look at the picture. Here is the scenario, :

The user is trying to search a book, but the user search only the keyword "Book" and he click the list view item "Title" and then he finally click the search.
Attachment 97935The system will query for the input in the database are all have title with "book'.Attachment 97939 How can i display all the books even if there are only two labels in the search result. The third result will be display after he clicks on the scroll bar. The first query will hide and the third query will be displayAttachment 97937.Response please :(
Attached Images
     

Converting code for new Engine change over i need help

$
0
0
Old Program Engine: Konfuze Edit ReRelease
New Prgram Engine: Eclipse Origins 2.3 Event system.(clean copy link of this source: Link )
Reason for not asking the engine fourm: they refuse to help people anymore there. and i know converting this isnt simple but if kept in same understanding code should work again.
What im asking help with changing: Converting the code tobe able to send its data to its server program server handle data todo what the orginal code is insteaded.
Did code work before having to convert it? Yes, this code works fine with the older packet system. reason im moving packet system i think it would lag the program more then it could handle.


Oks, The code was orginaly written back in 2004/2005. It does work with the orginal Engine. the engines are mmogame engines based off of Mirage Source.

The Code warps the player from map to map using inputs they used with the menu to look up the map # and x,y location in the Transfer.ini to move you to the new map.

the Orginal code needed tobe converted: LINK

There are a few Parts that i dont know if there stillworking or not. Since It can't be tested with out a packet..

The major problem that i know of is the packet needing tobe changed to the new packet system. the above link to the new engine source will give you more insight to the packets.

Examples of new packets:
<client side>
Example of packet<clientTCP>

Code:

Sub RandomPacket()
Dim Buffer As clsBuffer
' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler

Set Buffer = New clsBuffer
Buffer.WriteLong RandomPacket
SendData Buffer.ToArray()
Set Buffer = Nothing
' Error handler
Exit Sub
errorhandler:
HandleError "RandomPacket", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub

"randompacket is packet name info between it and senddata buffer.toarry() is the packeted info its sending(or so im told.. XD..)

<Server Side>

ModHandledata

Code:

HandleDataSub(CRandomPacket) = GetAddress(AddressOf HandleRandomPacket)
Code:

Sub HandleRandomPacket(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)

Dim buffer as clsBuffer

set buffer = New clsBuffer
buffer.writebytes data()

MsgBox ("Random packet received")

set buffer = nothing

End sub

I hope some could help me with converting this to work in the Eclipse Orgins source.
if you have any questions that you need answered to help with converting or need to see it working on the source please tell me.

Thanks for reading ,

password protect an image file

$
0
0
Is there a way to password protect a jpg file directly to the jpg file?

Like when the jpg file is open, you will need to supply a password to successfully open it.

It sound like its not a vb6 issue but what I would like to achieve here it to extract the image file from the database and automatically password protect it.

Is there a way to do this or what other way to do this?

[RESOLVED] password protect a file

$
0
0
Is there a way to password protect a jpg file directly to the jpg file like when you open the jpg file it will ask for a password?

If this cannot be done, what is the other way to protect this jpg file?

It sound like not related to visual basic but later I am trying to automate the password protect this jpg file like
I will extract the image file from database, and password protect it programatically. That would be the steps.

convert jpeg to pdf.

$
0
0
Do we have a code here for converting jpeg to pdf ?

Open several files using Command

$
0
0
Goodmorning :)

I have built a program of which I wish only one instance opened at time. To do this, I used Mutex and related API calls:
Code:

Function Is2ndInstance() As Boolean
    Dim hMutex As Long

    hMutex = CreateMutex(ByVal 0&, 1, App.Title)
    If (Err.LastDllError = ERROR_ALREADY_EXISTS) Then
        Is2ndInstance = True
        ReleaseMutex hMutex
        CloseHandle hMutex
    End If
End Function

Private Sub Form_Load()
    If Is2ndInstance Then End
    If Command <> "" Then
      'Code to open file
    End If
End Sub

Now there's my problem...

I'm trying to give user the possibility to open files simply clicking on them and use the path stored into Command function to load them into my application. The first time user tries to open a file, it is successfully opened. But if he tries again, the Mutex doesn't allow and closes the second instance of the program without opening the file chosen.

What can I do to open all files into the same instance of my application (avoiding my program is opened twice or more) ? Moreover I succeeded to use Command only if I select what program I want to open the file with (using the Open As... option in the contex Menu). In fact, the double click on the file didn't make anything useful. Why?

Thank you all.
:wave:

Probably elementary collection question

$
0
0
I assume this should be an easy question to answer, but I'm not too experienced with classes so it's far from obvious to me.

What's wrong with the class code below, namely the Let x property? An error message warns that an object is required. After adding items to the collection, at a certain stage I want to modify one of them. How should I go about it?

Code:

Option Explicit
Private mcol As Collection

Private Sub Class_Initialize()
    Set mcol = New Collection
End Sub

Private Sub Class_Terminate()
    Set mcol = Nothing
End Sub

Public Property Get Count() As Integer
    Count = mcol.Count
End Property

Public Sub AddItem(ByRef x As Single)
    mcol.Add x
End Sub

Public Property Get x(ByRef index As Integer) As Single
    x = mcol.Item(index)
End Property

Public Property Let x(ByRef index As Integer, ByVal x As Single)
    mcol.Item(index) = x
End Property

after edit picture disappears

$
0
0
hello everyone
i have a small problem
i have a students recored with a photo
when i add the students then the photo is displayed
when i edit a student and change his date of birth or something else
when i hit the update button the picture disappears
tnx for the help

[RESOLVED] Global Arrays

$
0
0
Hi,
I'm doing my computing soursework for school and have come across one final problem which I though would be very simple to correct.
All I need to do is define 2 different arrays so that they are all global and accessable by all forms.
I have tried declairing them as a global variable ;

Dim Player(0 to 2) as string
Dim Score(0 to 2) as integer

This does not work as the array is only accessable to one form.
I have also tried;

Public Player(0 to 2) as string
Public Score(0 to 2) as integer

This returns an error saying arrays cannot be global.

Any help would be amazing! Thanks in advance. :)

how to: sms site in vb6

$
0
0
guys how to use internet controls in vb6.

I have seen a free sms website and I want to use it to send sms using application.

Can you give me example how to do this? thanks.

Method 'folder' of iovctl failed Runtime Error -1975336103

$
0
0
Hi everyone,

Long time reader (and I have been helped with many issues I've had). and first-time poster :)
I hope this is in the correct place (AFAIK it is). I fiddled with some Project References and unregistered a dll file (outlctlx.dll) and since then I keep getting this error when I load a form with a OVCTL (Outlook CView Control) in it. Whenever I try and manually add the folder or the Namespace I get a System Error. I have tried doing a system restore to well before I changed anything and still the same. I have tried installing the outctlx.dll and registering it (according to http://support.microsoft.com/kb/281618, but still nothing. I even tried uninstalling the component and reinstalling the component. AAAARGH, can anyone help me out?

Thanks in advance,

Craigba

converting from VB.NET to VB6

$
0
0
Hi Everyone -

I know this is a VB6 forum, however, my end result needs to be in VB6 and not VB.NET....

The code below is VB.NET, but I need my code transfered to VB6. Basically what I am doing is having a combobox that has a list of number (1-10) and when the user selects their desired number and clicks the button - it will take all the files in a folder and delete the number of characters of the file away.

Example:

thisisafilename.txt

and after they select, lets say 3, it will look like this:

sisafilename.txt

My code in VB.NET -

Code:

Try
            Dim astr() As String = Directory.GetFiles(TextBox1.Text)
            Dim numbercount = ComboBoxEx1.Text

            For Each s As String In astr
                Dim FileName As String = Path.GetFileNameWithoutExtension(s)
                FileName = Strings.Right(FileName, FileName.Length - numbercount)
                FileName &= "" & Path.GetExtension(s)
                Rename(s, Path.Combine(Path.GetDirectoryName(s), FileName))
            Next s
        Catch
            MessageBox.Show("You must first select a folder")
        End Try

Does anyone know how to do this in VB6?

Thanks in advanced

daveofgv

webbrowser html elements

$
0
0
Where can I see other information about webbrowser control html elements like wb.Document.All ?

Object Library not registered? what....

$
0
0
Every time I add a control I get a Object Library not registered, and it happens when I open some of my old projects form vb6.0, please help me Because I cant do anything. Thanks.

Get DVD drives status

$
0
0
anyone knows how to get the status of what is doing a DVD drive?

I needs to knows few things,

1) if there is inserted something (which media type: Empty, CD, DVD5, DVD9)
2) if it is RECORDING that media right now , or it isn't.

Preferring that the code didn't do waits if possible!.

clues? some code?

Draw a trapezium from a file with gdi+

$
0
0
hi

i've downloaded the project : [VB6] GDI+ Usage & Samples

what i'd like to do is similar to "PolygonBlt", but instead of a rectangle, i would like a trapezium

the sample project uses the function "GdipDrawImagePointsRectI" with the coordinates of 3 points to draw a rectangle
i would like to do this with 4 points to draw a trapezium
Viewing all 21189 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>