f



Poker Hand problem

Thaks for the info, but I just do not get the rational of how to load the
picture??
"put another picturebox on the form, load the card image, and in
the lblmark mousedown or click event, place:

     picboard.PaintPicture Picture1.Picture, lblmark(Index).Left,
lblmark(Index).Top
"

> Hi all,
> I was wondering if I could have some help with this program.  I have an
> array here that you click on a label that represents a card of a certain
> suit.  After you click on 5 it checks for a flush, strait, three of a
kind,
> 2 pair, pair, 4 of a kind, royal flush or full house.  I was wondering how
I
> would set it up so when you ckick on label a picture of a card would show
up
> instead of the "number one" I have now.   The array is four by 13.  Any
> ideas let me know.  Below is the code.
>
> Thanks,
> Kelsey
>
> Option Explicit
> Dim Player As Integer
> Dim Status(1 To 4, 1 To 13) As Integer
>
> Dim Flush As Boolean, Hstraight As Boolean, Straight As Boolean, Trips As
> Boolean
> Dim TwoPair As Boolean, Pair As Boolean, Fours As Boolean, StoreTrips As
> Integer
> Dim StorePair As Integer
>
>
>
> Private Sub CheckHand_Click()
> Call CheckFlush
> Call CheckStraight
> Call CheckHstraight
> Call CheckFours
> Call CheckTrips
> Call CheckPair
> Call CheckTwoPair
>
>     If Straight = True And Flush = True Then
>     MsgBox "You Have A straight Flush"
>     Exit Sub
>     End If
>
>     If Hstraight = True And Flush = True Then
>     MsgBox "You Have A Royal Flush"
>     Exit Sub
>     End If
>
>     If Straight = True Then
>     MsgBox " You Have A Straight"
>     Exit Sub
>     End If
>
>     If Flush = True Then
>     MsgBox "You have a Flush"
>     Exit Sub
>     End If
>
>     If Fours = True Then
>     MsgBox "You have four of a kind"
>     Exit Sub
>     End If
>
>     If Hstraight = True Then
>     MsgBox " You Have A Straight"
>     Exit Sub
>     End If
>
>     If Trips = True And Pair = True Then
>     MsgBox "You have a Full House"
>     Exit Sub
>     End If
>
>     If Trips = True Then
>     MsgBox "You have Three of a kind"
>     Exit Sub
>     End If
>
>     If TwoPair = True Then
>     MsgBox "You have Two Pair"
>     Exit Sub
>     End If
>
>     If Pair = True Then
>     MsgBox "You have A Pair"
>     Exit Sub
>     End If
>
>     MsgBox "You Have Nothing You Loser"
> End Sub
>
> Private Sub Form_Load()
>
> Dim X As Integer, Y As Integer, I As Integer
> Dim W As Single, H As Single
>
> W = picBoard.ScaleWidth / 13
> H = picBoard.ScaleHeight / 4
> lblMark(1).Move 0, 0, W, H
> For I = 2 To 52
>     Load lblMark(I)
>     Call ItoXY(I, X, Y)
>     lblMark(I).Move (Y - 1) * W, (X - 1) * H
>     lblMark(I).Visible = True
> Next I
> Player = 1
>
>
>
> End Sub
> Private Sub ItoXY(I As Integer, X As Integer, Y As Integer)
>     X = Int((I - 1) / 13) + 1
>     Y = (I - 1) Mod 13 + 1
>
> End Sub
> Private Function XYtoI(X As Integer, Y As Integer) As Integer
>     XYtoI = (X - 1) * 4 + Y
> End Function
> Private Sub lblMark_Click(Index As Integer)
> Dim X As Integer, Y As Integer
> Static CardCounter As Integer, n As Integer
> Call ItoXY(Index, X, Y)
> If Status(X, Y) Then
>     Beep
>     Exit Sub
> End If
> Status(X, Y) = Player
> CardCounter = CardCounter + 1
> If CardCounter = 5 Then
>     CheckHand.Visible = True
> End If
> If CardCounter = 6 Then
>     MsgBox ("Only 5 Cards in a Poker Hand")
>     For n = 1 To 52
>     lblMark(n).Enabled = False
>     Next n
>    Exit Sub
> End If
>
> Select Case Player
>
> Case 1
>     lblMark(Index).Caption = "1"
>
> End Select
>
> End Sub
>
>
>
> Private Sub CheckFlush()
> Dim FlushCounter As Integer, Suit As Integer, Denom As Integer
> For Suit = 1 To 4
>     For Denom = 1 To 13
>         If Status(Suit, Denom) = 1 Then
>             FlushCounter = FlushCounter + 1
>         End If
>     Next Denom
>         If FlushCounter = 5 Then
>         Flush = True
>         Exit Sub
>         Else
>         FlushCounter = 0
>         End If
> Next Suit
>
>
> End Sub
>
> Private Sub CheckStraight()
> Dim StraightCounter As Integer, LowDenom As Integer, Suit As Integer,
Denom
> As Integer
> Dim HiDenom As Integer
> For Denom = 13 To 1 Step -1
>     For Suit = 1 To 4
>         If Status(Suit, Denom) = 1 Then
>             LowDenom = Denom
>         End If
>     Next Suit
> Next Denom
> Straight = True
> HiDenom = LowDenom + 5
> If LowDenom < 10 Then
>     Do While Straight = True And LowDenom < HiDenom
>         If Status(1, LowDenom) = 1 Or Status(2, LowDenom) = 1 _
>         Or Status(3, LowDenom) = 1 Or Status(4, LowDenom) = 1 Then
>             LowDenom = LowDenom + 1
>         Else
>             Straight = False
>         End If
>     Loop
> End If
>
> End Sub
>
>
> Private Sub CheckHstraight()
> Dim HstraightCounter As Integer, LowDenom As Integer, Suit As Integer,
Denom
> As Integer
> Dim HiDenom As Integer
> HstraightCounter = 10
> If Status(1, 1) = 1 Or Status(2, 1) = 1 Or Status(3, 1) = 1 Or Status(4,
1)
> = 1 Then
>     Hstraight = True
>     Do While Hstraight = True And HstraightCounter < 14
>         If Status(1, HstraightCounter) = 1 Or Status(2, HstraightCounter)
=
> 1 Or _
>         Status(3, HstraightCounter) = 1 Or Status(4, HstraightCounter) = 1
> Then
>             HstraightCounter = HstraightCounter + 1
>         Else
>             Hstraight = False
>             Exit Sub
>         End If
>     Loop
> End If
>
>
> End Sub
>
> Private Sub CheckFours()
> Dim Denom As Integer
>
>
>     For Denom = 1 To 13
>         If Status(1, Denom) = 1 And Status(2, Denom) = 1 And Status(3,
> Denom) = 1 _
>         And Status(4, Denom) = 1 Then
>         Fours = True
>             Exit Sub
>         End If
>     Next Denom
> End Sub
>
> Private Sub CheckTrips()
> Dim Denom As Integer, Suit As Integer, TripsCounter As Integer
>     If Fours = True Then Exit Sub
>
>     For Denom = 1 To 13
>         For Suit = 1 To 4
>             If Status(Suit, Denom) = 1 Then
>                 TripsCounter = TripsCounter + 1
>             End If
>         Next Suit
>         If TripsCounter = 3 Then
>             Trips = True
>             StoreTrips = Denom
>             Exit Sub
>         Else
>             TripsCounter = 0
>         End If
>     Next Denom
>
>
> End Sub
>
> Private Sub CheckPair()
> Dim Denom As Integer, Suit As Integer, PairCounter As Integer
>     If Fours = True Then Exit Sub
>     For Denom = 1 To 13
>         For Suit = 1 To 4
>             If Status(Suit, Denom) = 1 Then
>                 PairCounter = PairCounter + 1
>             End If
>         Next Suit
>         If PairCounter = 2 Then
>             Pair = True
>             StorePair = Denom
>             Exit Sub
>         Else
>             PairCounter = 0
>         End If
>     Next Denom
>
> End Sub
>
> Private Sub CheckTwoPair()
> Dim Denom As Integer, Suit As Integer, PairCounter As Integer
>     If Pair = False Then Exit Sub
>     For Denom = 1 To 13
>         For Suit = 1 To 4
>             If Status(Suit, Denom) = 1 And Denom <> StorePair Then
>                 PairCounter = PairCounter + 1
>             End If
>         Next Suit
>         If PairCounter = 2 Then
>             TwoPair = True
>             Exit Sub
>         Else
>             PairCounter = 0
>         End If
>     Next Denom
> End Sub
>
>


