Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 7th December 2001, 15:59
steveauckly steveauckly is offline
Senior Member
 
Join Date: Sep 2001
Location: Kansas City, MO, USA
Posts: 168
steveauckly is on a distinguished road
Baan: Baan IVc4 SP26 - DB: Oracle 10g - OS: Windows XP Pro
Post Starting Baan browser from VB

Once connected to Baan through Baan OLE, you can start the Menu Browser, Desktop, or DEM Browser with the following (at least in Baan IV, not sure about Baan 5):

Code:
function extern  start.user.menu() 
{ 
	string 	l.user(8) fixed, 
		l.parm(12) fixed 
	long 	flags, 
		old.mwindow, 
		new.mwindow, 
		child.pid 

	l.user = strip$(logname$) 
	select	ttaad200.* 
	from 	ttaad200 
	where 	ttaad200._index1 = {:l.user} 
	  and 	ttaad200._compnr = 000 
	selectdo 
		graphical.mode = true 
		on case ttaad200.stpr 
		case ttaad.stpr.menu.browser: 
			child.pid = act.and.sleep("ttdskmbrowser") 
			break 
		case ttaad.stpr.org.browser: 
			child.pid = act.and.sleep("tgbrg4260m000") 
			break 
		case ttaad.stpr.desktop: 
			l.parm = "-u " & l.user 
			child.pid = act.and.sleep("ttdskprogman", l.parm) 
			break 
		endcase 

		old.mwindow = current.mwindow() 
		flags = DSAUTORESIZE OR DSMENUOFF 
		new.mwindow = create.mwindow("Main Window", DSPIXELBASED,flags) 
		change.mwindow(new.mwindow) 

		if child.pid then 
			set.pgrp (child.pid, child.pid) 
			grab.mwindow(new.mwindow, child.pid) 
			reactivate(child.pid) 
		endif 
		change.mwindow(old.mwindow) 
	selectempty 
		message("User not found, cannot start browser.") 
	endselect 
}

Last edited by mark_h : 30th September 2013 at 19:21.
Reply With Quote
Sponsored Links
  #2  
Old 7th December 2001, 20:35
gfasbender gfasbender is offline
Senior Member
 
Join Date: Aug 2001
Location: Seattle, WA USA
Posts: 172
gfasbender is on a distinguished road
Baan: Baan IV, Baan5, A&D extension - DB: Oracle, MSSQL, Informix - OS: Unix, NT
Example?

Steve,

Can you provide a VB coding example that shows how the function might be used and called? Where are the function variables initialized?

Thanks,
Gordon
Reply With Quote
  #3  
Old 7th December 2001, 21:20
steveauckly steveauckly is offline
Senior Member
 
Join Date: Sep 2001
Location: Kansas City, MO, USA
Posts: 168
steveauckly is on a distinguished road
Baan: Baan IVc4 SP26 - DB: Oracle 10g - OS: Windows XP Pro
more info

Oops, I guess I could have given a little more info:

Here is the VB call:

Code:
Private <b><font color="#804040">Sub</font></b> mnuStartBrowser_Click()
    B_function = <font color="#ff00ff">"start.user.menu()"</font>
    Baan4obj.ParseExecFunction <font color="#ff00ff">"otccomdllbaan"</font>, B_function
<b><font color="#804040">End</font></b> <b><font color="#804040">Sub</font></b>

From VB, you may only execute Baan functions that are in a DLL. You asked about initializing, there is none.

So, why would you want to start a Baan browser from inside VB? In my case, I had a VB app that was connected to Baan which the user would have up all the time. By starting Baan from VB, only 1 license gets used.

Getting the initial connection to Baan from VB is another issue, I'll post a way to do that in the near future in this forum.

Last edited by gfasbender : 7th December 2001 at 21:36.
Reply With Quote
  #4  
Old 30th January 2003, 11:06
sns0707 sns0707 is offline
Junior Member
 
Join Date: Jan 2003
Location: noida
Posts: 4
sns0707 is on a distinguished road
Baan: Baan c4 - DB: informix - OS: NT
Unhappy Starting Baan browser from VB

I had created DLL from baan (otcjubvblink), and now i am writhing following script in VB, but it is giving some error. please you can provide full script so it will help use link baan with VB.

Dim Baan4obj As Object
Dim B_function As String

Private Sub Command1_Click()
B_function = "start.user.menu()"
Baan4obj.parseExecFunction "otcjubvblink", B_function
End Sub

thnaks
sorabh
Reply With Quote
  #5  
Old 27th September 2003, 09:48
niteshsharma's Avatar
niteshsharma niteshsharma is offline
Junior Member
 
Join Date: Sep 2003
Location: India
Posts: 20
niteshsharma is on a distinguished road
Baan: Baan 4c3 - DB: Oracle - OS: Sun solaris
Question well its good but

Its good to see
but

myself want to know how can i create dll in baan4c3??

thanx
n.s.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERPJewels Hitesh Shah Third Party Products 10 6th November 2006 06:38
NEW: vbcode CODE extensions patvdv About Baanboard.com 3 13th March 2003 12:19
Baan World Users conference in Orlando chadwickh General Discussion & Chat 7 3rd November 2001 22:55
Availability of Web-Based DEM (Baan Press Release) Pierre B. General Discussion & Chat 0 5th September 2001 06:59
BSP-US (LLC) added as a Baan Education Alliance svandenh General Discussion & Chat 1 20th August 2001 20:44


All times are GMT +2. The time now is 19:40.


©2001-2017 - Baanboard.com - Baanforums.com