Re: Windows Form Dictionary

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



if i create a form or write server code in javascript, i can create a
form (dictionary.cs) and show word mean on form. but how?

may be another way is exist, but i dont know.

if you know other way for this situation, please share with me.

Thank you again.

Öznur


On 22 Şubat, 20:23, "oz" <oznurkarakuso...@xxxxxxxxx> wrote:
Thanks your reply. but i cant use html file. because my word mean in
database, not in seperately html file.

My database structure like this:

tblBooks
-------
intBookId (INT)
strBookName (NVARCHAR(30))

tblPages
--------
intPageId (INT)
intBookId (INT)
strPageContent (NVARCHAR(MAX))

tblWords
------
intWordId (INT)
intPageId (INT)
strWord (NVARCHAR(30))
strMean( NVARCHAR(100))

strPageContent  is html content, like this : "<b>Hi, my name is Öznur!
<b>"
I show this content in webBrowser  control (windows application).

strWord (in tblWords table) is has every word, like :

"Hi" , "name", "Öznur"

strMean (in tblWords table) is has every word mean, like,

"used in greating", "reputed", "some body has light".

If user double click webBrowser content part; like "Hi", the otherwindows form (Dictionary.cs) must appear (like popup) and say : "used
in greating". in the same way, if user double click over "Öznur" word,
the otherwindows form (Dictionary.cs) appear and say: "some body has
light", and so on.

In other words, i cant use html file or <a> tag or link style or other
web page, because database binding. i cant use web application so web
form, because user does not have iis.

I obtain the word which double click with javascript, but i cant
create somewindows form (dictionary.cs) via javascript. Therefor, i
cant show word mean on dictionary.cs form.

Thanks.

Öznur

On 22 Þubat, 14:43, Stefan Hoffmann <stefan.hoffm...@xxxxxxxxxx>
wrote:



hi oz,

oz wrote:
If i understand you correctly, then you must use the
webBrowser1_Navigating event of the WebBrowser control.
I mean, i want to capture text, if  user double click  on it.  I can
capture it with javascript but, i cant sent it dictionary form. (My
dictionary form can give word mean).

Your JavaScript must load a new page, e.g. redirect tohttp://dict/captured_word.

You can handle this redirect in the webBrowser1_Navigating event. You
just must cancel in this event the navigation and do what you want with
your url:

namespace WindowsApplication6
{
     public partial class Form1 : Form
     {
         public Form1()
         {
             InitializeComponent();
         }

         private void Form1_Load(object sender, EventArgs e)
         {
             webBrowser1.Navigate("c:/temp/test.html");
         }

        private void webBrowser1_Navigating(object sender,
WebBrowserNavigatingEventArgs e)
         {
           e.Cancel = (e.Url.ToString() != "file:///C:/Temp/test.html");
           if (e.Cancel)
               MessageBox.Show(e.Url.ToString());
         }
     }

}

My test.html:
<html><body><a href="http://dict?captured";>click</a></body></html>

mfG
--> stefan <--- Alıntıyı gizle -

- Alıntıyı göster -


.



Relevant Pages

  • Re: My newbie annoyances so far
    ... Why do you say CPython is slower than JavaScript? ... var vows = x.match; ... compared to _existing_ implementations of Javascript (and it would ... int re_count ...
    (comp.lang.python)
  • Re: newbie lost in strings......
    ... int i = s.indexOf; ... String s = new String; ... In javascript, you *can* declare variables, but you don't have to unless ...
    (comp.lang.java.help)
  • Re: integers and arrays in Java - how?
    ... But "int" not only does not work, it also prevents reading X and Y ... Get X and Y mouse coordinates into a variable that i can do real math on. ... JavaScript is not Java. ...
    (comp.lang.javascript)
  • Re: integers and arrays in Java - how?
    ... There is no 'int' type in JavaScript. ... Not because of a feature that might be in a future release of the language unless you were reading a draft copy of JavaScript2.0 in which case you should have known it wasn't in use yet. ...
    (comp.lang.javascript)
  • Re: integers and arrays in Java - how?
    ... But "int" not only does not work, it also prevents reading X and Y ... Get X and Y mouse coordinates into a variable that i can do real math on. ... JavaScript is not Java. ...
    (comp.lang.javascript)