0
RSaddler (19)
11/8/2003 11:20:44 PM
comp.lang.basic.visual.misc 10153 articles. 0 followers. Post Follow

2 Replies
397 Views

Similar Articles

[PageSpeed] 13

Hi Randi

I have already written a complete Poker program. It is not really well
written as all of the variables are global, but it may give you some ideas.
If you want me to email it to you, please email as request to me at
TrevorRoy@bigpond.com so I can reply and attach the files.

Trevor.


0
trevr621 (12)
11/9/2003 12:06:54 PM
What you need to do is to use the LoadPicture function.
PictureBoxA.Picture = LoadPicture("C:\Foo\Bar.bmp")
Then you need to paint it to a different picturebox.
PictureBoxB.PaintPicture PictureBoxB.Picture, 0, 0

Samir Talwar

"Randi" <RSaddler@stny.rr.com> wrote in message news:<gTerb.76802$ZC4.49388@twister.nyroc.rr.com>...
> Thaks for the info, but I just do not get the rational of how to load the
> picture??
> "put another picturebox on the form, load the card image, and in
> the lblmark mousedown or click event, place:
> 
>      picboard.PaintPicture Picture1.Picture, lblmark(Index).Left,
> lblmark(Index).Top
> "
0
11/9/2003 9:53:57 PM
Reply:

