You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

marbel

Unregistered

1

Sunday, February 22nd 2009, 2:59am

Form öffnen WebApplet

Hallo!

Habe folgendes Problem:

Ich habe einen Button auf meinem Applet und ein neues Formular angelegt.

Nun möchte ich ,dass dieses Fenster (das neue formular) geöffnet wird... Bei vb6 würde ich jetzt sagen "form1.show vbmodeless" probiere ich nun aber "Form1.show" in Jabaco bekomme ich:

Fehler in Applet 1 Zeile 80
Erwartet: Statische Methode!



einer eine Lösung?

OlimilO

Intermediate

  • "OlimilO" is male

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

2

Sunday, February 22nd 2009, 11:54am

Hallo,

Form1 ist doch normalerweise der Namen des Formulars das standardmäßig also bei Programmstart gestartet wird.

schau mal in Module1

bei einem zweiten Formular mußt du erst eine Objekt-Instanz also eine neue Variable des Forms anlegen:

Jabaco Source

1
2
Dim MyForm As Form1
MyForm = New Form1


ist damit die Frage beanwortet?

oder hab ich es falsch verstanden?

Grüße

OlimilO

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

3

Sunday, February 22nd 2009, 1:06pm

keine Forms in Applets?

Hi,
vermutlich kann man keine Forms in Applets definieren.

Applets können mit anderen Applets (auf der gleichen Seite im Brower) kommunizieren und deren Methoden aufrufen.
Einen Überblick dazu findet man hier bzw hier.

Wenn man aus einem Applet ein Unterformular aufruft, entspricht das ja im Browser einem Pop-up-Fenster. Applets haben eine Methode "ShowDocument()", mit der man neue Seiten aufrufen kann. Ich weiß allerdings nicht, wie man zwischen den Seiten kommuniziert.

Viel Erfolg!

A1880

marble

Unregistered

4

Sunday, February 22nd 2009, 1:06pm

besten dank :)

Eine frage noch... weiß nicht ob ich es einfach hier posten darf

Bei einer Listbox wie kann ich dort den ausgewählten Text auslesen? (VB6: list1.text , jabaco: ??)

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

5

Sunday, February 22nd 2009, 1:45pm

Zugriff auf selektierten ListBox-Eintrag

Mit folgendem Code klappt's bei mir:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Public Sub Form_Load()
  
   Me.Refresh 
   
   List1.AddItem "ene"
   List1.AddItem "mene"
   List1.AddItem "muh!"
End Sub


Public Sub Command1_Click()
   Dim s As String 
   
   s = List1.ListIndex & ": " & List1.List(List1.ListIndex)
   
   msgbox s
End Sub


ListIndex liefert "-1", falls nichts selektiert ist.

Gruß!

A1880

marble

Unregistered

6

Sunday, February 22nd 2009, 2:05pm

besten dank

Rate this thread
WoltLab Burning Board