Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Convert Everything from VB Form!
Convert Everything from VB Form! [message #371273] Thu, 26 June 2003 13:12 Go to next message
Eclipse UserFriend
Originally posted by: thousandvb.yeah.net

Hi all ,I just wrote a VB2SWT convertor tonight which converts
everything(menu, instinct vb controls) to SWT Source Code Format. Those that
can not be converted control become swt.label.

Anyone insterested in it, reply to this post.

See screenshots here:

http://tonyyang.3322.org/swt/index.html

Tony Yang

----------------------------------------------------
Below is a sample:

import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;

class Test4
{
public static void main(String[] args)
{
Display display = new Display();
Shell shell = new Shell(display, SWT.CLOSE );
shell.setSize(450 ,272);
shell.setText("New Project");
Group Frame1 = new Group(shell, SWT.NONE);
Frame1.setText("Database Connection");
Frame1.setBounds(8, 9, 430, 106);
Label Label2 = new Label(Frame1, SWT.NONE);
Label2.setText("Connect String:");
Label2.setBounds(13, 23, 73, 13);
Label Label1 = new Label(Frame1, SWT.NONE);
Label1.setText("Login Name:");
Label1.setBounds(13, 49, 60, 13);
Label Label3 = new Label(Frame1, SWT.NONE);
Label3.setText("Login Password:");
Label3.setBounds(13, 75, 78, 13);
Button cmdGetConnectStr = new Button(Frame1, SWT.PUSH);
cmdGetConnectStr.setText("...");
cmdGetConnectStr.setBounds(396, 21, 21, 19);
Combo cboConnectString = new Combo(Frame1, SWT.NONE);
cboConnectString.setBounds(99, 20, 297, 21);
Text txtUsername = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
txtUsername.setText("");
txtUsername.setBounds(99, 47, 118, 20);
Text txtPassword = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
txtPassword.setText("");
txtPassword.setBounds(99, 73, 118, 20);
Button chkSavePass = new Button(Frame1, SWT.CHECK);
chkSavePass.setText("&Save password");
chkSavePass.setBounds(225, 72, 97, 22);
Group Frame2 = new Group(shell, SWT.NONE);
Frame2.setText("Project Information");
Frame2.setBounds(8, 123, 430, 84);
Label Label4 = new Label(Frame2, SWT.NONE);
Label4.setText("Database Type:");
Label4.setBounds(12, 24, 76, 13);
Label Label5 = new Label(Frame2, SWT.NONE);
Label5.setText("Project Path:");
Label5.setBounds(12, 52, 61, 13);
Combo cboDBType = new Combo(Frame2, SWT.DROP_DOWN | SWT.READ_ONLY);
cboDBType.setBounds(98, 22, 122, 21);
Button chkUseAddin = new Button(Frame2, SWT.CHECK);
chkUseAddin.setText("&Use Available Addin");
chkUseAddin.setBounds(225, 24, 136, 18);
Text txtProjectPath = new Text(Frame2, SWT.SINGLE |SWT.BORDER );
txtProjectPath.setText("");
txtProjectPath.setBounds(98, 50, 297, 20);
Button cmdGetPath = new Button(Frame2, SWT.PUSH);
cmdGetPath.setText("...");
cmdGetPath.setBounds(396, 50, 21, 20);
Button cmdOK = new Button(shell, SWT.PUSH);
cmdOK.setText("OK");
cmdOK.setBounds(259, 215, 84, 24);
Button cmdCancel = new Button(shell, SWT.PUSH);
cmdCancel.setText("Cancel");
cmdCancel.setBounds(354, 215, 84, 24);
Button cmdWizard = new Button(shell, SWT.PUSH);
cmdWizard.setText("&Wizard...");
cmdWizard.setBounds(8, 215, 110, 24);
shell.open();

while(!shell.isDisposed()){
if(!display.readAndDispatch())
display.sleep();
}
display.dispose();

}
}
Re: Convert Everything from VB Form! [message #371288 is a reply to message #371273] Thu, 26 June 2003 17:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve_northover.ca.ibm.com

Please check to see if https://bugs.eclipse.org/bugs/show_bug.cgi?id=12220
is the problem you are seeing.
If so, it has just been fixed so please retry your code.

"Tony Yang" <thousandvb@yeah.net> wrote in message
news:bdf9hp$qj7$1@rogue.oti.com...
> Hi all ,I just wrote a VB2SWT convertor tonight which converts
> everything(menu, instinct vb controls) to SWT Source Code Format. Those
that
> can not be converted control become swt.label.
>
> Anyone insterested in it, reply to this post.
>
> See screenshots here:
>
> http://tonyyang.3322.org/swt/index.html
>
> Tony Yang
>
> ----------------------------------------------------
> Below is a sample:
>
> import org.eclipse.swt.*;
> import org.eclipse.swt.widgets.*;
> import org.eclipse.swt.events.*;
> import org.eclipse.swt.graphics.*;
>
> class Test4
> {
> public static void main(String[] args)
> {
> Display display = new Display();
> Shell shell = new Shell(display, SWT.CLOSE );
> shell.setSize(450 ,272);
> shell.setText("New Project");
> Group Frame1 = new Group(shell, SWT.NONE);
> Frame1.setText("Database Connection");
> Frame1.setBounds(8, 9, 430, 106);
> Label Label2 = new Label(Frame1, SWT.NONE);
> Label2.setText("Connect String:");
> Label2.setBounds(13, 23, 73, 13);
> Label Label1 = new Label(Frame1, SWT.NONE);
> Label1.setText("Login Name:");
> Label1.setBounds(13, 49, 60, 13);
> Label Label3 = new Label(Frame1, SWT.NONE);
> Label3.setText("Login Password:");
> Label3.setBounds(13, 75, 78, 13);
> Button cmdGetConnectStr = new Button(Frame1, SWT.PUSH);
> cmdGetConnectStr.setText("...");
> cmdGetConnectStr.setBounds(396, 21, 21, 19);
> Combo cboConnectString = new Combo(Frame1, SWT.NONE);
> cboConnectString.setBounds(99, 20, 297, 21);
> Text txtUsername = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
> txtUsername.setText("");
> txtUsername.setBounds(99, 47, 118, 20);
> Text txtPassword = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
> txtPassword.setText("");
> txtPassword.setBounds(99, 73, 118, 20);
> Button chkSavePass = new Button(Frame1, SWT.CHECK);
> chkSavePass.setText("&Save password");
> chkSavePass.setBounds(225, 72, 97, 22);
> Group Frame2 = new Group(shell, SWT.NONE);
> Frame2.setText("Project Information");
> Frame2.setBounds(8, 123, 430, 84);
> Label Label4 = new Label(Frame2, SWT.NONE);
> Label4.setText("Database Type:");
> Label4.setBounds(12, 24, 76, 13);
> Label Label5 = new Label(Frame2, SWT.NONE);
> Label5.setText("Project Path:");
> Label5.setBounds(12, 52, 61, 13);
> Combo cboDBType = new Combo(Frame2, SWT.DROP_DOWN | SWT.READ_ONLY);
> cboDBType.setBounds(98, 22, 122, 21);
> Button chkUseAddin = new Button(Frame2, SWT.CHECK);
> chkUseAddin.setText("&Use Available Addin");
> chkUseAddin.setBounds(225, 24, 136, 18);
> Text txtProjectPath = new Text(Frame2, SWT.SINGLE |SWT.BORDER );
> txtProjectPath.setText("");
> txtProjectPath.setBounds(98, 50, 297, 20);
> Button cmdGetPath = new Button(Frame2, SWT.PUSH);
> cmdGetPath.setText("...");
> cmdGetPath.setBounds(396, 50, 21, 20);
> Button cmdOK = new Button(shell, SWT.PUSH);
> cmdOK.setText("OK");
> cmdOK.setBounds(259, 215, 84, 24);
> Button cmdCancel = new Button(shell, SWT.PUSH);
> cmdCancel.setText("Cancel");
> cmdCancel.setBounds(354, 215, 84, 24);
> Button cmdWizard = new Button(shell, SWT.PUSH);
> cmdWizard.setText("&Wizard...");
> cmdWizard.setBounds(8, 215, 110, 24);
> shell.open();
>
> while(!shell.isDisposed()){
> if(!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
>
> }
> }
>
>
>
Re: Convert Everything from VB Form! [message #371300 is a reply to message #371288] Fri, 27 June 2003 13:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve_northover.ca.ibm.com

Oops, missed. My clicking aim is bad.

"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:bdfp2p$9fo$1@rogue.oti.com...
> Please check to see if https://bugs.eclipse.org/bugs/show_bug.cgi?id=12220
> is the problem you are seeing.
> If so, it has just been fixed so please retry your code.
>
> "Tony Yang" <thousandvb@yeah.net> wrote in message
> news:bdf9hp$qj7$1@rogue.oti.com...
> > Hi all ,I just wrote a VB2SWT convertor tonight which converts
> > everything(menu, instinct vb controls) to SWT Source Code Format. Those
> that
> > can not be converted control become swt.label.
> >
> > Anyone insterested in it, reply to this post.
> >
> > See screenshots here:
> >
> > http://tonyyang.3322.org/swt/index.html
> >
> > Tony Yang
> >
> > ----------------------------------------------------
> > Below is a sample:
> >
> > import org.eclipse.swt.*;
> > import org.eclipse.swt.widgets.*;
> > import org.eclipse.swt.events.*;
> > import org.eclipse.swt.graphics.*;
> >
> > class Test4
> > {
> > public static void main(String[] args)
> > {
> > Display display = new Display();
> > Shell shell = new Shell(display, SWT.CLOSE );
> > shell.setSize(450 ,272);
> > shell.setText("New Project");
> > Group Frame1 = new Group(shell, SWT.NONE);
> > Frame1.setText("Database Connection");
> > Frame1.setBounds(8, 9, 430, 106);
> > Label Label2 = new Label(Frame1, SWT.NONE);
> > Label2.setText("Connect String:");
> > Label2.setBounds(13, 23, 73, 13);
> > Label Label1 = new Label(Frame1, SWT.NONE);
> > Label1.setText("Login Name:");
> > Label1.setBounds(13, 49, 60, 13);
> > Label Label3 = new Label(Frame1, SWT.NONE);
> > Label3.setText("Login Password:");
> > Label3.setBounds(13, 75, 78, 13);
> > Button cmdGetConnectStr = new Button(Frame1, SWT.PUSH);
> > cmdGetConnectStr.setText("...");
> > cmdGetConnectStr.setBounds(396, 21, 21, 19);
> > Combo cboConnectString = new Combo(Frame1, SWT.NONE);
> > cboConnectString.setBounds(99, 20, 297, 21);
> > Text txtUsername = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
> > txtUsername.setText("");
> > txtUsername.setBounds(99, 47, 118, 20);
> > Text txtPassword = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
> > txtPassword.setText("");
> > txtPassword.setBounds(99, 73, 118, 20);
> > Button chkSavePass = new Button(Frame1, SWT.CHECK);
> > chkSavePass.setText("&Save password");
> > chkSavePass.setBounds(225, 72, 97, 22);
> > Group Frame2 = new Group(shell, SWT.NONE);
> > Frame2.setText("Project Information");
> > Frame2.setBounds(8, 123, 430, 84);
> > Label Label4 = new Label(Frame2, SWT.NONE);
> > Label4.setText("Database Type:");
> > Label4.setBounds(12, 24, 76, 13);
> > Label Label5 = new Label(Frame2, SWT.NONE);
> > Label5.setText("Project Path:");
> > Label5.setBounds(12, 52, 61, 13);
> > Combo cboDBType = new Combo(Frame2, SWT.DROP_DOWN | SWT.READ_ONLY);
> > cboDBType.setBounds(98, 22, 122, 21);
> > Button chkUseAddin = new Button(Frame2, SWT.CHECK);
> > chkUseAddin.setText("&Use Available Addin");
> > chkUseAddin.setBounds(225, 24, 136, 18);
> > Text txtProjectPath = new Text(Frame2, SWT.SINGLE |SWT.BORDER );
> > txtProjectPath.setText("");
> > txtProjectPath.setBounds(98, 50, 297, 20);
> > Button cmdGetPath = new Button(Frame2, SWT.PUSH);
> > cmdGetPath.setText("...");
> > cmdGetPath.setBounds(396, 50, 21, 20);
> > Button cmdOK = new Button(shell, SWT.PUSH);
> > cmdOK.setText("OK");
> > cmdOK.setBounds(259, 215, 84, 24);
> > Button cmdCancel = new Button(shell, SWT.PUSH);
> > cmdCancel.setText("Cancel");
> > cmdCancel.setBounds(354, 215, 84, 24);
> > Button cmdWizard = new Button(shell, SWT.PUSH);
> > cmdWizard.setText("&Wizard...");
> > cmdWizard.setBounds(8, 215, 110, 24);
> > shell.open();
> >
> > while(!shell.isDisposed()){
> > if(!display.readAndDispatch())
> > display.sleep();
> > }
> > display.dispose();
> >
> > }
> > }
> >
> >
> >
>
>
Re: Convert Everything from VB Form! [message #371303 is a reply to message #371273] Fri, 27 June 2003 14:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: agcolston.buckman.com

I am interested... looks like nice work.

Tony


"Tony Yang" <thousandvb@yeah.net> wrote in message
news:bdf9hp$qj7$1@rogue.oti.com...
> Hi all ,I just wrote a VB2SWT convertor tonight which converts
> everything(menu, instinct vb controls) to SWT Source Code Format. Those
that
> can not be converted control become swt.label.
>
> Anyone insterested in it, reply to this post.
>
> See screenshots here:
>
> http://tonyyang.3322.org/swt/index.html
>
> Tony Yang
>
> ----------------------------------------------------
> Below is a sample:
>
> import org.eclipse.swt.*;
> import org.eclipse.swt.widgets.*;
> import org.eclipse.swt.events.*;
> import org.eclipse.swt.graphics.*;
>
> class Test4
> {
> public static void main(String[] args)
> {
> Display display = new Display();
> Shell shell = new Shell(display, SWT.CLOSE );
> shell.setSize(450 ,272);
> shell.setText("New Project");
> Group Frame1 = new Group(shell, SWT.NONE);
> Frame1.setText("Database Connection");
> Frame1.setBounds(8, 9, 430, 106);
> Label Label2 = new Label(Frame1, SWT.NONE);
> Label2.setText("Connect String:");
> Label2.setBounds(13, 23, 73, 13);
> Label Label1 = new Label(Frame1, SWT.NONE);
> Label1.setText("Login Name:");
> Label1.setBounds(13, 49, 60, 13);
> Label Label3 = new Label(Frame1, SWT.NONE);
> Label3.setText("Login Password:");
> Label3.setBounds(13, 75, 78, 13);
> Button cmdGetConnectStr = new Button(Frame1, SWT.PUSH);
> cmdGetConnectStr.setText("...");
> cmdGetConnectStr.setBounds(396, 21, 21, 19);
> Combo cboConnectString = new Combo(Frame1, SWT.NONE);
> cboConnectString.setBounds(99, 20, 297, 21);
> Text txtUsername = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
> txtUsername.setText("");
> txtUsername.setBounds(99, 47, 118, 20);
> Text txtPassword = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
> txtPassword.setText("");
> txtPassword.setBounds(99, 73, 118, 20);
> Button chkSavePass = new Button(Frame1, SWT.CHECK);
> chkSavePass.setText("&Save password");
> chkSavePass.setBounds(225, 72, 97, 22);
> Group Frame2 = new Group(shell, SWT.NONE);
> Frame2.setText("Project Information");
> Frame2.setBounds(8, 123, 430, 84);
> Label Label4 = new Label(Frame2, SWT.NONE);
> Label4.setText("Database Type:");
> Label4.setBounds(12, 24, 76, 13);
> Label Label5 = new Label(Frame2, SWT.NONE);
> Label5.setText("Project Path:");
> Label5.setBounds(12, 52, 61, 13);
> Combo cboDBType = new Combo(Frame2, SWT.DROP_DOWN | SWT.READ_ONLY);
> cboDBType.setBounds(98, 22, 122, 21);
> Button chkUseAddin = new Button(Frame2, SWT.CHECK);
> chkUseAddin.setText("&Use Available Addin");
> chkUseAddin.setBounds(225, 24, 136, 18);
> Text txtProjectPath = new Text(Frame2, SWT.SINGLE |SWT.BORDER );
> txtProjectPath.setText("");
> txtProjectPath.setBounds(98, 50, 297, 20);
> Button cmdGetPath = new Button(Frame2, SWT.PUSH);
> cmdGetPath.setText("...");
> cmdGetPath.setBounds(396, 50, 21, 20);
> Button cmdOK = new Button(shell, SWT.PUSH);
> cmdOK.setText("OK");
> cmdOK.setBounds(259, 215, 84, 24);
> Button cmdCancel = new Button(shell, SWT.PUSH);
> cmdCancel.setText("Cancel");
> cmdCancel.setBounds(354, 215, 84, 24);
> Button cmdWizard = new Button(shell, SWT.PUSH);
> cmdWizard.setText("&Wizard...");
> cmdWizard.setBounds(8, 215, 110, 24);
> shell.open();
>
> while(!shell.isDisposed()){
> if(!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
>
> }
> }
>
>
>
Re: Convert Everything from VB Form! [message #371321 is a reply to message #371273] Sat, 28 June 2003 14:40 Go to previous message
Eclipse UserFriend
Originally posted by: ilias_solo.yahoo.com

I am really interested in what it seems a good work from you.

Regards

Elias




Tony Yang wrote:

> Hi all ,I just wrote a VB2SWT convertor tonight which converts
> everything(menu, instinct vb controls) to SWT Source Code Format. Those that
> can not be converted control become swt.label.

> Anyone insterested in it, reply to this post.

> See screenshots here:

> http://tonyyang.3322.org/swt/index.html

> Tony Yang

> ----------------------------------------------------
> Below is a sample:

> import org.eclipse.swt.*;
> import org.eclipse.swt.widgets.*;
> import org.eclipse.swt.events.*;
> import org.eclipse.swt.graphics.*;

> class Test4
> {
> public static void main(String[] args)
> {
> Display display = new Display();
> Shell shell = new Shell(display, SWT.CLOSE );
> shell.setSize(450 ,272);
> shell.setText("New Project");
> Group Frame1 = new Group(shell, SWT.NONE);
> Frame1.setText("Database Connection");
> Frame1.setBounds(8, 9, 430, 106);
> Label Label2 = new Label(Frame1, SWT.NONE);
> Label2.setText("Connect String:");
> Label2.setBounds(13, 23, 73, 13);
> Label Label1 = new Label(Frame1, SWT.NONE);
> Label1.setText("Login Name:");
> Label1.setBounds(13, 49, 60, 13);
> Label Label3 = new Label(Frame1, SWT.NONE);
> Label3.setText("Login Password:");
> Label3.setBounds(13, 75, 78, 13);
> Button cmdGetConnectStr = new Button(Frame1, SWT.PUSH);
> cmdGetConnectStr.setText("...");
> cmdGetConnectStr.setBounds(396, 21, 21, 19);
> Combo cboConnectString = new Combo(Frame1, SWT.NONE);
> cboConnectString.setBounds(99, 20, 297, 21);
> Text txtUsername = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
> txtUsername.setText("");
> txtUsername.setBounds(99, 47, 118, 20);
> Text txtPassword = new Text(Frame1, SWT.SINGLE |SWT.BORDER );
> txtPassword.setText("");
> txtPassword.setBounds(99, 73, 118, 20);
> Button chkSavePass = new Button(Frame1, SWT.CHECK);
> chkSavePass.setText("&Save password");
> chkSavePass.setBounds(225, 72, 97, 22);
> Group Frame2 = new Group(shell, SWT.NONE);
> Frame2.setText("Project Information");
> Frame2.setBounds(8, 123, 430, 84);
> Label Label4 = new Label(Frame2, SWT.NONE);
> Label4.setText("Database Type:");
> Label4.setBounds(12, 24, 76, 13);
> Label Label5 = new Label(Frame2, SWT.NONE);
> Label5.setText("Project Path:");
> Label5.setBounds(12, 52, 61, 13);
> Combo cboDBType = new Combo(Frame2, SWT.DROP_DOWN | SWT.READ_ONLY);
> cboDBType.setBounds(98, 22, 122, 21);
> Button chkUseAddin = new Button(Frame2, SWT.CHECK);
> chkUseAddin.setText("&Use Available Addin");
> chkUseAddin.setBounds(225, 24, 136, 18);
> Text txtProjectPath = new Text(Frame2, SWT.SINGLE |SWT.BORDER );
> txtProjectPath.setText("");
> txtProjectPath.setBounds(98, 50, 297, 20);
> Button cmdGetPath = new Button(Frame2, SWT.PUSH);
> cmdGetPath.setText("...");
> cmdGetPath.setBounds(396, 50, 21, 20);
> Button cmdOK = new Button(shell, SWT.PUSH);
> cmdOK.setText("OK");
> cmdOK.setBounds(259, 215, 84, 24);
> Button cmdCancel = new Button(shell, SWT.PUSH);
> cmdCancel.setText("Cancel");
> cmdCancel.setBounds(354, 215, 84, 24);
> Button cmdWizard = new Button(shell, SWT.PUSH);
> cmdWizard.setText("&Wizard...");
> cmdWizard.setBounds(8, 215, 110, 24);
> shell.open();

> while(!shell.isDisposed()){
> if(!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();

> }
> }
Previous Topic:Defferent between Eclipse 2 and 2.1
Next Topic:Re: Use VB Designer to generate SWT UI source code
Goto Forum:
  


Current Time: Sun Sep 21 12:04:33 EDT 2025

Powered by FUDForum. Page generated in 0.03548 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top