Similar Artilces:

Problem with Visual Basic
have small one worries to open a file m-lines since visual BASIC 6.0. I use the instuction shell with the following synthaxe: Shell "C:\Program files\Matlab\Matlab.exe E:\Work\Simulation\Project.m" in program VB6.0, but the file does not open, and I am made to write this so that this works better: Shell "C:\Program files\Matlab\Matlab.exe" Shell "C:\Program files\Matlab\meditor.exe E:\Work\Simulation\Project.m" But when I use these instructions Matlab open and plan opens with the editeur of text, it is therefore impossible to me to execute project with the Ma...

Visual Basic Problem
If you have VB Problem or big MS related project contact me for help with outsourcing the development. We have facility in Vietnam. ITSofts.com The Outsourcing Expert ITSoft wrote: > We have facility in Vietnam. > And is that the Visual Basic Problem you are refering to in your title? ...

visual basic problem
I have code that exports data to excel and formats it. I originally put it into the on click method; however, it has not gotten too large. I want to split it out into different modules; however, I am not sure how to start formatting an open excel file. What I have done is export the data, open the file and then do some initial formatting. The next "function"? would be to do more formatting on the open excel file. Is there a way to do this? It seems like I need to re-declare the excel file somehow. Thanks for any help you can give. Apgoodb, Oh my, yes. If you create an instance of Excel in your VBA code that then opens the worksheet for you there is a huge amount of stuff you can do. <apgoodb@yahoo.com> wrote in message news:1111681783.193010.31080@f14g2000cwb.googlegroups.com... >I have code that exports data to excel and formats it. I originally > put it into the on click method; however, it has not gotten too large. > I want to split it out into different modules; however, I am not sure > how to start formatting an open excel file. What I have done is export > the data, open the file and then do some initial formatting. The next > "function"? would be to do more formatting on the open excel file. Is > there a way to do this? It seems like I need to re-declare the excel > file somehow. > Thanks for any help you can give. > Also, here is some of the code that I have: on click event: Dim strSpreadsheet...

Visual basic subtraction problem
Hi folks, While working on VB , recently I have faced a decimal sutraction problem as mentioned below. For example : Current VB problem 2.15 - 2.10 = 4.999999999999999E-02? Where as result should have been 2.15 - 2.10 = 0.05 OR Current VB problem 0.96 - 0.92 = 0.0399999999999999. In this case also the result should have been = 0.04 This problem is greatly exasperated in cases were lots of data is being processed. If anybody has a solution to this problem. Please respond. thanks in advance. regards anant Anant wrote: > Hi folks, > > While working on VB , recently I have faced a decimal sutraction > problem as mentioned below. > > > For example : > > Current VB problem > 2.15 - 2.10 = 4.999999999999999E-02? > > Where as result should have been 2.15 - 2.10 = 0.05 > > OR > Current VB problem > > 0.96 - 0.92 = 0.0399999999999999. > > In this case also the result should have been = 0.04 > > > This problem is greatly exasperated in cases were lots of data is > being processed. > > If anybody has a solution to this problem. Please respond. > > > thanks in advance. > > regards > anant vb commonly introduces small rounding errors (1E-15) when using floating point numbers. the result you get is the best you can expect from vb. maybe you can round the result from a substraction to the number of digits you desire and can trust. grtz martin! On 21 Jul ...

