I have a simple Form with a Button1 and TextBox1.
When I click button, I want execute a Sub procedure with name
TextBox1.Text...
Is it possible?
Thanks,
Jovo
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! 11 1377
"Jovo Mirkovic" <yo**@sezampro.yu> schrieb: I have a simple Form with a Button1 and TextBox1. When I click button, I want execute a Sub procedure with name TextBox1.Text...
A method's name must not contain a period (".").
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> A method's name must not contain a period (".").
Yes, I know that...
TextBox1.Text = "SubName"
Call TextBox1.Text ... ? (something like this...?)
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
"Jovo Mirkovic" <yo**@sezampro.yu> schrieb: A method's name must not contain a period ("."). Yes, I know that...
TextBox1.Text = "SubName"
This code sets a property.
Call TextBox1.Text ... ? (something like this...?)
This would work if there was a 'Text' method defined in 'TextBox1'.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> This would work if there was a 'Text' method defined in 'TextBox1'.
I have a code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
TextBox1.Text = "Test"
Call TextBox1.Text
End Sub
Private Sub Test()
MsgBox ("Hi")
end Sub
I need a "Hi" on the screen when I press Button1...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
CallByName(Me, TextBox1.Text, CallType.Method)
GK
"Jovo Mirkovic" <yo**@sezampro.yu> wrote in message
news:ez****************@TK2MSFTNGP15.phx.gbl... This would work if there was a 'Text' method defined in 'TextBox1'.
I have a code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = "Test" Call TextBox1.Text End Sub
Private Sub Test() MsgBox ("Hi") end Sub
I need a "Hi" on the screen when I press Button1...
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
I found solution... :)
CallByName(Me, TextBox1.Text, vbMethod, txtParam.Text)
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
"Jovo Mirkovic" <yo**@sezampro.yu> schrieb: This would work if there was a 'Text' method defined in 'TextBox1'. I have a code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = "Test" Call TextBox1.Text
Replace the line above with 'Test()'.
End Sub
Private Sub Test() MsgBox ("Hi") end Sub
I need a "Hi" on the screen when I press Button1...
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
"Jovo Mirkovic" <yo**@sezampro.yu> schrieb: I found solution... :)
CallByName(Me, TextBox1.Text, vbMethod, txtParam.Text)
Ooops. Seems that I didn't understand what you want to do...
Calling a method by its name
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=callbyname&lang=en>
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Thanks to all,
CallByName workin fine (it is an excellent function :))
Jovo
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
You can use reflection - see the methodinfo class.
A bit simpler alternative, is the method CallByName - you'll need an object to make the call, though:
'Sample:
Module Module1
Sub Main()
Dim c As New c1
CallByName(c, "foo", CallType.Method)
End Sub
Class c1
Sub foo()
MsgBox("hei!")
End Sub
End Class
End Module
-------------------- From: Jovo Mirkovic <yo**@sezampro.yu> References: <ON**************@tk2msftngp13.phx.gbl> X-Newsreader: AspNNTP 1.50 (ActionJackson.com) Subject: Re: Execute Sub with different names Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: <ui**************@tk2msftngp13.phx.gbl> Newsgroups: microsoft.public.dotnet.languages.vb Date: Fri, 05 Nov 2004 09:52:35 -0800 NNTP-Posting-Host: 67.41.129.85 Lines: 1 Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!tk2msftngp13.phx.gbl Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:240763 X-Tomcat-NG: microsoft.public.dotnet.languages.vb A method's name must not contain a period ("."). Yes, I know that...
TextBox1.Text = "SubName"
Call TextBox1.Text ... ? (something like this...?)
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
Sorry I don't take feature request for WinRes: it belongs to the .NET Framework SDK. I'm a consumer of WinRes, just like you...
--------------------From: Thomas Adams <th************@gmail.com> Newsgroups: microsoft.public.dotnet.internationalization Subject: RE: How to launch WinRes in full screen mode by another program? Date: 29 Sep 2004 19:31:46 GMT Organization: DFN.CIS Senior Customer Lines: 17 Message-ID: <Xn**********************************@127.0.0.1> References: <2q************@uni-berlin.de> <r3**************@cpmsftngxa06.phx.gbl> X-Trace: news.uni-berlin.de cGk7xWd2iWxkO9HVbF7isQODBzMeOPRUidb0ZHc/H3nGY= User-Agent: Xnews/06.08.25 X-Converter: MorVer Version 1.0.305 Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-
berlin.de!uni-berlin.de!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.internationalization:947 X-Tomcat-NG: microsoft.public.dotnet.internationalization
Hi
Your assumption is correct. I did not want to call out its long name since I didn't know if that could be regarded as breach of NDA. :)
Thanks for the explanation. Do you take feature requests for WinRes? I'd like to see a "remember last size and location" some day...
~T.
xu*@online.microsoft.com (Xu Yang[MSFT]) wrote:
--
[Formerly appended fullquote was nuked by morver, the versatile morphing server.]
I'm afraid that LocStudio (when you say LS, I assume you are using LocStudio) does not have the option, and WinRes does not remember its size and
location when it was shut down.
If you are trying to call it in your own application, you can always use ProcessWindowStyle.Maximized when you start the process.
--------------------From: Thomas Adams <me*@privacy.net> Newsgroups: microsoft.public.dotnet.internationalization Subject: How to launch WinRes in full screen mode by another program? Date: 11 Sep 2004 21:26:17 GMT Organization: DFN.CIS Senior Customer Lines: 9 Message-ID: <2q************@uni-berlin.de> X-Trace: news.uni-berlin.de 9sj2ViefNkwlw4tmA89WfA6mie8fmrCfbXqlIJqRehUb0= User-Agent: Xnews/06.08.25 X-Face: #Rk@TOQ|^!ZG|&z6lA@-CY>/xB[Ei1mG*&S.+A5z;Ng?3OxX[#DVZw!"o!c`S|p:(zsX-EkdZZ(IVnFRTX%!:Sv^L&Gk~s]vJ@Z~%Rm@G]fr*r2P}u5
*&k/-_2+&Qowj6hiJ1b$^JQf:uy9456HIdKq*B`NC##kyO,>7"Ztnav +=71b*"E+DIme;{i&)ii{#6e?i8P,1Xpc[q0}i:Tm];B1X-Converter: MorVer Version 1.0.305 Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-
berlin.de!uni-berlin.de!not-for-mailXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.internationalization:902 X-Tomcat-NG: microsoft.public.dotnet.internationalization
Hi
Let's imagine you're using a translation environment (LS) that's launching WinRes every now and then. Is it possible to open WinRes in full screen mode in this case? It's quite annoying that it doesn't remember if I switch it to full screen mode the next time it is invoked.
thanks, Thomas This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: William Gill |
last post by:
I have been trying to pass parameters as indicated in the api.
when I use:
sql= 'select * from %s where cusid = %s ' % name,recID)
Cursor.execute(sql)
it works fine, but when I try :
sql=...
|
by: RC |
last post by:
In my Access 2002 form, I have a combo box and on the AfterUpdate
event I use
DoCmd.RunSQL ("UPDATE ....
to update records in a table. When it starts to run I get a message
"You are about to...
|
by: Jack Bauer |
last post by:
How can I execute a query which prompt the user for input?
Something like
SELECT
FROM Table
WHERE Name=
In Oracle PL/SQL, you use & before variable names to have the SQL*Plus
ask for input....
|
by: PointyPointy |
last post by:
Hey,
I'm hoping some can help me out with a small problem I'm having.
I've got two frames - Frame1 and Frame2. Both have aspx pages (Primarily VB) loaded in them but to keep this explination...
|
by: George Varelas |
last post by:
Hi,
can anyone tell me how can I execute an external command such as dos command
through my windows application which is built in C#.
VB has the "Shell(...)" function but I couldn't find...
|
by: Jerzy Zielinski |
last post by:
Hi all,
I would like to execute/evaluate a string that contains a VB script,
for example:
Dim s as string = "Dim avar as integer = 1"
' Evaluate s...
so s can be executed during runtime and...
|
by: David |
last post by:
You're welcome.
executemany is probably a good idea here. If memory becomes a problem
at some point (eg: millions of lines) you'll probably want to use an
on-disk database (I suggest...
|
by: Mike Copeland |
last post by:
How do I work with a std::list that might have multiple objects
having the same "key", but which have other data that is different?
Here's code that compiles, but doesn't do quite what I expect:...
|
by: ChaosKCW |
last post by:
Hi
I am trying to use pymssql, and have an issue where by the execute
(not the fetch) is appearing to load all records into memory.
if I execute
con = pymssql.connect(...)
cur =...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |