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

Remplace Worksheet Function

$
0
0
Hello VBForums
Hello every one
Please ..how to change the part that makes me the error in this code for rounded result to the Lower Ten in Text6 .. :
Code:

Private Sub Text5_Change()
Set f = WorksheetFunction
Me.Text6.Text = f.RoundDown(((Val(Replace(Me.Text1, ",", ".")) - (Val(Replace(Me.Text2, ",", ".")) + Val(Replace(Me.Text3, ",", ".")) + Val(Replace(Me.Text4, ",", ".")) + Val(Replace(Me.Text5, ",", ".")))) / 10) * 10, -1)
End Sub

For example :
Text6.Text = Text1.Text - (Text2.Text + Text3.Text + Text4.Text + Text5.Text)
87588.05 = 97816.10 - ( 05.50 + 1146.60 + 300 + 8775.95)
(87588.05) appears in Text6 as ( 87580 )
Thank you in advance for help me
Sincerely
MADA BLACK
Name:  3.png
Views: 57
Size:  15.6 KB
Attached Images
 

Checkers game to solve

$
0
0
Hello everyone, my name is David, and I have a dream that I would be able to resolve with you.

So: this program that I post the Link; https://app.box.com/s/t7www880dbdu33srdxrn0d10mngoquv3

and a program that I found on the Internet relating to the game of checkers.

I won't deny that I love from getting this game, that's why I'd love to be able to accomplish this.

I state in addition to the author of this project and can be found (not located anywhere) and its email I always rigorously in behind.

Here's why I ask you a strong help from your side. The problem and this: This game of checkers works fine, except for one Fact, namely, that: it was written using 20 X 20 Pieces per side; On a basis of 10 X 10 squares.

While we all know: the game of checkers, and structured to play with 12 X 12 pieces per side; on a basis of 8 x 8 Squares and use only the black boxes.

Now my problem is this: I will not deny it of trying again and again as you can, to attempt any changes necessary, but never succeed.

Let me explain: If I touch the settings relating to gaming Boxes, then from the 8 to 10; Nothing is. However if I try to reduce the quantity of Pieces, they are all out of phase; When I am okay; otherwise disappear from circulation.

For here I ask you self kindly you want to give me a hand to reduce everything, so you can play the traditional way with 12 checkers to part with a 8 X 8 Squares for a total of 64.

Thanks to all those who want to help me out in this project; Sincere greetings from a. Maurizio

signature search

$
0
0
i want search in anthor array
for example
dim a as string ,b () as byte
read one file into b
a="1234????5678??12"
search a in b, is find return offset .
who can have a good idea thanks
sorry my poor English$

[RESOLVED] commondialog path

$
0
0
Hello experts
I need to know how to set the default path of the commondialog a folder in the the application path.
I mean when I call it , it opens the folder "images" in the application repertory.
Code:

cd.InitDir = App.Path .......
I need the right syntax please.
Thanks

Creating New folders in directory

$
0
0
Could anybody please tell me how to create newfolders and new path in the directory during runtime ?

How to make .xap , .appx .appxbundle, .appxup file to upload to windows store on vb ?

$
0
0
How to make .xap , .appx .appxbundle, .appxup file to upload to windows store on vb ?

Graph32.ocx in windows 10

$
0
0
Hi,

I have VB6 running well in windows 10, (used danbrust.net VB installer). Having registered all the .ocx controls etc, everything else works except graph32.ocx - it appeared to register, but it doesn't seem to run in windows 10. I put its 2 support files in sywow64 directory with the ocx. Anybody have any ideas?

DataGrid filter with date

$
0
0
Hello, I need help. I have database wich contains name, payment and date. I have payments every day for the same name. I need to filter datagrid view to show me only one day specified from dtpicker.

[RESOLVED] DataGrid filter with date

$
0
0
Hello, I need help. I have database wich contains name, payment and date. I have payments every day for the same name. I need to filter datagrid view to show me only one day specified from dtpicker.

Update only one field in database please help

$
0
0
Hello i need help. I have a database with name, payment and date. I need to update only payments every day but old value of payments need to be stored every day. When i go to database to have for one name list of updates every day.

how to save pictures

$
0
0
Hello programmers
I have been googling for long hours searching for a solution for my case but in vain
I wish I could be clear enough to explain my worry.
On the form, there is a picturebox on which I"m doing some drawings. (A graph to display students' progress)
So each student should have his own graph picture stored in database.
Of course I know how to do that if a picture is loaded by the common dialog by means of filecopy function.

In my casz I am not using common dialog to load the picture because the picture is by default on the form. I mean on start up there is a picture of a graph.

Even I use common dialog to load the picture, this doesn't help because it is always the same picture. (picture of a graph)
My question is how could I save that picture in database?

Thank you all

How to call WinHttpRequest Send in a sequence

$
0
0
Hello again,

I am trying to connect to a domain and retrieve information using a web api.

Here it is necessary to execute the request to web api in a per defined sequence.

I am using following code snippet:
Code:

Private WithEvents http As WinHttpRequest

Set http = New WinHttpRequest
       