I have do while loop problem in Visual Basic
Hi I am having a problem with Do while loop with my logic. Here is my scenario, I have a text file reads below John Doe, 1234, programmer, 312-333-3333, xxxxx, xxxxx, xxxx Mary, Ann, 3456, secretary, 312-234-4567,xxxxx, xxxxx, xxxx my program compile the first three column into an account ID and then put account ID search in the Active directory, if account ID is found, then I want to update that account ID's attributes such as telephone number, etc... if no account ID is found, exit and keeping looking for the next account ID. I get problem in the last part, so far, once in the looping, my code can only recognize the last line in this case, I can only update Mary Ann's account, but it skip the John Doe's stuff. Can anyone help me out, I have been fixing this code for while, thanks in advance, below is my code Const ForReading = 1 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile _ ("c:\Deploy08022005\sap_flat.txt", ForReading) Do Until objTextFile.AtEndOfStream strNextLine = objTextFile.ReadLine arrServiceList = Split(strNextLine, ",") strFirstName = Trim(arrServiceList(0)) 'msgbox strFirstname strMiddleName = Trim(arrServiceList(1)) 'msgbox strMiddlename strLastName = Trim(arrServiceList(2)) 'msgbox strLastname ssn = Trim(arrServiceList(3)) 'msgbox ssn FirstName = Left(strFirstName, 1) LastName = Left(strLastName, 7) strAccoun...

problem with dll in visual basic
Hello, I'm using a dll created with comtool in a Visual Basic application and when i try to run it I get the following error from VB: ---------------------- -2147024769 (8007007f) Automation error ------------------- I've searched over the net, and found that the you get this error if the dll is not properly registered in the system. I've tried to manually register the dll with regsvr32 command and get the following message: Loadlibrary("c:\temp\sqq.dll") failed - The specified procedure could not be found. where sqq.dll is the dll I get from comtool. By the way, I...

Visual Basic 6 Problem
Does anyone know how to create an ActiveX EXE Server that raises events which can be captured by muliple clients? So, I have two applications that are both clients. I need to pass data via the activex exe from one application to the other. The messages will be "captured" as in the event handler, the code will check one of the paramaters that contains a simple string that represents the recipients "address" (these strings could be just "App1" and "App2". I've tried to do this but it only raises the event in the application that is sending the message. I need the event to be raised in both applications. I have the ActiveX EXE properties set to "MultiUse" and using a Thread Pool of 1. Any help or advice would be very welcome as this is really causing me some problems. Many thanks, Darren -- Darren Brook email: darrenbrook@btconnect.com Because of the troubles with "built-in" events, I switched to using java-style events: The server defines an interface that standardizes the sending and/or receiving of the messages. The clients then have objects that implement that interface, which are handed to the server. The server now communicates through those objects. Best regards Darren Brook wrote: > Does anyone know how to create an ActiveX EXE Server that raises events > which can be captured by muliple clients? > > So, I have two applications that are both clients. I need to pass data...

Visual Objects compared to Visual Basic and Visual C.
Who can explain me why I have to use VO instead of VB or VC? OR is is there no difference? With kind regards Rob van der Ploeg Rob, Every language has his (dis)advantages. The ones you mention are all wrappers around the Win32 API. VO is a very nice and easy language compared to VC. Data-access is famous with VO, but also memorymanagement, the cargage collector, ragged array's. and the result is fast and reliable code. You do not have to declare every variable if you do not want to. (but you will) Comparing to VB is VO a real OOP langangue where VB is not. You can write your own classes, inherit classes from VO classes or from your own classes, Overide methods, use both strong and loose typed variables, write early and late bound code VO comes with a SDK containing the sourcecode of the part of VO written in VO (almost everything except f.i. the compiler) With VO you get this newsgroup, where almost every question is answered within hours. VO has a prof. usergroup in the netherlands, check www.sdgn.nl. with very often very well organised conferences. I think it is the best organised usergroup in the world. VO is limitted to the Win32 api. A .NET version is announced, but withoot a releasedate yet. More inforrmation about VO can be found at www.cavo.com regards, Erik "Mobi-Data Helpdesk" <info@direcom.nl> schreef in bericht news:1070360435.358105@tbird.introweb.nl... > Who can explain me why I have to use...

Visual Basic V6 ADODC Problems
Im creating the front end for a database created using microsoft Access. I have set up the connection strings and record sources for everything but the information will not show up in the text boxes when the programe is run. The error is: "run-time error '91': Object cariable or With block Variable not set" I have checked and everything is spelt correctly the same programe works on my computer at college but not at my home. All the relevant information has been changed for the location of the database. Can anybody help me out please? Thanks Nick Don't know if this will help but according to MSDN: ] When you attempt to access the Recordset object of an ADO ] DataControl whose Connection and RecordSource properties have ] been set, the following error message results when the ADO ] DataControl does not have any controls bound to it: ] ] Run-time error '91': Object variable or With block variable not ] set ] ] CAUSE ] The Connection and Recordset objects of the ADO DataControl do ] not get implicitly initialized unless the DataControl is bound ] to a control on the form that contains it. ] ] RESOLUTION ] Bind the ADO DataControl to a control on the form before ] attempting to access its Recordset object. You can then set ] the visible property of the control to False if you do not want ] the control to be displayed at run time. ] ] Call the ADO DataControl's Refresh method prior to accessing ] its Recordset object if you do not wish to bin...

