Search
  Search
DEVELOP WEB APPLICATIONS WITH THE BEST AJAX FRAMEWORK.
CREATE LINE OF BUSINESS SILVERLIGHT APPLICATIONS IN NO TIME.
EVERY THING YOU NEED TO START DEVELOPING WITH VISUAL WEBGUI.
SEE VISUAL WEBGUI SHOW CASES FROM AROUND THE WORLD.
ALL THE RESOURCES YOU NEED TO START BUILDING VISUAL WEBGUI APPLICATIONS TODAY.
SHARE AND FIND VISUAL WEBGUI RESOURCES.
TALK WITH OTHER VISUAL WEBGUI DEVELOPERS.
 

 

SAP has chosen Visual WebGui for strategic web application, Mr. Saar of SAP explains why in an interview with with Jeremy Geelan at AJAX World.

Click on the video image to watch

SAP chosen VWG for strategic web application

 
  Forum  Core :: SDK (Vi...  Dual Mode (2 in...  Application Code not working in Desktop Mode
Previous Previous
 
Next Next
New Post 5/1/2008 5:10 PM
  gavalmart
17 posts
No Ranking


Application Code not working in Desktop Mode 
Hello everyone.

I have written a very small app to test the Dual Mode apps. The app is just a form with a ListBox in it, loaded with three items (defined at design time). When the user clicks on one item, the selected item's text is show in a label.

The code is:
Box1_SelectedIndexChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        'mostrar el label seleccionado
        If ListBox1.SelectedIndex > -1 Then
            Label1.Text = ListBox1.Items(ListBox1.SelectedIndex)
        Else
            Label1.Text = ""
        End If
    End Sub

However, when the application is run in Desktop mode, this code is never executed, I mean the event SelectedIndexChanged never is rised.

So what I did is use the Clicked event insted. This time, the code is executed but the SelectedIndex value is always -1 no matter the item you selected.

    Private Sub ListBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.Click
        'mostrar el label seleccionado
        If ListBox1.SelectedIndex > -1 Then
            Label1.Text = ListBox1.Items(ListBox1.SelectedIndex)
        Else
            Label1.Text = ""
        End If
    End Sub


Thanks in advance for your help.
 
New Post 5/5/2008 5:50 AM
  gailsteiger
449 posts
2nd Level Poster


Re: Application Code not working in Desktop Mode 
Hi,
I suggest that you check if the
the event handler Box1_SelectedIndexChanged1 is registered for the SelectedIndex event. Perhaps another (empty) event handler is registered.
Gail
 
New Post 5/5/2008 12:23 PM
  gavalmart
17 posts
No Ranking


Re: Application Code not working in Desktop Mode 
Hello Gail.
The SelectedIndex is registered. It works when I run the application in the web browser but it doesn't when I run it in Desktop Application mode.

I'm using Visual Studio 2008 and Visual WebGUI for Framework 3.5. However, I have tried the same code usign VS 2005 and the corresponding version of Visual WebGUI and the code works fine in both modes. So it might be some bug in the newer version.

Thanks a lot for your help.
 
New Post 5/7/2008 4:26 AM
  gailsteiger
449 posts
2nd Level Poster


Re: Application Code not working in Desktop Mode 
Which version of VWG were you using in your VS 2005 runs? Just to make sure I've got it correct, the code worked in as both a VWG and WinForms application with VS 2005 but the WinForms app failed with VS 2008?
Gail
 
New Post 5/7/2008 8:09 AM
  gavalmart
17 posts
No Ranking


Re: Application Code not working in Desktop Mode 
Exactly Gail.
The code does run both like winforms app and web app, when I use VS 2005 and Visual WebGui SDK (for .NET 2.0).

However, using VS 2008 and
Visual WebGui SDK (for .NET 3.5), I'm able to run the application in both modes (like winforms app and web app) but the handler for the event
SelectedIndexChanged of the listbox I'm using is never executed. If I try to use the Click event, the SelectedIndex is always -1.

Thanks a lot.

 
Previous Previous
 
Next Next
  Forum  Core :: SDK (Vi...  Dual Mode (2 in...  Application Code not working in Desktop Mode

Visual Studop Partners

Copyright © 2005-2008 Visual WebGui®   Terms Of Use  Privacy Statement
Visual WebGui is copyright 2005-2008 by Gizmox