http.SetTimeouts 1000, 1000, 1000, 1000
http.Open "GET", sMyURL, True  'True means asynch.
http.Send

Once the first API is executed based on the data returned I need to make another call to another web api.

After the second call returns I need to analyze the data and make the third call to web api.

I tried to nest http and call one another from the OnResponseDataAvailable event but this is not working. The first call goes fine but the second call does not get called at all. Some times the second call gets executed then the third call does not executed.

Here is what I have done:
Code:

Private WithEvents http As WinHttpRequest
Private WithEvents http2 As WinHttpRequest
Private WithEvents http3 As WinHttpRequest

In the OnResponseDataAvailable event of http I am analyzing the data and then making the second web api call
Code:

For i = 1 To 10000
    DoEvents
    DoEvents
  Next i
 
  tt = http.ResponseText
 
  For i = 1 To 10000
    DoEvents
    DoEvents
  Next i
If tt = Chr$(34) & "ok" & Chr$(34) & "," & Chr$(34) & Chr$(34) & "," & Chr$(34) & Chr$(34) & "," & Chr$(34) & Chr$(34) & "," & Chr$(34) & Chr$(34) Then
    'Build new URL here
       
    'Update Info on Server
    sMyURL = sMyURL & "setinfo.php?deviceid=" & DeviceUniqueID & "&prodid=" & _
      ProdID & "&info1=" & MobileNum & "&info2=" & FirmwareNum & "&out=csv"
     
    Set http2 = New WinHttpRequest
       
    http2.SetTimeouts 1000, 1000, 1000, 1000
    http2.Open "GET", sMyURL, True  'True means asynch.
    http2.Send
  End If

And so on.

Is there any better way to achieve this?

TIA

Yogi Yang

ActiveX Exe problem

$
0
0
Hello all,

I am facing some issue on windows 7 with VB6 program. I have vb6 Activex Exe component register on machine but when I am running my calling program which calls that Activex Exe component very fist time it gives me the following dialog box every time.

"An Action cannot be completed because component is not responding choose switch to active the component and correct the problem"

once I called switch to it will show my activex Exe Component which has VB6 Form.

This happens only once but if I call that component second time it wont give me that switch to dialog box again. if I come out from the calling program completely than I again the same issue.

Please help

Thank you
Ajay

MSHFlexGrid not scrolling

$
0
0
In VB6 on WIN 7 Pro I cannot get the mouse wheel to scroll the grid. I can get scrolling to occur using the vertical scroll bar. How do I get the mouse wheel to work?

Thanks

Visual Basic Versions

$
0
0
I'm not sure about all of the different versions of Visual Basic and Visual Studio.

Do all of the versions of Visual Studio 97, 2002...2013, 2015, have some type/version of Visual Basic?

Connect to rdp - 3389 port

$
0
0
hi
if i want to connect into RDP (Remote Desktop Connection) - Port 3389

winsock.connect host,3389

and in dataArrival

winsock.getData

is it enough ?
i just want to see its connected or not

or i should use msrdp.ocx
Thanks.

[RESOLVED] Draw simultaneously on the same image in two different sized picturebox using vb6

$
0
0
Hi
I have a question and do not know how to start.
I have two Picturebox Controls. The first picturebox (320x240) is smaller than the second picturebox (800x600).
All the two Picturebox contain the same image scaled.
I need to draw on the first Picturebox and see the drawing appear even on the second Picturebox in the same position.

How can I do this?
Any suggestions will be appreciated.

[RESOLVED] Drawing on picturebox

$
0
0
Hello
I'm a beginner
I have a picturebox on my form on which I need to plot a multiplcation sign on mouse click event.
I want to create a cross or multiplication sign wherever I click on the picturebox.
I have some samples using the pset to create dots but I need multiplication dots
thanks in advance

Can't Find "ActiveX Control Interface Wizard"

$
0
0
OK, so I thought it was long overdue for familiarizing myself with building my own controls. So I read all I could within the library, searched VBForums and Googled a bunch.

Since I never attempted creating my own controls when I was using W98 or XP I couldn't comment whether the ActiveX Interface Control Wizard was visible in my VB IDE under those OS's. What I do know is on my W7 it exists in my VB directory in VB98/Template/UserCtls but I don't know how to access it. It doesn't like being accessed though Explorer.

I read that it should be listed in the Add-Ins panel but there's nothing in there except "ResEdi6.Connect" and I don't know what that is. I also read that I had to place a control on the UserControl pallet first. I though that maybe I'd receive a prompt asking me if I wanted to run the wizard... not!

So, what the heck am I doing wrong? I know it's something but I'm clueless.

Thanks,
Chris

VB crashes after FindClose() returns; but only if same dir

$
0
0
So this one is a little odd, I was setting up my search program to update results if a new file is created in the directories that were searched. It works fine if I copy a file to the target folder from another folder, but if I make a copy of a file in its same folder, VB crashes a few seconds after FindClose returns from the search matching function. Even though it occurs after that, it's just a hand off to a FileFound() routine, which if called while skipping the match routine doesn't result in a crash.

Code:

Edit: see simplified code in post #4
Viewing all 22051 articles
Browse latest View live


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