Another embedded visual basic problem
I downloaded eVB (from the MS website) onto my PC. I transferred the file (being a "cab" file) to my PPC using the explorer on activesync 3.8. But when I try to run the file from my PPC, I get the following message: "The file ... is not a valid windows CE Setup file". My PPC (the i-mate JAM) uses Windows Mobile 2003, Second Edition. What am I doing wrong? -- Message posted via http://www.pocketpcjunkies.com Hayden Scott via PocketPCJunkies.com wrote: > I downloaded eVB (from the MS website) onto my PC. I transferred the > file (being a "cab" f...

Setup.exe Visual Basic problem
Hello All i have created a app for AIM and WIN combined but the program will not run right unless u have a certain .ocx does anyone know how to make a setup file to where it will install the program and add that certain componet -- Frank R. Jr. Frank R. Jr. wrote: > Hello All i have created a app for AIM and WIN combined but the program will > not run right unless u have a certain .ocx does anyone know how to make a > setup file to where it will install the program and add that certain > componet > Look for the "Package & Deployment Wizard" in your visual basic program group... Jamie ok thank you but i have found a pretty neat program install-us it makes a install file and it was just what i needed "jamie" <jamie@noway.com> wrote in message news:AF_Xc.35256$DG.1913603@news20.bellglobal.com... > Frank R. Jr. wrote: > > Hello All i have created a app for AIM and WIN combined but the program will > > not run right unless u have a certain .ocx does anyone know how to make a > > setup file to where it will install the program and add that certain > > componet > > > > Look for the "Package & Deployment Wizard" in your visual basic program > group... > > Jamie ...

Visual Basic Multiselect and SelectedIndexChanged problem
Hi, I have a program with a ListView (with Multiselect) and am using the SelectedIndexChanged handler. However, when the index is changed, a rather long set of events occurs which takes quite some time. Therefore, if the user tries to multiselect several items (holding down Shift), it takes that many times longer. Is there a way to only invoke the SelectedIndexChanged method on the LAST multiselected item (not each and every one)?? That would speed up the process greatly. Thanks! Robert This sounds like a .net question as there is no SelectedIndexChanged event in VB. Theref...

Problem Closing Visual Basic Help Window
Hello everyone, I have office 2003 Professional, and I work in Access's Visual Basic Editor. Sometimes after opening the "Microsoft Visual Basic Help" window by standing on a function in the code and pressing F1, the help window refuses to close - I click the X but it does nothing, and I'm forced to go to the task manager and terminate the process msohelp.exe. Does anyone have any idea how to fix this problem? Thanks in advance, Gilad ...

Problems with MS Visual Basic 6.0
This is a multi-part message in MIME format. ------=_NextPart_000_014F_01C47E43.7EFBDB40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello ! I need to intreact from VB6 with an PG 7.4.3 database, I've psqlodbc-7_03_0= 200 installed. I use the Microsoft ADO Data Control 6.0, and I've installed the SP5 for VB= 6. When I use the adodc control I see the data but I've problems with : - Update, on existing records : do nothing, I've to MoveFirst to store in d= atabase ! Why ? - Edit Method don't exist for ...

