and by removing Not:
If Not rctlButton.Visible Then rctlButton.Hide()
->
If rctlButton.Visible Then rctlButton.Hide()
it works as intended.
Now I just need to adapt the code to work for the other panels and controls etc that the children button show when you click on them =P
Thanks all.
Oh - update after a bit of playing:
Private Sub SetButtonVisibility(ByRef rctlButton As Control, ByVal vblnVisible As Boolean)
On Error Resume Next
If vblnVisible Then
rctlButton.Visible = Not rctlButton.Visible
Else
If Not rctlButton.Visible Then...
Ok, so a bit more explanation is in order.
On a single panel container I have 12 Buttons. We will call these the "parent" buttons. These parent buttons must always be enabled, visible, and able to be clicked upon. When you click one of said parent buttons, it causes some "child" buttons to...
I was hoping someone could explain to me how to make this code more simple, clean and/or streamlined. It works perfectly as written, but it seems to me there must be a shorter or faster way to do this (i.e.: less lines of code)
Any advice is appreciated.
Thanks in advance.
PS: how do I make...
In addition to my wondering if there is an easier way to do the above code snippet. I was wondering if anyone could give me a few pointers and or tips to implement a 'whiteboard' in a program. I am using winsock, and want to have something similar to the white board setups in messenger and...
This is a really old thread, but since Im having the same problem, Id like to ressurect it...
The IP adds match up, ports are good. everything in my app works fine....if in using it on my LAN, but as soon as I try to have a friend of mine connect to me over an internet connection rather than...
To simplify.....lets say i have a chat program....A wierd one.
This chat program has multiple clients, and 1 host. the clisnt side is good and easy to program. but the host is mean and evil. The host is an MDI and each time a client logs on a new instance of a chat form pops up. So if there are...
That is a very nice tip, however what I was asking was....
Following is my current code (a snippet, abbr. for size). The question is...is there an easier/more efficient way to do this?
Private Sub WinsockClient_DataArrival(Index As Integer, ByVal bytestotal As Long)
Dim strData, strData2 As...
Well, it may not be exactly what you want, but you can always put the winsock controls on the MDIMain form, and code it appropriately in its own code window.
You would still have to have the MDIMain form loaded to access the code...but Ime pretty sure thats not gonna be an issue. =)
Then so long...
I have an App that is using Winsock to send data back and forth between the host and client. The Host and client Apps are identical. The computer knows "who is who" by the user(s) clicking on a button marked "Run as Host" or "connect to remote Host". Now is where I start to get confused. I want...
That doesnt sound like a bad idea...I dont plan on having multiple instances of the client software running so I wont worry about an ID for now. I like your idea, but I dont know how to do that. Can you supply some sample code, or at the very least some detailed pseudo code? I dont even know how...
I have seen chat programs all over the place that allow 1 to 1 connections....I want more.
Long story short....
I am making an app and I want it to do this:
Up to 8 users (clients) connect to a host (server), when they connect, they are greeted with a login prompt. The login prompt checks for a...
hmm, that would probably have worked, although, What I did to make it work was to revise my code as follows:
For nTemp2 = 0 To 3
MakeMarket(nTemp2)
Next nTemp2
it works in this case perfectly....i think the problem was that my function doesnt return a value, so VB was horking on the attempt to...
Public nTemp2 as Integer
Public market(3) As Markets
Type Markets
nItemSellRate(11) As Currency
nItemBuyRate(15) As Currency
isItemSellable(11) As Boolean
isItemBuyable(15) As Boolean
End Type
For nTemp2 = 0 To 3
market(nTemp2) = MakeMarket(nTemp2)
Next nTemp2
By the Way...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.