Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix .NET Extensions
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix .NET Extensions | New ThreadView:  Search:  
 Author  Thread: MainView from a .net form
Thomas Pleasance
Posts: 12
 
MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 06 7:51 PM
fiogf49gjkf0d
How would i go about creating a new MainView from a .net form (SalesLogix .NET Extensions)
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jun 06 12:15 PM

duloxetine and alcohol abuse

duloxetine alcohol
fiogf49gjkf0d
Well you don't. A common misconception with .NET Extensions is that you can choose .NET as your form type just as you do an Active Form or Legacy one. That is not the case (and one of the reasons why the feature was renamed from .NET Forms to .NET Extensions as well).

However, you can build a main view normally and embed a .NET Form on the detail screen - or any of the screens in the Main View.
[Reply][Quote]
Jon Davis
Posts: 65
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jun 06 4:19 AM

abortion pill online

abortion pill online
fiogf49gjkf0d
You cannot create a MainView per se in .NET, but Main Views are really just specially data-bound MDI children having certain SLX characteristics.

In theory, you should be able to create a Windows Form instance as an MDI child and make the SalesLogix main window the MDI parent--this should cause your .NET form to behave like a MainView in terms of windowing, and should add it to the Window menu. Then after that, optionally you might also try adding it to the MainViews collection, if it takes it (you might have to, if you are able to, implement an interface).

I only say "in theory" because this is something that I have seen done but going about doing it is something that I haven't gotten around to doing just *yet*.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jun 06 9:11 AM

augmentin compresse

augmentin compresse
fiogf49gjkf0d
Quote:
Originally posted by Jon Davis

In theory, you should be able to create a Windows Form instance as an MDI child and make the SalesLogix main window the MDI parent--this should cause your .NET form to behave like a MainView in terms of windowing, and should add it to the Window menu. Then after that, optionally you might also try adding it to the MainViews collection, if it takes it (you might have to, if you are able to, implement an interface).

I only say "in theory" because this is something that I have seen done but going about doing it is something that I haven't gotten around to doing just *yet*.


I've done that many times (not with .NET Extensions yet, but I have done it many times since SLXv3) and it works quite nice with once you get the code ann right so it interacts with it's host as other entities do. I have not yet tried to implement IMainView, but even then, I am not sure you can add it to the collection??? Guess it is just something to try and see
[Reply][Quote]
Thomas Pleasance
Posts: 12
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jun 06 1:04 PM

amlodipin sandoz

amlodipin krka partickcurlingclub.co.uk
fiogf49gjkf0d
Ok i have got a form to open lol... how do i get it to dock as a mid child
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jun 06 2:22 PM

cialis 2015 coupon

cialis coupon
fiogf49gjkf0d
Well, that will be coming in a future article, however, the long and short of it is that you pass the HWND of the form you want to embed the .NET stuff on into the .NET Extension. Then you use the SetParent Win32API to change the parent of your .NET form or UserControl (I recommend using a UserControl) to the HWND of the form in SLX you want to embed on (Make sure you change it back or set the parent to IntPrt.Zero on dispose of your .NET object).
[Reply][Quote]
Thomas Pleasance
Posts: 12
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jun 06 2:44 PM
fiogf49gjkf0d
I think its on your blog somewhere :D well sort off
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jun 06 2:52 PM

lexapro weed effects

lexapro weed effects

prednisolon

prednisolon avonotakaronetwork.co.nz
fiogf49gjkf0d
Hehe. Oh yeah, I forgot I had something like that there: http://saleslogixblog.com/rfarley/archive/2004/04/06/508.aspx

Not exactly the same, but definitely gets you in the right direction.
[Reply][Quote]
Thomas Pleasance
Posts: 12
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jun 06 2:59 PM

dexone

dexone telhelp.ca
fiogf49gjkf0d
Right i have got the form in SLX but not as a child yet.. but soon i hope lol
[Reply][Quote]
Jon Davis
Posts: 65
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Jun 06 2:10 AM

lexapro side effects in men

lexapro side effects
fiogf49gjkf0d
For an MDI child form, you shouldn't need to embed on an SLX view (just set the main window as MDI parent, if that's possible with a non-managed window).

Come to think of it, attaching to an SLX view, though, well, that will certainly alleviate the issues we were discussing above (getting it in the MainView collection, having a BaseTable property, etc).
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Jun 06 9:00 AM

buy naltrexone online cheap

buy naltrexone canada nlspeedskating.com
fiogf49gjkf0d
Quote:
Originally posted by Jon Davis

For an MDI child form, you shouldn't need to embed on an SLX view (just set the main window as MDI parent, if that's possible with a non-managed window).


Right. For the form to be an MDI child, you just need a few things to happen when it loads. Basically, finding the HWND of "MDIClient" which is child of "TmdiMain" (or "SalesLogix" if you go by window text instead of class name). Set that HWND as the parent of the form. Maximize the form, set it's border style to None, and set ChildWindow to true. I find it helpful to also override the CreateParams of the form's base and set it's style to WS_CHILDWINDOW. From there a few other tweaks you can make such as injecting a menu item into the Windows menu so a user can switch to it that way as they do other windows. I also make my nav bar button check for another running existence of the app so if clicked again it just sends a message to the other instance to notify to come to the front of the other child windows again. I will usually make a call to SetWindowText API as well to change the title bar text of the SalesLogix window to match the primary value of my custom "entity" as well. At this point it looks like just about any other MainView. I've never attempted to inherit IMainView and add to the MainView collection, but I sort of doubt that would work anyway (and besides, when I started doing this MainViews didn't exist yet so I didn't/couldn't add this into my library).

All in all it works fairly well. There might be some other gotchas along the way that I've forgotten to mention, but those are about the steps I use (and it all works great with *any* version of SLX).
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Jun 06 9:02 AM
fiogf49gjkf0d
But I agree, I would just go with the idea of building a blank MainView and embedding the .NET form on that. There is certainly less (by far) to have to deal with in that scenario.
[Reply][Quote]
Thomas Pleasance
Posts: 12
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Jun 06 1:02 PM

serevent asthma

serevent accuhaler go
fiogf49gjkf0d
Yeah i was thinking about doing that with a usercontrol just dock it on top of the mainview...
[Reply][Quote]
Jon Davis
Posts: 65
 
Re: MainView from a .net form Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jun 06 6:16 PM
fiogf49gjkf0d
Be wary that you handle OnDestroy (or whatever the event name is) to disassociate and unload the .NET usercontrol from the mainview, or for that matter for any window in SalesLogix that the .NET usercontrol hooked onto, or you may, in theory, come across access violations due to the bound HWND being destroyed.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 1:08:01 AM