GW BASIC to Visual Basic
I had done programnming in GW BASIC and Assembly 10 years back, when I was in school. Later, I learnt C,C++, Core Java and COBOL. Will my knowledge of BASIC hold me in good stead while learning Visual Basic? Is there a resemblance between the two? On 2 Mar 2005 21:11:59 -0800, "cat_dog_ass" <icon_iconoclast@hotmail.com> wrote: >I had done programnming in GW BASIC and Assembly 10 years back, when I >was in school. Later, I learnt C,C++, Core Java and COBOL. Will my >knowledge of BASIC hold me in good stead while learning Visual Basic? >Is there a resemblance between the two? A resemblance? Well, sure, they both look like Microsoft BASIC. Will knowing the one help with the other? Actually, the differences between GWB and VB are so big that you'll be learning a totally new language that reminds you of one you already know. If you learn VB.Net you might find that it also reminds you of C++ and/or Java. -- auric underscore underscore at hotmail dot com ***** If at first you don't succeed, skydiving is not for you. "cat_dog_ass" <icon_iconoclast@hotmail.com> wrote in message news:1109826719.850575.113070@o13g2000cwo.googlegroups.com... > I had done programnming in GW BASIC and Assembly 10 years > back, when I was in school . . . will my knowledge of BASIC hold > me in good stead while learning Visual Basic? If you're talking about VB6 then then answer is Yes. Much of the syntax of the language is almost iden...

Visual Basic ASP Minor Math Problem :)
I have a tiny problem with the below auction script. Here's the jist of it: This is an auction for unrestricted hockey players. Owners of the current auction player can match the current bid, everyone else must exceed the current bid by at least 10% to bid on him. All owners may start the bidding off at the start bid though. So, as an example, with Domi and the leafs; Domi is starting at 300K Rangers(leafs too!) may start the bid at 300k Leafs can match at 300k Rangers may up the bid to 330K Leafs can match at 330K Rangers can up the bid to 363K. Leafs can match at 363K Rangers can up the bid to 399K This works for the most part, but **occasionally**, you have to increase your bid by 10% + one cent/dollar. So, here is some examples of current bids and attempted bids. 300,000 => 330,000 Works and bid is made 330,000 => 363,000 Nope. Add a buck/penny and it works(ie, 363,000.01). 500,000 => 550,000 Works and bid is made 900,000 => 990,000 Nope. Add a buck/penny and it works. So, my question, is does anyone know why i have to sometimes add a cent to this? I'm tempted to think it has to do with ibidplaced being a different datatype then ibidplaced but who knows. Here are the important bits of the code ---------------------------------------- '* Get Bid From Form iBidPlaced = FVal(Request.Form("Bid")) '* get the most current bid from the database If FVal(bidRS.Fields("aucCurrentBid")) > 0 Then '* bidders must exc...

Visual Basic: Reading Text File Problem
Hi, I'm in need of some ideas or help. Here's what's up. I've got a text file with three columns (separated by commas) with data. eg: ColumnA ColumnB ColumnC 553456 1 7 123456 1 7 123456 1 5 123456 1 2 857456 1 1 I can read this in fine, but what I want to achieve is output this to another text file (instantaneously if possible) like: ColumnA ColumnB ColumnC 553456 1 7 123456 3 14 857456 1 1 so where column A has the same number as the previous or the next line then they need to be grouped and totaled up. I would rather have it so it reads in the file and outputs the file rather than entering the info into an array etc. Thanks "Syed" <lepon@lineone.net> wrote in message <news:131d1097.0311261358.3e9ae399@posting.google.com>... > I've got a text file with three columns (separated by commas) with > data. > > eg: > > ColumnA ColumnB ColumnC > 553456 1 7 > 123456 1 7 > 123456 1 5 > 123456 1 2 > 857456 1 1 > > I can read this in fine, but what I want to achieve is output this to > another text file (instantaneously if possible) like: > > ColumnA ColumnB ColumnC > 553456 1 7 > 123456 3 14 > 857456 1 1 > > so where column A has the same numb...

