Hi I can't seem to make the Me.Show() work
My code is
dim dlgresult as dialogresul
dlgresult=me.sh ow(
The message is : "expression does not produce a value
But if I sue this: dlgresult=Me.Sh owDialog(), it works. It's just that I need my form to me modeless
What am I missing here
Thanks :) 20 2433
Hello,
Me.Show() doesn't return a value this is because its modeless and execution
continues without waiting.
Just try Me.Show() on its own.
Regards
Simon Jefferies
Tools Programmer, Headfirst Productions
mailto:si****@h eadfirst.co.uk
-
"ed" <an*******@disc ussions.microso ft.com> wrote in message
news:0F******** *************** ***********@mic rosoft.com... Hi I can't seem to make the Me.Show() work.
My code is:
dim dlgresult as dialogresult
dlgresult=me.sh ow()
The message is : "expression does not produce a value"
But if I sue this: dlgresult=Me.Sh owDialog(), it works. It's just that I need my form to me modeless.
What am I missing here?
Thanks :)
Hi Ed, But if I sue this: dlgresult=Me.Sh owDialog(), it works.
Does this works, what did you more on your form to create this.
You shows a form itself again as a dialog withouth instancing a new one?
Tell something more what you want to archieve.
Cor
Oh I see. The problem now is that i need to return a value....to make it clearer, here's the rest of the code: (sorry for not showing this earlier
dim dlgresult as dialogresul
dlgresult=me.sh ow(
select case dlgresul
Case DialogResult.Ca nce
-----right code her
Case DialogResult.Ch ang
-----right code her
Case DialogResult.Ig nor
-----right code her
end selec
As you said, Me.Show doesnt return a value, how can i make my code above work? Is there a workaround? Thanks :
Hello
Me.Show() doesn't return a value this is because its modeless and execution
continues without waiting
Just try Me.Show() on its own
Regard
Simon Jefferie
Tools Programmer, Headfirst Production
mailto:si****@h eadfirst.co.u
"ed" <an*******@disc ussions.microso ft.com> wrote in message
news:0F******** *************** ***********@mic rosoft.com.. Hi I can't seem to make the Me.Show() work My code is dim dlgresult as dialogresul dlgresult=me.sh ow( The message is : "expression does not produce a value But if I sue this: dlgresult=Me.Sh owDialog(), it works. It's just that I need my form to me modeless What am I missing here Thanks :)
Hi Cor
What I'm doing here is a spell check routine. The spell check form will appear if it sees a misspelled word. If it finds one, then it will run this code
-----start code----
startPos = InStr(1, ctrl.Text, strWord
wordLength = Len(strWord
ctrl.Select(sta rtPos - 1, wordLength
ctrl.Focus(
dim dlgresult as dialogresul
dlgresult=me.sh ow(
select case dlgresul
Case DialogResult.Ca nce
-----right code her
Case DialogResult.Ch ang
-----right code her
Case DialogResult.Ig nor
-----right code her
end selec
----end code---
Basically, the main reason why i want the spell checker form to be modeless is because after finding a misspelled word, it will highlight that word. If the spell checker form is modal then the focus will always be on the spell checker form, thus the highlight won't be shown in the main form
The problem now is that dlgresult=me.sh ow won't work, it only works if it's dlgresult=me.sh owdialog(). How can i make it work? Thanks :
edga
Hi Ed But if I sue this: dlgresult=Me.Sh owDialog(), it works
Does this works, what did you more on your form to create this
You shows a form itself again as a dialog withouth instancing a new one
Tell something more what you want to archieve
Co
Hi Ed,
Normaly it goes something like this dim dlgresult as dialogresult
dim myDialog as new FormDialog dlgresult=myDia log.showDialog
Cor
On your SpellCheck form, when the Ok Button (or any button for that matter)
is clicked just do
Me.DialogResult = --- whatever ---
then hide the form...
thats the exact same thing show dialog does...
"Ed" <an*******@disc ussions.microso ft.com> wrote in message
news:8A******** *************** ***********@mic rosoft.com... Oh I see. The problem now is that i need to return a value....to make it
clearer, here's the rest of the code: (sorry for not showing this earlier) dim dlgresult as dialogresult
dlgresult=me.sh ow()
select case dlgresult Case DialogResult.Ca ncel -----right code here
Case DialogResult.Ch ange -----right code here
Case DialogResult.Ig nore -----right code here
end select
As you said, Me.Show doesnt return a value, how can i make my code above
work? Is there a workaround? Thanks :)
Hello,
Me.Show() doesn't return a value this is because its modeless and
execution continues without waiting.
Just try Me.Show() on its own.
Regards Simon Jefferies Tools Programmer, Headfirst Productions mailto:si****@h eadfirst.co.uk - "ed" <an*******@disc ussions.microso ft.com> wrote in message news:0F******** *************** ***********@mic rosoft.com... Hi I can't seem to make the Me.Show() work. My code is: dim dlgresult as dialogresult dlgresult=me.sh ow() The message is : "expression does not produce a value" But if I sue this: dlgresult=Me.Sh owDialog(), it works. It's just that
I need my form to me modeless. What am I missing here? Thanks :)
I changed my code to
Me.Show(
select case me.dialogresul
Case DialogResult.Ca nce
-----right code her
Case DialogResult.Ch ang
-----right code her
Case DialogResult.Ig nor
-----right code her
end selec
there are no more error messages. The problem now is that the code will continue executing after Me.Show without waiting for an event on the spell check form. How can I make it stop after the Me.show? Is it possible? What i want to happen is somehow mimic the ME.ShowDialog() , but unlike it, i can switch forms (modeless).
Thanks
Ed
Ed,
It sounds like you are confusing returning a single value once and returning
a value multiple times.
The point behind a modeless form is to allow returning a value multiple
times. The easiest way to return a value multiple times is to have your form
raise an event.
I would recommend having the dialog raise an event when the parent form
needs Cancel, Change, or Ignore.
You then either need to use a WithEvents variable or AddHandler &
RemoveHandler to handle the events the dialog raises.
Hope this helps
Jay
"Ed" <an*******@disc ussions.microso ft.com> wrote in message
news:C5******** *************** ***********@mic rosoft.com... I changed my code to:
Me.Show()
select case me.dialogresult Case DialogResult.Ca ncel -----right code here
Case DialogResult.Ch ange -----right code here
Case DialogResult.Ig nore -----right code here
end select
there are no more error messages. The problem now is that the code will
continue executing after Me.Show without waiting for an event on the spell
check form. How can I make it stop after the Me.show? Is it possible? What i
want to happen is somehow mimic the ME.ShowDialog() , but unlike it, i can
switch forms (modeless). Thanks,
Ed This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Wayno |
last post by:
My php logs are coming up empty. I have done all I can think of, and
all that made sense to me. Can someone take a look at my php.ini
please and tell me what you think may be the problem.
I double-checked the path to my error log. It is in
/var/www/logs/php_error_log
Thanks. :)
-Wayne Stevenson
|
by: Paul |
last post by:
I thought this is more of an IE issue but i've had no joy on that group
perhaps somebody here will have a clue.
If i click a link to a web page embedded in Excel (97 OR 2000) i get the
standard error page displayed by IE (you know, the 'cannot find server or
dns error' page).
Turning off 'show friendly http error messages' alleviates this.
(Unfortunately this is the Windows default setting!)
Whats going on?!?!
|
by: Dayron |
last post by:
Hi, I use ASP code to generate report that I retrieve about 100,000 to
800,000 records from database using ADODB.Recordset. But when i run the
code, it show me the following error.
Provider error '8007000e'
Not enough storage is available to complete this operation.
/e-survey/progress3.asp, line 192
Here is my code:
|
by: Morten Gulbrandsen |
last post by:
C:\mysql\bin>mysql -u elmasri -pnavathe company
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select database();
+------------+
| database() |
+------------+
|
by: Morten Gulbrandsen |
last post by:
mysql> USE company;
Database changed
mysql>
mysql> DROP TABLE IF EXISTS EMPLOYEE;
--------------
DROP TABLE IF EXISTS EMPLOYEE
--------------
Query OK, 0 rows affected (0.00 sec)
| |
by: deko |
last post by:
I use this convention frequently:
Exit_Here:
Exit Sub
HandleErr:
Select Case Err.Number
Case 3163
Resume Next
Case 3376
Resume Next
|
by: windandwaves |
last post by:
Hi Gurus
Does anyone know how I set the error trapping to option 2 in visual basic.
I know that you can go to tools, options and then choose on unhandled errors
only, but is there a VB command that I can use instead?
Cheers
Nicolaas
|
by: JSantora |
last post by:
Essentially, InsertAT is broken!
For the past couple of hours, I've been getting this "Parameter name:
'-2147483550' is not a valid value for 'index'." error.
Apparently, its caused by having manually inserted a row in the table
bound to the Combo box. The InsertAt Method of adding a row just does
not work.
Hope this helps anyone with this problem.
john
|
by: calvinkwoo3000 |
last post by:
My window application run property before i set a password at mdb file.
Below is my connection string that before and after set password
conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\mms.mdb;");
conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\mms.mdb;Jet OLEDB:Database Password=password;");
Below is my pageload, and i found that error occure when run...
|
by: xenoix |
last post by:
hey there, im reasonably new to C# and im currently writing a backup application which im using as a learning resource.
My PC :-
Visual Studio 2005
.NET Framework 2
Component Factory Krypton Tools
Test PC :-
.Net Framework 2
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |