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
Similar Messages
-
Open Dialog Box in Application Server 9i,form 6i
hello and hi all,
any body help me ,how to make Open Dialog Box in form 6i and application server 9i , and database 9i
regard
mahrwhen i wrote code at form level trigger " LOAD_CALLBACK_TRIGGER "
BEGIN
IF fileuploader.getstatus=fileuploader.finished then
processcustomerbatchdata(FileUploader.getSourceFile);
elsif fileuploader.getstatus=fileuploader.failed then
message('upload failed because :'||fileuploader.geterror);
end if ;
END ;
its gave error processcustomerbatchdata* must be declare* -
MAC OSX 10.9.5: What is this strange file format in the Open Dialog box?
Hello all.
I'd never really noticed this, but I saw a rather unusual file format in the Open dialog box and was wondering why it appeared as it did. It appears as follows from the file/open dialog box:
To be completely transparent, I'd originally posted this image on my twitter feed to @illustrator. Since then I have been in communication with Scott but the advice has been to reinstall Illustrator. If this had happened on one machine, I'd be inclined to agree that this may do something, but since discovering this unusual format, i've since seen it on six macs running OS 10.9.5 and illustrator version 18.1.0 OR 18.1.1
Can anyone else confirm that they see the same thing; or if there is a difference, what this format is meant to actually be. I suspect this is a bug but need confirmation by other users.
ColinThe error occurs on all machines I have tested. 5 of the machines have the suitcase fusion auto-activation plug-in, but one had no plug-ins at all. All software was installed literally "out of the box" from the creative cloud.
UPDATE - tested 3 more machines in the office all running 18.1.1 on OSX 10.9.5 and they ALL do the same thing, all installed with the suitcase fusion auto-activation plug-in, but otherwise installed "out of the box" from creative cloud.
Colin -
Can't see psd thumbnails in the open dialog box.
In the open dialog box, the thumbnails for psd files do not show the picture but show an Elements logo instead. How can I see picture thumbnails for psd files as I do for jpg files? I found a dng codec on the web site but not a psd codec. The dng codec doesn't work for psd files.
Hi,
Is there any error message when you try to map network Drive manually? It would be better to provide more details about error message.
Generally speaking, this problem can be caused by Network Connection problem, please make sure your Client PC could access to Network Drive PC.
In addition, please check Network Drive PC security setting, if there is any firewall policy prevent this operation.
If still no use, please check Event Viewer if it identify this problem.
Roger Lu
TechNet Community Support
There is no error. There is no connectivity problem. THe drives map automatically and always have. I can open up File Explorer and browse these drives all I want. I can open up Word and browse to these drives just fine.
However, when I open certain programs, and click File | Open, the mapped network drives just simply aren't there. I only see C and D and that's it. -
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. -
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 ?
SteveThat 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
> > -- -
Illustrator cc2014 open dialog box won't work yosemite
I have a Macbook Pro Retina 2014 with a fresh install of Yosemite and Creative Cloud, after a while, when I used the open dialog box for 4 or 5 times to open documents, that dialog box won't work anymore, I have to quit and reopen the Illustrator application, the shortcut won't work either. Is anybody got that problem before?
When I was on Mountain Lion, I never got this problem, I presume it's related to Yosemite.Gelouis,
I believe it is a bug in CC2014, appearing when you have the Illustrator open/place dialogue set to column view and sort by date or sort by kind. You may change it to view by name or list view.
https://forums.adobe.com/message/7145022#7145022
https://forums.adobe.com/thread/1723170
https://forums.adobe.com/message/7183002#7183002
Or you may get it right by changing the sort to something else. -
Launching file open dialog box in Forms 6i
hi,
We have to launch file open dialog box using forms 6i within oracle apps
and store the file into the database.
Any ideas?
Thanks,
AZHi azodpe
i have a solution(Source Code) plz give me ur email address
i ll mail u later.
Khurram -
Thumbnails in "OPEN" dialog box too small to see!
The thumbnails are too small in the open dialog box so that I can't see the file I want to open. Yes, you can make them bigger in finder itself...but I am always opening pictures and I just can't see them!
Almost as frustrating as the column issue. The name column is very very wide when I try to open a file.. so I can't sort by the other columns without dragging over the bar at the bottom of the screen. THis is so so frustrating. I resize but it doesn't stick to the next session.
Apple invented the finder. Why is it so inferior to windows explorer?The only solution to enlarging the icons in an application open dialog window is to use the Accessibility panel in System Preferences. Under Zoom, enable Use keyboard shortcuts to zoom.
The first time you have an application open dialog, you press the keys: option + command + = as many times as you want to zoom in. This will enlarge the open dialog window and its contents. When done, press option + command + 8 to restore normal window size. Subsequently, you can alternatively press option + command + 8 to zoom to the previous setting, or return to normal zoom.
This is as good as it is going to get. The applications (not just Apple’s) only use a subset of Finder’s settings in the open dialogs, and these do not include icon enlargement settings, which as you realize, are part of the actual Finder’s settings. The application development frameworks, and not Finder, are remiss in not providing icon size adjustments in open dialog windows.
You can provide feedback to Apple regarding OS X. -
Preview and Open dialog box on initial start of program?
Okay, I understand that it might be beneficial when starting Preview that an open dialog box also pops up. However, I find it VERY annoying that it does it when I double click on a PDF and Preview goes through it's initial startup. It NEVER did this before...am I missing some setting?
I know it may seem like a small annoyance but, for some reason, it really bugs me.Thanks. I guess I wasn't very effective with my search phrases before posting.
It did solve the annoyance but definitely seems like a bug to me. I will post in feedback to Apple since opening a pdf in preview and then automatically opening an open dialog box has no value. It also shouldn't be linked to Documents and Data in icloud being checked or not. -
Under my install of Vista Enterprise on an AD network, I'm am not getting the "computer" option to access local and network drives when I select "File/Open". All I get is the redirected "home" directory for that user. True for all Adobe applications (have the latest Creative Suite 4). Other Windows apps using Windows file/open dialog box can get to the network. Tech support said I should have an option to select the OS dialog box, but I do not see that on my install.
In Edit > Preferences > File Handling, uncheck "Enable Version Cue". This is where you will find it in CS4; earlier versions may have slight variations. In some versions, you may also get a checkbox in the file open dialog (down at the lower left, as I recall) that lets you select OS dialog or Adobe dialog. Also, in Bridge (again CS4), go to Edit > Preferences > Startup Scripts, and uncheck Adobe Version Cue CS4. (I have this unchecked, and even with Enable Version Cue checked in PS I don't get the Adobe dialog or the option to set it, so the setting in bridge seems to be the master.)
-
how do we call an open dialog box when i press F4 in text field to select a file in the hard disk and the selected filename should be placed in the text field
hi
use the function module <b>F4_FILENAME</b>
example code:
DATA: REPID LIKE SY-REPID.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = REPID
DYNPRO_NUMBER = SY-DYNNR
FIELD_NAME = 'P_FNAME'
IMPORTING
FILE_NAME = P_FNAME
EXCEPTIONS
OTHERS = 1.
in reports, use this funct-module under <b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME</b>
in case of module-pool, use this funct-module under <b>PROCESS ON VALUE REQUEST</b> event.
thx
pavan -
File Open Dialog Box Hiding Behind - Urgent
Hi All
We have write code for Opening File in File Open Dialog Box. But its stays in inactive mode behind SBO. Once we press ALT +TAB only then we can see it. How to Activate it or make it visible automatically in SAP Business One.
The Code for Opening File we have written is in C#
<b>OpenFileDialog objOpenFileDialog = new OpenFileDialog();
objOpenFileDialog.InitialDirectory = System.Windows.Forms.Application.StartupPath + "
objOpenFileDialog.Filter = "Excel files (.xls)|.xls";
if(objOpenFileDialog.ShowDialog()!= DialogResult.Cancel)
string ExcelFilePath = objOpenFileDialog.FileName;
}</b>
Thanks in Advance
AsutoshCommon problem... Do the following instead.
System.Windows.Forms.Form form = new System.Windows.Forms.Form();
form.TopMost = true;
OpenFileDialog objOpenFileDialog = new OpenFileDialog();
objOpenFileDialog.InitialDirectory = System.Windows.Forms.Application.StartupPath + "\";
objOpenFileDialog.Filter = "Excel files (*.xls)|*.xls";
if(objOpenFileDialog.ShowDialog(form)!= DialogResult.Cancel)
string ExcelFilePath = objOpenFileDialog.FileName;
That should do it -
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].
-
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
hacmdHi 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.
Maybe you are looking for
-
Problems when selecting an image from a scanned document... please help
I scan student work and I want to make comments. I want to copy a portion of the student work from the scanned PDF. I use preview and select a portion of the PDF. When I paste the selection into pages the entire PDF is put into pages. If I paste into
-
Dear all I want ro export a schema from 10g to import 11g,please brief me steps what should i do to complete my job.
-
I'd like to update my blog via email. Is this an option with my iWeb blog? Thanks, -Jack
-
? I changed my email and my apple id to that email on my computer- now my Iphone and my Ipad will not recognize it nor will they function using the old email and any password?
-
Hi, I can launch the YouTube widget and have the Media Manager installed (just put on the latest version today). When I login to the YouTube widget with my YouTube account (on the TV) I get presented with three options to play some videos. The one I