wscript.arguments problem in visual basic 6
Hello, I want to make an .exe file that takes arguments. If I create a .vbs file as below, it's ok. Set objArgs = WScript.Arguments For I = 0 to objArgs.Count - 1 WScript.Echo objArgs(I) Next But when I try the same work in visual basic it doesn't work. I take the error message of "Run-time error 429, ActiveX component can't create object" to the code Set arg = CreateObject("wscript.arguments"). How can I accomplish this work with visual basic 6. I want to run the ..exe file from the command prompt with arguments. Thanks vbsprobsol There's no connection between VB and WScript. (Also, WScript.Arguments is not an object, it's a property.) What you want is Command. In Sub Main or Form Load, depending upon which starts your program, put: s = Command$ s will then be your command line. -- _____________________________ mayayXXana1a@mindYYspring.com For return email remove XX and YY. _____________________________ erman <ermanu@hotmail.com> wrote in message news:231e745f.0501120553.5ea0de5e@posting.google.com... > Hello, > > I want to make an .exe file that takes arguments. If I create a .vbs > file as below, it's ok. > > Set objArgs = WScript.Arguments > For I = 0 to objArgs.Count - 1 > WScript.Echo objArgs(I) > Next > > But when I try the same work in visual basic it doesn't work. I take > the error message of "Run-time error 429, ActiveX component can't > create ob...

Menu Editor problem, Visual Basic 6.0
Hi all, I have a problem with the Menu Editor of Visual Basic 6.0.. First I'm not a expert with Visual Basic , thus maybe it is easy to solve.. When I want to make a menu with the Menu Editor, and I insert some items, I get the following message: * Menu control array element must have an index.. When I give it a number the the Sub menu items gives the following message� * Menu control array elements must be contiguous and within the same submenu. What do I wrong?? grz Ronald wrote: > Hi all, > > I have a problem with the Menu Editor of Visual Basic 6.0.. > > First I'm not a expert with Visual Basic , thus maybe it is easy to solve.. > > When I want to make a menu with the Menu Editor, and I insert some items, I > get the following message: > > * Menu control array element must have an index.. You specified the same name for two or more menu entries but you didn't fill in Index values; you can create a menu control array by using the same name for multiple entries but when you do that you have to assign a unique Index number to each of them. > When I give it a number the the Sub menu items gives the following message=B1 > * Menu control array elements must be contiguous and within the same > submenu. When you do create a control array they all have to be next to each other at the same level. ...

Problem Loading any Visual Basic 6 Created program.
Ive briefly googled and researched this to find no one having much problems. I currently have a decent knowledge of wine itself playign WoW, war3 etc on it. Having minor issues trying to load visual basic 6 applications some with and somewithout included ocx files in there dir. Any Help or direction on this issue is appreciated. Did you make sure the file msvbvm60.dll is installed? If not you may need to copy it to ~/.wine/drive_c/windows/system32/. On Dec 28, 1:16 am, Hac...@gmail.com wrote: > Ive briefly googled and researched this to find no one having much > problems. I c...

