Is it possible to display a cmd window inside the windows form? Visual Basic

If so Can u show me how?
Because i have a .exe i'm trying to open in the Form
the exe open up a command line but i what it to look like this 
01
02
|------------------------------------------------|
03
|           
this is your main form              |
04
|                                               
|
05
|  
/--------------------------------------\     |
06
|  
|######################################|     |
07
|  
|#####the cmd screen is shown here#####|     |
08
|  
|######################################|     |
09
|  
\--------------------------------------/     |
10
|                                               
|
11
|                
[ a button ]                   |
12
|
      the  button run/open the cmd/exe 
       |
13
i do not what it to open up another window
Please help!!!
please and thank you

Hi,
 Here is a simple example you can try. I don`t know when or how you are opening the cmd windows or anything else so it probably is not exactly what you want. You can test it in a new form project with 1 Button and 3 Panels added to it. each time you
press the button it opens another cmd window until the 3 panels are full.  Being i am only using 1 timer it will only allow you to open each cmd window after the timer tick code finds the previously opened cmd window and sets its parent as one of the
panels.
Imports System.Runtime.InteropServices
Public Class Form1
Private WithEvents Tmr As New Timer With {.Interval = 200}
Private Const HWND_BOTTOM As Integer = &H1
Private ProcCnt As Integer = 0
Private CmdWindows(2) As Process
<DllImport("user32.dll", EntryPoint:="SetParent")> _
Private Shared Function SetParent(ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As IntPtr
End Function
<DllImport("user32.dll", EntryPoint:="SetWindowPos")> _
Private Shared Function SetWindowPos(ByVal hWnd As IntPtr, ByVal hWndInsertAfter As IntPtr, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal uFlags As UInteger) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Not Tmr.Enabled And ProcCnt < 3 Then
CmdWindows(ProcCnt) = Process.Start("cmd.exe")
ProcCnt += 1
Tmr.Start()
End If
End Sub
Private Sub Tmr_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Tmr.Tick
Dim pnl As Panel = CType(Me.Controls("Panel" & ProcCnt.ToString), Panel)
If SetParent(CmdWindows(ProcCnt - 1).MainWindowHandle, pnl.Handle) <> IntPtr.Zero Then
Tmr.Stop()
SetWindowPos(CmdWindows(ProcCnt - 1).MainWindowHandle, New IntPtr(HWND_BOTTOM), 0, 0, pnl.ClientSize.Width, pnl.ClientSize.Height, 0)
End If
End Sub
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
For i As Integer = 0 To CmdWindows.Length - 1
Try
If CmdWindows(i) IsNot Nothing AndAlso Not CmdWindows(i).HasExited Then CmdWindows(i).CloseMainWindow()
Catch ex As Exception
End Try
Next
End Sub
End Class
If you say it can`t be done then i`ll try it

Similar Messages

  • How to display properties of dimension on the input form and report in bpc

    Dear Expert,
    Please tell me how to display properties of dimension on the input form and report in bpc. I can only display dimension number.
    thanks so much
    hungth

    Hi Hungh,
    If your are using BPC 10 with EPM add in client, you can use the function:
    EPMDimensionProperty ()
    This function retrieves the properties of a specified dimension in a specified cell range.
    Thanks, Safa

  • Regarding UCF_AcroForm error displayed when trying to open the pdf form

    Hi,
         Iam receiving the pop up when trying to open the pdf form.The Error is Server Error Class: UCF_AcroForm Method: Error.The Error displayed in some system and in some other system the form is working fine.The Form is created using the Designer 8.0.The form is working fine in reader 8.0.Is there any problem in the reader version.Is there any solution for this problem please provide.
    Thanks and Regards,
    SatheshKumar R

    Sathesh,
    Similar issue has been reported at SDN so searching would have helped you. See below threads for solutions:-
    UCF_AcroForm error
    MSS UCF_AcroForm error displayed when trying to display form in PCR
    Chintan

  • SAP Cloud SDK : Display more 500+ character in the PDF form in table cell

    Hi Experts,
    I have requirement in the PDF form.
    Scenario:
    My custom business object
    businessobject DummyObject {
         element ID : ID;
         element FromDate : Date;
         element ToDate : Date;
         node AllActivity [0,n] {
                   element ActivityID : ID
                   element ActivityType : 
                   element Note: Note;
    The above business object have node level data and i under this node level data Activity Id , Activity Type and Notes associated with that activity as show below.
    so as per the above activity i have retrieve the data for the activity and store into my custom business object at node level ( Activity ID  , Activity Name , Activity Type and Notes ) that mentioned above screen.
    I have created 1 form and design in adobe life cycle just Drag and Drop the element from the DataView.
    After completed the print from i have create the preview button to display the data.
    Once i have done all the steps to display the form and click click on preview button i can able to see the data but the under the Note field only display the 256 character not more than that but as per the above screen i have entered the Notes with more than 500+ character.
    In the form design i have also change the property for Note field to Allow Multiple value and Rich Tech but data is not display with all the character.
    Anyone have idea on which data type display the more than 500+ character in the form.
    I am using "Note" data type.
    Can anyone suggest me what the solution to display the proper value in the form.
    Please let me because i am stuck in this issue.
    Many Thank,
    Mithun

    on the BO, add the following line:
    [DependentObject(TextCollection)] node Note;
    in some BO action, where the copying happens:
    var noteFromActivity; // contains the note from the activity
    this.Note.Create();
    var el_note_text : elementsof this.Note.Text;
    el_note_text.LanguageCode = LanguageCode.ParseFromString("EN");
    el_note_text.TypeCode.content = "10006";
    var text = this.Note.Create(el_note_text);
    var content = text.TextContent.Create();
    content.Text.content = noteFromActivity.content;
    To display the content of the textcollection, use the following SAP embedded component:
    /SAP_BYD_APPLICATION_UI/Reuse/Notes/singletextlangedit.EC.uicomponent
    In the embedded component properties, set the TextTypeCode property to "10006".
    Bind the embedded component using node reference binding to the BO containing the TextCollection
    Bind the LanguageCode to a data field containing the language code for english.
    Best regards,
    Ludger

  • Is it possible to display multiple hotmail accounts at the sign-in page?

    I have two windows hotmail accounts and want to display them both at the sign-in page. There is an addon in internet explorer called "windows live sigin assistant" which does this, but it is not compatable with firefox. Is there a quick fix or can a Firefox addon be made?

    A lot depends on how you have designed your application.
    - you can configure your sub-vis to have their FP open when running. Click on the subVI FP icon and select VI Properties. Go to Window appearance, select Customize and then Show Front Panel when called. That way, the FP window will remain open during execution.
    Of course, I suppose that this is not exactly what you are looking for.
    You can use property nodes to open or close programmatically a subVI FP.
    In the Application control subpalette, get Open VI reference, use it to call your subVI, wire the FP.Open property node and you should be almost done. See the attached diagram.
    Message Edité par chilly charly le 10-26-2007 06:42 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    open subvi.png ‏9 KB

  • How to switch on and off displaying of escape sequences in the strings in Visual Studio 2012 during debugging?

    Hi. We have faced a problem on couple of our installations of VS2012. During debugging on these two computers escape sequences in the strings (C++) are not shown (when debugger stops on breakpoint). This creates problems during debugging. On other
    installations escape sequences are shown.
    For example in the first case string value is shown like "abcdef" while in the second case it is shown like "abc\n\t\tdef".
    Where this can be changed?

    This is typically controlled with a format specifier on the debugger expression.  For example, if you have a char* variable called "mystring", then enter the following expressions in your watch window and compare:
    mystring
    "abc\n\tdef"
    mystring,s
    "abc\n\tdef"
    mystring,sb
    abcdef
    the "b" is for "bare" and eliminates quotes and escape sequences.
    There are others such as su, sub, s8, bstr, etc.  See
    Format Specifiers in C++.
    But having said that, now I have to ask:
    Is it native or managed code?
    And where, specifically, in the debugger is this value being displayed?  I ask because there are numerous places where a string can be displayed:  watch window, quick-watch window, data-tips (pinned and unpinned), memory window, text visualizer,
    debug messages, immediate window, command window, etc.
    And, if you are examining a variable, what is its type?   (e.g.: char*, wchar_t*, std::string, std::wstring, etc.)
    And if you are examining a complex debugger expression, what expression did you use?  e.g.: mystring,sb

  • Is it possible to change a report variable inside the sapscript

    Hi
    I have to adapt a sapscript and i need a certain value for a variable.
    For ex ekko-bukrs is empty in the report and i want to change it in the sapscript and give it a value
    i tried the next:
    /: define &ekko-bukrs& = '0001'   but it did not work
    Is it possible to change this variable in sapscript?
    I cannot change the report since it is sap standard.

    Hi Seba,
       you can use perform in the sapscript and then you can achieve your scenario in program.
    see example code below and modify according to your needs,
    /:           PERFORM GET_PURORG_ADDRESS IN PROGRAM ZM_PURCHASE_ORDER-------->call this perform in sap script
    /:           USING &EKKO-EKORG&
    /:           CHANGING &V_EKORG&
    /:           ENDPERFORM
    FORM GET_PURORG_ADDRESS      TABLES in_par  STRUCTURE itcsy------------------>call this in program
                                          out_par STRUCTURE itcsy.
      DATA :V_compcode LIKE <tablename-fieldname>.  
    if compcode is initial.
    then assign here.
      IF v_compcode IS NOT INITIAL.
        out_par-value = v_compcode.
        out_par-name = 'V_COMPCODE'.
        MODIFY out_par INDEX 1.
      ENDIF.
    Edited by: suresh suresh on Jul 30, 2009 11:15 AM

  • How to display all PO data in the PDF form?

    Hi,experts,
    I create a WDJ application with the PDF form for print all PO sheet.
    I can transfer all data from WDJ to PDF form.
    I need continuous print all PO sheet that include header and items.
    After I run the application, I found only the one PO header and one items in the PDF FORM.
    I think the config of the adobe form is error.
    The version of the adobe livecycle designer is 7.1.
    Do you give me some hint?
    Best regards,
    tao

    Hi, Chintan,
    Thanks a lot for your reply so quickly.
    I have check the config of the "Repeat Row for each item" according your word.
    I change the checkbox of the "Repeat Row for each item" for the PO items, and the PO items is ok after I run the application.
    But the pdf is only one PO sheet, not all PO sheet.
    I found the  checkbox of the "Repeat Row for each item" is unabled in the HEADER subform. I think it is the cause for the problem.
    But I don't know how to enable the  HEADER subform because the check box of the "Repeat Row for each item" is unable in the subform of the header.
    Do you give me some hint? Thanks a lot for your help!!!!!
    Best regards,
    tao

  • Is it possible to edit multiple box-shadows inside the Dreamweaver Properties Panel ?

    Is it ?

    Nopes , Only the first one is editable .
    I would suggest you to log a request to us at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    This would help putting this item on our to do list and depending on number of such requests we will consider them for implementation

  • Is it possible to automatically push an iBook inside the bookshelf?

    Here's the scenario:
    my company is producing some iBooks with iBooks Author
    those iBooks are made only for company's employees and are of course free
    we need a solution to push (over the air) those iBooks inside the bookshelf of the iBook app into the employees' iPads
    this process should be transparent for the users/employees: ideally they switch on their iPads and find the iBooks on the bookshelf of the Ibook app
    iBooks store is not an option because information in iBooks is reserved.
    After a lot of rerearch I've not yet found a solution to do that (i.e. using an MDM or other tool).
    Do you have any suggestion please?
    Thanks
    Guido

    Hi Guido,
    What about creating a private iTunesU course? Then your employees could download the iTunesU app, join the course and then enable "automatic updates". Then the books would appear and download automatically when added to the iTunesU course by the course instructor.
    Hope this helps,
    Jesse

  • Problems to display a 2nd window using multithreading

    I would like to know how is it possible to display a second window where I can enter a text while the main window continue to display on a graph acquired data - Thank you very much in advance

    > I would like to know how is it possible to display a second window
    > where I can enter a text while the main window continue to display on
    > a graph acquired data - Thank you very much in advance
    There are two ways to get parallel execution. You can use the VI
    Server's Run method to pretty much push the Run button of the VI. This
    isn't the same as a subVI call because it runs in parallel and doesn't
    need to complete before the Run method node returns.
    Another way of doing this is to put the code in parallel and don't put
    them in a loop that has to wait for both to finish.
    Greg McKaskle

  • Is it possible to display Suffix values in ALV Report

    Hi,
    Is it possible to display a suffix value in the output of ALV Report? If so how I can proceed? Please let me know an example.
    Thanks,
    Sekhar.J

    Hi Siddarth,
    I am sorry for the typo. It shold be Sub Script, Not a Suffix.
    Let  us take an example H2O, If we print it in this way it won't be meaning full, So i want to display this like
    H Subscript 2 O. I have a requirement for a column to always to display this kind of values, Is it Possible?
    Thanks,
    Sekhar.J

  • Is it possible to display asterisks instad of characters ?

    Hi,
    I have a nice table with a password column defined as VARCHAR2. I want, in an update form, display asterisks instead of the value of the column.
    Do you know if it is possible ?
    Thank you !
    Christian

    Hi,
    In the "Tabular Form Element" of the "Column Attributes" of the tabulat form, there is not such choice as "Password". I wonder if i should not use a tabular form as a template in order to get the "Password" type.
    Chrisitian

  • Data is not being displayed into DataGridview until Clicked inside the cells

    Hi,
    On a windows form, I have a DataGridView, its columns are auto-generated every time. Data is loaded after the user click a data-load button. However this is NOT working well, the data is not displayed until manually clicked inside the grid cells. The following
    is the code. Could you please help? Thanks!
     private void ButtonTestGrid_Click(object sender, EventArgs e)
                for (int i = 0; i < 10; i++)
                    this.MainDataGrid.Columns.Add(TestHelper.CreateTextBoxColumn("Col" + i.ToString(), 120));
                Dictionary<string, object>[] data;
                data = TestHelper.CreateTestData();
                this.MainDataGrid.EndEdit();
                TestHelper.LoadGridData(this.MainDataGrid, data);
                this.MainDataGrid.Refresh();
     public class TestHelper
            public static DataGridViewTextBoxColumn CreateTextBoxColumn(string name, int width)
                DataGridViewTextBoxColumn column = new DataGridViewTextBoxColumn();
                column.HeaderText = name;
                column.Name = name;
                column.ReadOnly = false;
                column.Width = width;           
                return column;
            public static void LoadGridData(System.Windows.Forms.DataGridView grid, Dictionary<string, object>[] data)
                int index;
                foreach (Dictionary<string, object> row in data)
                    index = grid.Rows.Add();
                    LoadRowData(grid, index, row);            
            public static void LoadRowData(System.Windows.Forms.DataGridView grid, int index, Dictionary<string, object> data)
                string name;
                for (int i = 0; i < grid.Columns.Count; i++)
                    name = grid.Columns[i].Name;
                    if (data.ContainsKey(name))
                        grid.Rows[index].Cells[name].Value = data[name];
            public static Dictionary<string, object>[] CreateTestData()
                Dictionary<string, object>[] dataList = new Dictionary<string, object>[5];
                Dictionary<string, object> data;
                for (int j = 0; j < 5; j++)
                    data = new Dictionary<string, object>();
                    for (int i = 0; i < 10; i++)
                        data.Add("Col" + i.ToString(), i);
                    dataList[j] = data;
                return dataList;

    There are different ways to bind the datagridview control to it's datasource, the question is where and what is your datasource? Is it from a database or XML file, or is it built on runtime...etc? 
    Based on your explanation I can understand that the Datagridview is binding correctly in the code behind since the rows of the grid are created. Because the row of the Datagridview are created only while it is binded correctly to it's datasource. The issue
    of the display seems something different and strange.
    Try also this way by using DataTable one the common ways used:
    static DataTable GetTable()
    // Here we create a DataTable with four columns.
    DataTable table = new DataTable();
    table.Columns.Add("Dosage", typeof(int));
    table.Columns.Add("Drug", typeof(string));
    table.Columns.Add("Patient", typeof(string));
    table.Columns.Add("Date", typeof(DateTime));
    // Here we add five DataRows.
    table.Rows.Add(25, "Indocin", "David", DateTime.Now);
    table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
    table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
    table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
    table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);
    return table;
    Then to bind the above Datatable to the grid control:
    this.MainGrid.DataSource = null;//To clear before bind
    this.MainGrid.DataSource = GetTable();
    Fouad Roumieh

  • Display a Calendar View in the Portale Server

    Hi, we use portal server 6.2 and we want to display a view of the calendar inside a channel of the portal.
    We know that portal have a calendar provider but we really didn't understand how can we use this provider to call a custom view of the calendar.
    Is it possible to display a custom view of the calendar inside a page of the portal ?
    Thanx

    Probably better to be posting this in the Calendar forum.

Maybe you are looking for

  • Unable to display complete heading in top of  page

    Hi, I'm working with hierarchial reports.For this i need to have a top of page with more than 330 chars.I'm getting the top of page for only few columns but the rest of this are not displaying.I even have a huge line-size declared with no standard pa

  • Looking for a way to add a forum to IWeb

    I am creating a neighborhood site for the community I live in. One of the other people helping me organize it had a great idea about adding a community forum/message board for people to communicate on. Does anyone know if this can be done? Any exampl

  • Is the iPod Touch 2nd Gen compatible with current iPhone earbuds with mic?

    I have a friend that wants to talk to me on Skype with an iPod touch 2nd gen, but the earbuds don't have a microphone to talk into. Is the iPhone earbuds with mic compatible with the Touch Gen 2? Thanks.

  • WebHelp not displaying

    We are having problems displaying RoboHelp WebHelp generated from RoboHelp 8 on a non-HTTPS server. They have attributed it to the small bit of XML code that is appended to the beginning of each page. If they strip that off, the page loads fine. That

  • The computer that had my itunes crashed, how do i move it to know one

    I need help, The computer that i had my Itunes on crashed, so how do i get it onto my new one?