Open Dialog box on button click using Visual Webpart

Hi,
I am trying to create New Item,Edit Item & Delete Item button in Visual web part.On clicking on the button it should open the corresponding custom form on dialogue box.I don't want to create any button in the ribbon.I just want to create UI page for
all buttons and also corresponding input forms on button click in Visual web part.
Is it possible through visual web part?
I will be needing your initial guidance to achieve this.
Please help.
Thank you.

Hi,
According to your post, my understanding is that you want to open modal dialog in a visual web part.
To open a modal dialog, there are multiple ways, such as using JavaScript.
However, for your scenario, you should register the script from the C# code, there are some articles for this topic, you can refer to them.
http://www.ashokraja.me/articles/How-to-Programmatically-Show-or-Hide-a-Modal-Popup-Dialog-with-Server-Side-Code-in-Share-Point-2013
http://blogs.perficient.com/microsoft/2012/01/sharepoint-2010-closing-a-modaldialog-manually-from-code-c-and-javascript/
More reference:
http://blogs.msdn.com/b/chaks/archive/2011/09/14/modal-dialog-box-in-sharepoint-sandbox.aspx
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support

Similar Messages

  • File Open Dialog Box  on Button Click

    Hi
    I am devloping some webpages using JSF and RichFaces..
    I would like to appear File open Dialog box to choose single file and multiple files and another Folder chooser dialog box to choose the folder content..
    Both the operation should be performed while choosing the Button Choose File and Choose Folder...
    I have already tried Input type = file and aphace tomohawk..
    But i all the components are coming with text box and browse button..
    I dont need that. I need to open the dialog box once i clilck my choose file r folder button and it should work browser indepent.....

    HTML doesn't provide you the possibility to select multiple files or select folders at a single browse. Thus JSF can't do any much for you. Best what you can do is to write a signed applet or web start application which does the task. The Mojarra Scales component library has a ready-to-use component which embeds an applet which does that task. Check [https://scales.dev.java.net/multiFileUpload.html].

  • Opening a LOV dialog box on button click

    How can i open a LOV dialog box on click of a button?
    I tried putting javascript:fun() in button request value but it did not work.
    can it be done using branches?

    Abhishek,
    Unfortunately, the button in a region position will not work as the only submit. But guess what, we don't need to have an item or an Apex button to "put" a button on the page!
    Go into your text item in the Post Element Text place some code like this:
    <span><input type="button" value="Click Me" onclick="myFunction"/></span>You could use a button or an image for a more "custom" look. As for the value of the button, you can update that via your JavaScript code.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Save As / File Open dialog boxes too large to use on laptop

    I have a Macbook Air and am using one of the new Apple LED Cinema Displays, although this problem was also present when I was using my older Apple Studio Display.
    The problem is that some of the system dialog boxes, notably File Open and Save As are huge when I am just using my Macbook with no external screen. They are so big i cant see the lower right drag handle and make them smaller and cant access buttons at the bottom like "New Folder".
    I think this is because I resized the dialog box when I last had my large external monitor connected and now that it is not connected (I'm at home on holiday not at work) I cant find a way to make them reset to their normal size.
    Does anyone know anything that would help? I've had a good search online and also in these forums and havent found anything - but apologies if I've missed an existing open thread.
    Thanks,
    Glenn.

    This did not work for me - and in my case it was the "Export" Save As sheet in Keynote. There is a real solution for this problem. Firstly all user 'preferences' and these are things that include not only preferences set in the application's preferences window but also window position, size, recent items etc. are stored in the preferences .plist file for an application (stored in the users account Library folder) . If an application starts to behave strangely, crashes on start etc. deleting this file while the application is NOT running can often fix a problem. So if a window is in an unusual location or partially off-screen then trashing the file often will fix the problem (BTW - if you are unsure how to find the file activate the Finder and select the "GO" menu -> "Go to Folder" and type ~/Library/Preferences - make sure you are not in the System's preferences folder - deleting these items is typically bad...). Preference files for an application are typically named com.companyname.programname.plist. So for Keynote the plist is com.apple.keynote.plist. Preferences are recreated when the application is launched. Often though this is a bit extreme. If you double click a plist file the "Property List Editor" application will start (at least if you have the developers tools installed - all free and on the Leopard DVD - with a free Apple Developer ID you can also run the most up to date version pre-snow leopard). In the plist editor all of the various options available in the program are listed - ones from the preference panel and other application information. In the case of Keynote (possibly other apps - I haven't checked) the NSNavPanelExpandedSizeForSaveMode key stores the size of the Save/Save As sheet. I downsized from a 17" MBP to a 15" MBP and the string size for this was 682 wide by 843 tall in pixels - my screen is only 900 px and once you consider the space needed for the application menu bar and tool bar the dialog buttons were 'just' barely visible - tauntingly so. I dropped the height to 743, saved the plist and reopened Keynote (remember to edit these while the application is not running - and always save a copy first before editing the file). This worked for me perfectly and unlike other suggestions here provides precision control. Now having said that 1) these files are XML and can be edited using a text editor but the plist editor is much prettier; 2) typically the keys are named using their appropriate Coca names for the property - but each developer can and does write their own code often deviating from Coca - hmm MS, Adobe come to mind - so remember that its good to read through the plist and Google to make sure that you are editing the correct information; 3) plists are automatically recreated if you really screw-up and need to delete - unfortunately in doing so Word will forget that no-one actually likes "when editing automatically select the whole word" so you will need to redo all of those kinds of preference tweaks.
    D.

  • How to get a file save dialog box on button click

    Hi All,
    I have  some text  and I want to write this text in to a  file.Then I want to save this file to my local system using a file save dialog box so that I can choose the location where I want to save this file.Please tell me how can I do this in WebDynpro.
    If I cannot get the File save Dialog Box then how can I give the path while creating the new file so that it is created on my local system  as the application is running on server.
    Regards
    Rahul

    Hi Rahul,
    Sometime back I was also facing the same requirment and there are only two solutions to it one is what Armin suggested to use the file download UI element the other one you can get from this link How to write a file on our local machine using Web Dynpro
    Regards
    Sid

  • Diable "open dialog box" on right mouse click so I can use l mouse to advance to next slide and r mouse click to "go back."  How in PP 2010 for mac????

    I do presentations in PP10.  I am new to macair, and used to Windows.  HOW DO I DISABLE THE "OPEN DIALOG BOX ON RIGHT CLICK"?  I would like to use L mouse to advance slide, and R mouse to go back.  The default is to use R mouse to open dialog box.  I can disable this by unchecking the box in "advanced" on the PC.  How do I do it with the Mac????
    Thanks
    hacmd

    Hi Rod,
    As originally stated in my opening post, the SWF is to be inserted into an Articulate '13 slide (what I called an aggregator originally - I tried not to bring them up since I don't want the chatter about "There's your problem - using Articulate"! ).
    Recall that posting this published file to our LMS did not allow right-mouse click functionality as the flash player menu just gets in the way.
    If I insert the captivate 6 files into Articulate as a Web Object (referencing the entire folder with html, htm and assets, and then posted to our LMS, and it DOES allow RM click operations in both IE and FF (although no sound on the Captivate slide in FF). But this is not what we want to do as this introduces 2 navigation controls (the Captivate one and the Articulate Player).
    Why must anything be posted to a web server for this functionality to work?
    I am able to go into the Captivate 6's published folder, and launch the Captivate demonstration by simply double clicking on the index.html file and this works great in both FF and IE after changing the security settings for flash.
    Again - I can not believe I am the only one out there trying to use the right-mouse click feature to do a software simulation by embedding the Captivate SWF into an Articulate '13 project.

  • How to Use Open Dialog Box, & Save Dialog Box

    Hi Frens,
    Can You tell me how can i use open dialog box, and save
    dialog box using Flex. Because there is no such components are
    given here.
    Also How can i Do when I click on some button, or some event
    Please tell me abt this, Thks in advance frens
    Ashish Mishra

    for input requested try this
    String ar = JOptionPane.showInputDialog("Please, enter artist name");for any sort of message box try this
    int answer = JOptionPane.showConfirmDialog(null, "Enter another record?",
                                "???",JOptionPane.YES_NO_OPTION);This might help you buddy.

  • I would like to use the windows explorer open dialog box instead of the adobe open dialog box. How can I change that?

    I would like to use the windows explorer open dialog box instead of the adobe open dialog box. How can I change that?

    The top screenshot is the Windows Open dialog box. All File > Open... commands in all Windows programs bring it up.   Try File > Open in Notepad for example.
    It belongs to Windows not Adobe. You cannot change this because there is no such thing as an Adobe Open dialog box.
    The bottom screenshot is Windows Explorer. It is Windows' OS File Browser, not an Open dialog.  It is not called up by Photoshop or any Windows program.
    You have to click on "My Computer" or a Folder icon to get to it. You can double-click a psd, jpeg or other image file in the Explorer window so that it opens in Photoshop.
    There is Adobe Bridge and Minibridge   Alt + Ctrl + O or File > Browse in Bridge

  • Every time I click a TXT or PDF file it opens the file and STILL opens the "Open" dialog box

    I have several TXT files I have that track some info for me.  Used to be, like in any OS, I could just double click it and viola, there it is in the text editor.  Ever since Mountain Lion, I open it and it opens fine, then on TOP of that I get ANOTHER open dialog box from text edit with the finder window to let me pick a text file to open.
    I ALREADY opened the file I want so i certainly don't need another unasked for dialog box to open every time.  Same thing with PDF's.  Apparently just about everything that opens with preview or text edit does this.
    I must be missing something since this clearly shouldn't be default behavior.  Anyone have something somewhere I've missed that will stop text edit or preview from prompting me for a file location to open when I've already opened the file I wanted in the first place?
    Thanks for any insight.
    John

    Anyone else hitting it, I finally tracked it to icloud.  Even though I was not using it for anything other than my IOS device backups, somehow it got flagged for "documents" as well.  Killed that and finally preview works as it should without bringing up unwanted open dialog boxes every time I open something.

  • Safari Upload file dialog box lets me click links and buttons on parent window.

    Safari Upload file dialog box lets me click links and buttons on parent window. I can even click Choose file button and open multiple Upload File dialog boxes. How can I show Upload file dialog box as modal?
    Operating system: Windows 7 and Windows XP.

    Safari Upload file dialog box lets me click links and buttons on parent window. I can even click Choose file button and open multiple Upload File dialog boxes. How can I show Upload file dialog box as modal?
    Operating system: Windows 7 and Windows XP.

  • My AI program (CS5 Illustrator 15.1.0) will not open some PDFs. It was working just yesterday, but now will only open a PDF if the graphics of the PDF is visible in the box that appears in the lower left corner of the dialog box after you click Open. The

    My AI program (CS5 Illustrator 15.1.0) will not open some PDFs. It was working just yesterday, but now will only open a PDF if the graphics of the PDF is visible in the box that appears in the lower left corner of the dialog box after you click Open. The file size does not seem to matter. Any ideas?

    Hello Kathie,
    Sorry for the inconvenience that has caused to you.
    Please let me know if you have tried converting any other PDF to word with Reader.
    Alos, please sign up at "https://cloud.acrobat.com/" using your Adobe ID credentials. Click on 'ExportPDF' tab and upload the PDF that you want to convert to Word.
    Let me know if this converts fine.
    Hope to hear from you.
    regards,
    Anubha

  • How to display image using from open dialog box?

    I've developed a program that can display image by named the file that I want to display in my program.
    But how can I display an image from an Open Dialog Box?
    I attch here with my program.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    public class SuDisplayTool6 extends JFrame implements InternalFrameListener,ActionListener
    JTextArea display1;
    JDesktopPane desktop;
    JInternalFrame displayWindow;
    JInternalFrame listenedToWindow;
    static final String SHOW = "Show Image";
    static final int desktopWidth = 800;
    static final int desktopHeight = 600;
    private static final int kControlX = 88 ;
    private DrawingPanel panel;
    public SuDisplayTool6(String title)
    super("Internal Frame");
    desktop = new JDesktopPane();
    desktop.putClientProperty("JDesktopPane.dragMode","outline");
    desktop.setPreferredSize(new Dimension(desktopWidth, desktopHeight));
    setContentPane(desktop);
    addMenu();
    createDisplayWindow();
    desktop.add(displayWindow);
    Dimension displaySize = displayWindow.getSize();
    displayWindow.setSize(desktopWidth, displaySize.height);
    protected void createDisplayWindow()
    JButton b1 = new JButton("Show Image");
    b1.setActionCommand(SHOW);
    b1.addActionListener(this);
    display1 = new JTextArea(3,30);
    display1.setEditable(false);
    JScrollPane textScroller = new JScrollPane(display1);
    textScroller.setPreferredSize(new Dimension(200,75));
    textScroller.setMinimumSize(new Dimension(10,10));
    displayWindow = new JInternalFrame("Header Graph",true,false,true,true);
    JPanel contentPane = new JPanel();
    contentPane.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
    contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
    contentPane.add(Box.createRigidArea(new Dimension(0,5)));
    contentPane.add(textScroller);
    b1.setAlignmentX(CENTER_ALIGNMENT);
    contentPane.add(b1);
    displayWindow.setContentPane(contentPane);
    displayWindow.pack();
    displayWindow.show();
    protected void createListenedToWindow()
    listenedToWindow = new JInternalFrame("Image",true,true,true,true);
    listenedToWindow.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    listenedToWindow.setSize(800,450);
    panel = new DrawingPanel();
    listenedToWindow.setContentPane(panel);
    public void internalFrameClosing(InternalFrameEvent e)
    public void internalFrameClosed(InternalFrameEvent e)
    listenedToWindow = null;
    public void internalFrameOpened(InternalFrameEvent e)
    public void internalFrameIconified(InternalFrameEvent e)
    public void internalFrameDeiconified(InternalFrameEvent e)
    public void internalFrameActivated(InternalFrameEvent e)
    public void internalFrameDeactivated(InternalFrameEvent e)
    public void actionPerformed(ActionEvent e)
    if (e.getActionCommand().equals(SHOW))
    if (listenedToWindow == null)
    createListenedToWindow();
    listenedToWindow.addInternalFrameListener(this);
    desktop.add(listenedToWindow);
    listenedToWindow.setLocation(desktopWidth/2 - listenedToWindow.getWidth()/2,
    desktopHeight - listenedToWindow.getHeight());
    listenedToWindow.show();
    else
    public static void main(String[] args)
    JFrame frame = new SuDisplayTool6("Su Display Tool");
    frame.addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    frame.pack();
    frame.setVisible(true);
    private void addMenu()
    JMenuBar menuBar;
    JMenu menu, submenu;
    JMenuItem menuItem;
    final JFileChooser fc = new JFileChooser();
    fc.addChoosableFileFilter(new ImageFilter());
    menuBar = new JMenuBar();
    setJMenuBar(menuBar);
    menu = new JMenu("File");
    menuBar.add(menu);
    menuItem = new JMenuItem("Open...");
    menu.add(menuItem).addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    int returnVal = fc.showOpenDialog(SuDisplayTool6.this);
    menuItem = new JMenuItem("Save");
    menu.add(menuItem);
    menuItem = new JMenuItem("Save As...");
    menu.add(menuItem).addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    int returnVal = fc.showSaveDialog(SuDisplayTool6.this);
    menuItem = new JMenuItem("Close");
    menu.add(menuItem);
    menu.addSeparator();
    menuItem = new JMenuItem("Exit");
    menu.add(menuItem).addActionListener(new WindowHandler());
    menu = new JMenu("Edit");
    menuBar.add(menu);
    menu = new JMenu("View");
    menuBar.add(menu);
    menuItem = new JMenuItem("Zoom In");
    menu.add(menuItem);
    menuItem = new JMenuItem("Zoom Out");
    menu.add(menuItem);
    menu.addSeparator();
    submenu = new JMenu("Header");
    menuItem = new JMenuItem("CDPX");
    submenu.add(menuItem);
    menuItem = new JMenuItem("SX");
    submenu.add(menuItem);
    menuItem = new JMenuItem("CX");
    submenu.add(menuItem);
    menu.add(submenu);
    menu = new JMenu("Help");
    menuBar.add(menu);
    menuItem = new JMenuItem("About");
    menu.add(menuItem).addActionListener(new WindowHandler());
    private class WindowHandler extends WindowAdapter implements ActionListener
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    if(e.getActionCommand().equalsIgnoreCase("exit"))
    System.exit(0);
    else if(e.getActionCommand().equalsIgnoreCase("About"))
    JOptionPane.showMessageDialog(null,"This program is written by Nenny Ruthfalydia.","About",JOptionPane.PLAIN_MESSAGE);
    class DrawingPanel extends Panel
    final ImageIcon imageIcon = new ImageIcon("image8.jpg");
    Image image = imageIcon.getImage();
    public void paint (Graphics g)
    g.drawImage(image, 10, 10, this);

    so much wrong with this post...
    a) use the code tags to format the code. Now it is an unreadable mess
    b) scriptlets in your JSP. I don't even want to look at that mess. Learn how to combine servlets and JSPs to create clean, readable and maintainable code in which view logic and business logic are separated. The rule: no java code in your JSP, only tags and EL expressions (learn about JSTL).
    So you get a blank screen. When you do "view source" in your browser, do you see anything there? If nothing, check if you are behind a proxy server. The solution to a post of not too long ago was that the blank screen was being caused by faulty proxy server settings (the user figured it out himself, I don't know what was done to solve it).
    If all this fails you will have to do some debugging magic using your favorite IDE. It will probably be something stupid you are overlooking in the code. It is annoying, but debugging code that does not work is a big part of your job. Better get good at it.

  • IPhoto Library in open dialog boxes

    Does the Mac community agree with me that this needs to be better implemented in Mac OS X for new Mac users?
    As the owner of a Mac consulting company in Los Angeles, we have switched about 30 people from PC to Mac this year.
    However, we have encountered a big problem that almost every "newbie Mac user" has when they first switch to the Mac. This is the #1 problem that we encounter with most "newbie" Mac users:
    There is no way to access the iPhoto library from within a standard open dialog box!
    So, week after week, we're witnessing users who have used webmail for years, and aren't quite ready to make the leap to Apple Mail yet. So when they go to attach photos to an outgoing email in their webmail program (Hotmail, Gmail, Yahoo), they'll get an "open" dialog box but absolutely no way of browsing their iPhoto Library in an easy-to-use manner!
    Oh sure, they'll try to click around in their "Pictures" folder inside the "iPhoto Library" folder, but as you know, that folder makes no organizational sense to mere mortals, and is nowhere NEAR the Mac experience that it should be! Even with the improvements in iPhoto 6, that "iPhoto Library" folder still makes no sense.
    So eventually, we tell them that they have to (a) drag their photos from iPhoto onto their desktop or export them if they want them to be a smaller size, (b) attach the files on their desktop from within their open dialog box, and (c) trash the photos from their desktop afterwards.
    But this is too confusing for new Mac users, particularly when it's already much better integrated on Windows, the platform they just switched from!
    New users should be able to **VISUALLY BROWSE** their iPhoto Library right from within any open dialog box, just like you can currently browse your iPhoto Library when you click on the "Media" button inside Pages or Keynote or iWeb or Comic Life.
    Some companies like Snapfish.com have actually addressed this limitation on Apple's behalf, by creating plug-ins for Safari that actually let you browse your iphoto library right from your open dialog box! This is how it SHOULD BE! It's simple as pie, and Snapfish.com should be commended for making up for this serious lack of intuitiveness on Apple's part.
    But Apple really needs to step up to the plate and do this for its users, instead of depending on a few companies here & there to make up for this limitation.
    Of course, we try to get as many new users as possible to use Apple's Mail program for complete integration with their system, but it's just not feasible right off the bat in all cases. For example, if they're a Yahoo webmail user or a HotMail user, it would cost them at least $24.95/year just to get POP access to their email. And regardless of what webmail system they use, not everybody is going to want to switch right away to a dedicated email client.
    Apple really needs to help new users have a great time when switching to the Mac, instead of confusing them, by really thinking these things through and really WATCHING new users in the field struggling with their Macs for the first time. Then, Apple can see that there's little things like this that can make all the difference for someone new to the Mac.
    Thank you,
    Scott
    Power Mac G4 QuickSilver Dual 800 MHz   Mac OS X (10.4.7)  

    Scott:
    Here are two sites, one a thread in the AD and the other a GMail site, on how to use Gmail via the Mail application:
    http://discussions.apple.com/thread.jspa?threadID=580746&tstart=0
    http://mail.google.com/support/bin/answer.py?answer=13275
    This is plugin to be able to access any web based mail that supports the HTTPMail protocol (HotMail and MSN mail at the time of the plugins creation. I'm sure more by now:
    http://www.automagic-software.com/products.php
    and how to make it work with intel Macs:
    http://www.macosxhints.com/article.php?story=20060606023130948&query=Hotmail
    I've not used any of these but you can certainly test them so see if they are as as advertised.
    If a user needs a file via the Finder for a web based email he can Command-click on a thumbnail and select the Show File Contextual menu item. The user will be taken to that folder in the Finder and the file will already be selected. However these will be the full sized files and may be larger than the user wants to send.
    The problem with encouraging users to visually browse and access files in the library folder via the Finder or some browser is that they may be inclined to rename, move or edit them via the Finder or browser an that is committing the cardinal sin of iPhoto: Don't tamper with files in the iPhoto Library folder from the Finder. So for a novice it's safer to have them export the file to the desktop via the File->Export->File Export menu route, resizing as necessary in the process.
    Do you Twango?
    G5 Dual Core 2GHz, 2G RAM, 250G HD; G4 Dual 1Ghz, 1.5G RAM, 80G HD,   Mac OS X (10.4.7)   22 LCD Display, 200G & 160G FW HDs, Canon S400, i850 & LIDE 50, Epson R200

  • Internal error at open dialog box

    Hi All,
    I have created an add-on, there i have given the facility for attachments. When i click on browse button open dialog box opens.
        In some computers when i click on browse button, it gives internal error (-2147467259) occurred -unspecified Error.
    So can any one help on this?
    Regard's
    Hari

    ========
    Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
    Select Case pVal.ItemUID
    Case "Btnbrowse"
    Me.OpenFile()
    end select
    Private Sub *OpenFile*(ByRef BubbleEvent As Boolean)
    Try
    ShowFolderBrowserThread = New Threading.Thread(AddressOf ShowFolderBrowser)
    If ShowFolderBrowserThread.ThreadState = ThreadState.Unstarted Then ShowFolderBrowserThread.SetApartmentState(ApartmentState.STA)
    ShowFolderBrowserThread.Start()
    ElseIf ShowFolderBrowserThread.ThreadState = ThreadState.Stopped Then
    ShowFolderBrowserThread.Start()
    ShowFolderBrowserThread.Join()
    End If
    Catch ex As Exception
    sbo_application.MessageBox("OpenFile" & ex.Message)
    End Try
    Private Sub ShowFolderBrowser()
    Dim MyTest As New OpenFileDialog
    Dim MyProcs() As System.Diagnostics.Process
    Dim filename As String
    MyProcs = process.GetProcessesByName("SAP Business One")
    If MyProcs.Length = 1 Then
    For i As Integer = 0 To MyProcs.Length - 1
    '// WindowWraper concepts are used to access open dialogue box of windows
    Dim MyWindow As New WindowWrapper(MyProcs(i).MainWindowHandle)
    MyTest.Filter = "Excel files (*.xls)|*.xls|Document files (*.doc)|*.doc|Presentation (*.ppt)|*.ppt|Adobe PDF Files (*.pdf)|*.pdf|Text Documents (*.txt)|*.txt" '|All Files (*.)|.*"
    'MyTest.InitialDirectory = "C:\Program Files\SAP\SAP Business One\Attachments"
    '// Initial path for open dialogue box
    '// We can change as per the requirements
    MyTest.InitialDirectory = "C:\Program Files\SAP\SAP Business One\Attachments"
    If MyTest.ShowDialog(MyWindow) = DialogResult.OK Then
    filename = MyTest.FileName
    .your validations........
    Else
    System.Windows.Forms.Application.ExitThread()
    End If
    end sub
    Public Class WindowWrapper
    Implements System.Windows.Forms.IWin32Window
    Private _hwnd As IntPtr
    Public Sub New(ByVal handle As IntPtr)
    _hwnd = handle
    End Sub
    Public ReadOnly Property Handle() As System.IntPtr Implements System.Windows.Forms.IWin32Window.Handle
    Get
    Return _hwnd
    End Get
    End Property
    End Class
    To open the file you can use the follwing code on display button pressed.
    Private Sub *fileopen*(ByVal filename As String)
    '// Opening specified document with reference to the filename distributed
    Try
    System.Diagnostics.Process.Start(filename)
    Catch ex As Exception
    sbo_application.StatusBar.SetText("File Not Found in Specified Path:" & filename, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
    End Try
    End Sub
    ========
    Public Sub SBO_ManageItemEvent( _
      ByVal FormUID As String, _
      ByRef pVal As SAPbouiCOM.ItemEvent, _
      ByRef BubbleEvent As Boolean _
    ) ' Item Event Handler
      Dim oForm As SAPbouiCOM.Form
      oForm = SBO_Application.Forms.Item(FormUID)
      Select Case pVal.EventType
          Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
           Select Case pVal.ItemUID
               Case "btnBrowse"       ' Select file
                If Not pVal.BeforeAction Then
                    Call ShowFolderBrowser(oForm)
                End If
           End Select
      End Select
      oForm = Nothing
    End Sub
    Private Sub ShowFolderBrowser(ByRef oForm As SAPbouiCOM.Form)
      Try
          ' ++++++++++++++++++++++++++++++++++++++++++++++++++
          ' I'm using default path...
          ' ++++++++++++++++++++++++++++++++++++++++++++++++++
          Dim sPath As String = SBO_Company.ExcelDocsPath
          oForm.Freeze(True)
          SBO_Application.Desktop.State = BoFormStateEnum.fs_Minimized
          ' ++++++++++++++++++++++++++++++++++++++++++++++++++
          ' All windows down with command ^M
          ' ++++++++++++++++++++++++++++++++++++++++++++++++++
          Const KEYEVENTF_KEYUP = &H2
          Const VK_LWIN = &H5B
          Call keybd_event(VK_LWIN, 0, 0, 0)
          Call keybd_event(77, 0, 0, 0)
          Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
          Dim fileName As String = ""
          Dim OpenFileDialog As New OpenFileDialog
          OpenFileDialog.Title = "Select Excel File"
          OpenFileDialog.Filter = "Excel files (*.xls)|*.xls"
          If Not sPath.Equals("") Then
           OpenFileDialog.InitialDirectory = sPath
          Else
           OpenFileDialog.InitialDirectory = Me.SBO_FormEventHDL.BdgPathLog  '"C:\"
          End If
          If OpenFileDialog.ShowDialog() = DialogResult.OK Then
           fileName = OpenFileDialog.FileName
           sFileXls = fileName
           ' ++++++++++++++++++++++++++++++++++++++++++++++++++
           ' Here I post getted path into my edittext field
           ' ++++++++++++++++++++++++++++++++++++++++++++++++++
           Dim oEdit As SAPbouiCOM.EditText
           Dim oItem As SAPbouiCOM.Item
           oItem = oForm.Items.Item("eFileName")
           oEdit = oItem.Specific
           oEdit.Value = sFileXls
           oItem = Nothing
           oEdit = Nothing
          End If
      Catch ex As Exception
        ' log exception
      Finally
          oForm.Freeze(False)
          SBO_Application.Desktop.State = BoFormStateEnum.fs_Restore
          System.GC.Collect() 'Release the handle to the table
      End Try
    End Sub

  • Open Dialog Box hiding behind other Apps

    Users frequent find that the GW Open Dialog box hides behind the
    current active screen - Is there a way to make sure it comes to the
    front ?
    Steve

    That works nicely - Thanks ...
    PatM wrote:
    > Can you fix that with the setting that prevents applications from
    > stealing the focus in the Windows registry? If WIN XP, I know you
    > can change that setting easily with Tweak UI to see if it helps. I
    > also let the taskbar button flash until clicked instead of just 3
    > times for situations when it does not come to the front--just to get
    > the users attention. "Steve Babcock" <[email protected]> wrote
    > in message news:C8Lwl.6423$[email protected]..
    > > Users frequent find that the GW Open Dialog box hides behind the
    > > current active screen - Is there a way to make sure it comes to the
    > > front ?
    > >
    > > Steve
    > > --

Maybe you are looking for

  • IOS Remote and Home Sharing problems with iTunes 10.6.3

    I'm having a problem with Home Sharing and the iOS Remote app accessing iTunes since the 10.6.3 update. I have the following: 2011 Mac Mini Server running Lion 10.7.4 and iTunes 10.6.3 IPhone 4 running iOS 5.1 iPad 2 running iOS 5.1.1 Latest model Ap

  • Can't add music. Can't restore. Error messages galore.

    A few weeks ago my husband plugged in his iPod Classic 160GB into my iBook. It began to sync music, as per usual. After a short time there was an error message basically saying it couldn't sync "cannot create/read/write" or something to that effect (

  • Unable to set mailbox forwarder within ECP using Internet Explorer

    We seem to have an issue that has developed where using Internet Explorer we are now unable to set a mailbox forwarder within the ECP. When we use Internet Explorer 11 the following is used to discover the issue: 1. Under mailboxes select any recipie

  • How to browse LR Thumbnails as fast as MediaPro?

    i have a 100,000+ image catalog in both MediaPro and LR on a powerful Mac Pro in MP, i can jump to any spot in the ENTIRE catalog & browse the thumbnails as fast as i can  hit the PageDown/Up button. in LR Grid Thumbnail Mode , it takes a few seconds

  • Portal Runtime Error connecting MDM (Employee repository)

    Hi I'm having difficulty getting our MDM repository (Employee). I keep getting a portal exception when trying to view the repository using iView. I am able to connect to MDM Customers. I call Result Set of customers using an iView. I tried doing same