Visual Basic 4 code import problem... #2
Hi, I hope that you can help me wit this one please and apologies if i'm in the wrong forum! I recently bought a book that contaiend a CD-ROM of very useful Visual Basic algoritms. Now these algoritms are written in visual basic 4 I'm having difficulty importing the projects into Visual Studio .NET. I get an error message stating: "The Visual Basic 6.0 project file is corrupted or cannot be read". Can anyone tell me what I should do to make these work. Can you recommend any good, free visual basic 4 editors that I can downlaod and install. Should I be aware of anything else (I'm new to the VB universe). Thanks in advance for any suggestions/advice/recommendations etc... Cheers, Al. The newbie. ...

sequence number problem in visual basic 6.0
hello everybody i am developing a billing software for a tollgate collection system. i am using vb6.0 and ms access2000 as back end. the access has a table called tblbill which contains flds like billno, billdttime (in yyyyMMddhh.mm format ) vehicle number, valid dttime , transport code, trips, amount and user. the transport code is like 'BMS' means Bus[From][To] and follows like 'CMS' for car and 'LMS' for light vehicles. the bill number is like 'BMS10000000001' where BMS Is code and 1 is the gate 1 the rest is the number sequence starting from 1. each code has its own starting number like 'BMS10000000001','CMS10000000001','LMS10000000001'. i am also having a table called counter which is used to store the max value for each code, and will be updated whenever a bill is generated. from this table i used to create the billnumber. the problem here is sometimes the counter gets updated but the bill number is not generated so it creates a jump in the sequence i.e. i am having a bill number 3 the next should be 4 but it is displayed as 5. this is not happening often, it happens once or twice a day. as it deals with cash the jumping numbers cause a lot hell of confusion in the accounts. so i request your expertise to solve this problem asap. sorry for such a large posting. Thanks in advance hello members long long ago i posted a message(given below) and i found it to be not up to the standards of this group by assuming that...

Visual Basic 6 on Windows 2003 database problem
Hello all. I have some little programs, written in Visual Basic 6, that uses a DB2 Database with an ODBC Driver. The programs, have been working fine in a Windows NT machine, and I have also probe them in a Windows 2000 Professional, but when run in a Windows 2003 Server, they don=B4t work. The error that appears is: 'CLI0115E The cursor state is incorrect. SQLSTATE=3D24000' The error occurs in the second MsgBox line, when ejecuting the RecordCount method of the recorset. Could it be a matter of incompatibility of Visual Basic 6 with Windows 2003? Set cnObj =3D New ADODB.Connection cnObj.Open ("provider=3DIBMDADB2;dsn=3D" & strDNS & ";uid=3D" & strUser= & ";pwd=3D" & strPass & "") Set rsObj =3D New ADODB.Recordset rsObj.CursorLocation =3D adUseClient 'rsObj.CursorLocation =3D adUseServer strSQL =3D "SELECT DISTINCT CURRENT TIME AS HORA FROM " & strTabla & "=2EERP00_DATCTRL_NUM" rsObj.Open strSQL, cnObj, adOpenKeyset, adLockOptimistic, adCmdText MsgBox "primer msg: " & rsObj.RecordCount horaConsulta =3D Format(rsObj!HORA, "hh:mm") rsObj.Close strSQL =3D "SELECT * FROM " & strTabla & ".ERP00_DATCTRL_CAB WHERE SITAOPER=3D'01' " & _ "AND FEPETOPE>=3D'" & strFecha & "' ORDER BY FEPETOPE, HPETOPE"...

Visual Basic 8 (express) newbie: compile problem
nice simple one; how do you compile a program so that other people can use it in the same way as an exe. I know its a dotnet thing but am dead new and don't know how to do this simple thing(?) Thanks john Almost everybody in this newsgroup is using VB6 or lower. While you may get a stray answer to VB.NET questions here, you should ask them in newsgroups devoted exclusively to .NET programming. Look for newsgroups with either the word "dotnet" or "vsnet" in their name. For the microsoft news server, try these newsgroups... microsoft.public.dotnet.general microsoft.public.dotnet.languages.vb microsoft.public.vsnet.general There are some others, but these should get you started. Rick - MVP "John McGinty" <jpmcginty@talk21.com> wrote in message news:87642ea9.0409020620.36e58cdb@posting.google.com... > nice simple one; how do you compile a program so that other people can > use it in the same way as an exe. I know its a dotnet thing but am > dead new and don't know how to do this simple thing(?) > > Thanks > > john ...

Web resources about - Poker Hand problem - comp.lang.basic.visual.misc

Problem novel - Wikipedia, the free encyclopedia
Working class, or proletarian novels are often also social problem novels . This was in many ways a reaction to rapid industrialization , and ...

INNOVATION INSIGHTS: How this Australian startup is trying to solve a problem for millions every day ...
If you’ve ever found yourself desperately trying to find city parking, you’re not alone. The problem of sourcing parking, especially in central ...


Brussels terror attacks are Europe's problem, not just Belgium's
Belgium's security forces could have done more to prevent the Brussels attacks, but so could every security service in the world.

No Law Degree? No Problem! Sarah Palin To Preside Over Reality TV Court
Sarah Palin will tell you about a crazy legal theory called rootin’-tootin’ res ipsa loquitur.

Martin Sorrell to 4A's Gathering: 'There Is A Problem' With Gender, Diversity
... J. Walter Thompson's former CEO Gustavo Martinez resigned for alleged sexist and racist remarks, WPP CEO Martin Sorrell said "there is a problem" ...

Apple Has Problems with Its Cloud Infrastructure, Says The Information
... ) Google division for some cloud computing infrastructure, The Information ’s Amir Efrati and Steve Nellis today write that Apple has a problem ...

The woman problem
The woman problem by digby You've undoubtedly heard by now about Trump criticizing Heidi Cruz's looks and Ted calling him a sniveling coward ...

Apple, Google and Facebook published a long list of problems with the UK's proposed 'Snoopers' Charter' ...
... evidence submitted Thursday , Apple, Facebook, Google, Microsoft, Twitter, and Yahoo have together highlighted what they regard as problems ...

Obama: Climate Change Is a 'Major' Problem, But ISIS? 'They're Not An Existential Threat'
... on Wednesday. "They're not an existential threat to us," he said. But a few sentences later, he described climate change as a "major" problem. ...

Resources last updated: 3/25/2016 12:43:40 AM