| | |
calling event form module
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: May 2009
Posts: 372
Reputation:
Solved Threads: 26
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command1_Click() Call sohel(Image1) End Sub
Module 1
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Public Function sohel(a As Image) a.Visible = False End Function
You cannot use a function to change yje visible factor of an image.
If you want to click the button then
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command1_Click() if image1.visible=false then image1.visible=true elseif image1.visible=true then image1.visible=false end if end sub
Last edited by Jupiter 2; Nov 8th, 2009 at 10:37 am. Reason: if end if tags
If ALL my answers are wrong, only then will I read the question
•
•
Join Date: Mar 2009
Posts: 910
Reputation:
Solved Threads: 167
0
#4 Nov 8th, 2009
Jupiter2,
Here is a way to shorten you comman1_click code...
Just a piece of knowledge I thought I would pass along.
As for the OP, deftones, Jupiter2 has most of what you need to accomplish what you want but allow me to clarify more...
As of right now I cannot see a way to directly call an images click event but you can create a public sub proceedure in your form and call it...
in module...
In Form...
However, if you were to call a command button then you could call it directly by...
Good Luck
Here is a way to shorten you comman1_click code...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Image1.Visible = Not Image1.Visible
Just a piece of knowledge I thought I would pass along.
As for the OP, deftones, Jupiter2 has most of what you need to accomplish what you want but allow me to clarify more...
As of right now I cannot see a way to directly call an images click event but you can create a public sub proceedure in your form and call it...
in module...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Call Form1.MySub
In Form...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Public Sub MySub() Call Image1_Click End Sub
However, if you were to call a command button then you could call it directly by...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Form1.Command1.Value = True
Good Luck
If anyone has helped you solve your problem, please mark your thread as solved.
Thanks
Thanks
![]() |
Similar Threads
- calling sub from a different form (VB.NET)
- Initialisation of Variables (Visual Basic 4 / 5 / 6)
- Calling This Function (C++)
- calling an asp method from java script embeded in Html (ASP.NET)
- loadin a form (Visual Basic 4 / 5 / 6)
- Pass Controls of Access-Form to sub in module (Visual Basic 4 / 5 / 6)
- Closed event of a form (C#)
- Event List for Car Show Fan Site - (PHP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Error checking for an existing record
- Next Thread: making objects invisible
Views: 445 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 2007 access activex add age append application basic beginner birth bmp c++ calculator cd click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





