473,729 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error in me.show()

ed
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 :)
Nov 20 '05 #1
20 2443
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 :)

Nov 20 '05 #2
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
Nov 20 '05 #3
Ed
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 :)

Nov 20 '05 #4
Ed
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

Nov 20 '05 #5
"Ed" <an*******@disc ussions.microso ft.com> schrieb
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)


/When/ should it return a value?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #6
Hi Ed,

Normaly it goes something like this
dim dlgresult as dialogresult dim myDialog as new FormDialog dlgresult=myDia log.showDialog


Cor
Nov 20 '05 #7
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 :)


Nov 20 '05 #8
Ed
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
Nov 20 '05 #9
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

Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5037
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
7
3061
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?!?!
2
9368
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:
0
1193
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() | +------------+
0
3042
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)
13
6609
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
3
2746
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
0
4804
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
0
1316
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...
11
5589
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
0
8923
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9285
jinu1996
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...
0
8155
agi2029
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...
0
6025
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4529
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...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
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
2
2686
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2165
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.