Quantcast
Channel: Visual COBOL
Viewing all 5819 articles
Browse latest View live

Forum Post: RE: Select particular cell in Datagridview

$
0
0
The following example appears to work. This sets a flag and saves the current coordinates in the CellEndEdit event but actually changes the current column to the desired one in the Selection_Changed event instead. Currently this simply sets the focus back to the same column that was just edited but it seems to correctly change it to whatever column you set current-col and current-row fields to. class-id testgridrow.Form1 is partial inherits type System.Windows.Forms.Form. working-storage section. 01 current-row binary-long. 01 current-col binary-long. 01 flag-cell-edited condition-value. method-id NEW. procedure division. invoke self::InitializeComponent goback. end method. method-id dataGridView1_CellEndEdit final private. procedure division using by value sender as object e as type System.Windows.Forms.DataGridViewCellEventArgs. set flag-cell-edited to True set current-col to e::ColumnIndex set current-row to e::RowIndex end method. method-id dataGridView1_SelectionChanged final private. procedure division using by value sender as object e as type System.EventArgs. if flag-cell-edited set DataGridView1::CurrentCell to DataGridView1[current-col, current-row] set flag-cell-edited to False end-if end method. end class.

Forum Post: RE: Can't add existing form to project

$
0
0
Which product version are you running and with which version of Visual Studio? I tested this here using Visual COBOL for Visual Studio 2010 V2.2 update 1 and it works fine.

Forum Post: RE: A new Visual COBOL Webinar Series is starting soon

$
0
0
I believe the site that you are referring to is asking you to register to watch the videos and not to register for the webinars. Please enter your user information and then it should give you the actual page where you can view them. Thanks.

Forum Post: RE: A new Visual COBOL Webinar Series is starting soon

Forum Post: listBox (sample C#)

$
0
0
In Visual Cobol i try: - Create a listBox1 - Add Itens:      invoke listBox1::"Items"::"Add"("Item 1")             invoke listBox1::"Items"::"Add"("Item 2") - But now, can i get INDEX from doubleClick event? i try: invoke type MessageBox::Show(listBox1::Text), but, show only TEXT. But a need INDEX (0,1,2,3...)

Forum Post: RE: listBox (sample C#)

$
0
0
OLA CLAUDIO. OTIMO,   SOU JNEVES DE RIBEIRAO PRETO-SP BRAZIL, BAIXEI O VISUAL COBOL FOR ECLIPSE, QDO FAÇO SETUP  FINALIZA COM SUCESSO, DEOIS VEM POUP=UP (unsintall// repair // close, CARA NAO CONSIGO UTIIZAR O VCE 2.2.1 PORQUE??????? ---TENHO URGENCIA !!!!!!!  DEVIDO CURSO VISUAL COBOL

Forum Post: Unhandled Exception

$
0
0
I have a client that is get an unhandled exception 'Method in found Int32 MicroFocus.COBOL.Program.Helper.CompareStrigFig (system.string System.string)' .  I can not get the same error on my development machine.  Do I have a runtime mismatch or is there another error. Thanks

Forum Post: RE: Unhandled Exception

$
0
0
This does look like a runtime mismatch.  The method CompareStringFig is a fairly recent addition to the runtime, so it looks as though the program has been compiled with a more recent version of the product that the runtime.

Forum Post: RE: Can't add existing form to project

$
0
0
Hi Chris I'm using Micro Focus Visual COBOL 2.2 Version 2.2.00244 but without update 1, and as I'm using a trial version (with a Personal license) that is probably the reason. Sorry for taking up your time. Thanks.

Forum Post: RE: listBox (sample C#)

$
0
0
Hi Claudio, Please see the documentation for the Listbox class here as it lists all of the methods, properties and events that are available to you. If this is a single selection Listbox then the following will return the selected index and display it in a textbox. class-id testlistselect.Form1 is partial inherits type System.Windows.Forms.Form. working-storage section. method-id NEW. procedure division. invoke self::InitializeComponent goback. end method. method-id button1_Click final private. procedure division using by value sender as object e as type System.EventArgs. invoke listBox1::"Items"::"Add"("Item 1") invoke listBox1::"Items"::"Add"("Item 2") invoke listBox1::"Items"::"Add"("Item 3") invoke listBox1::"Items"::"Add"("Item 4") end method. method-id listBox1_SelectedIndexChanged final private. procedure division using by value sender as object e as type System.EventArgs. declare selIndex as binary-long = listBox1::SelectedIndex set textBox1::Text to selIndex::ToString end method. end class.

Forum Post: RE: Unhandled Exception

Forum Post: RE: listBox (sample C#)

$
0
0
you provided the link to the microsoft C # documentation. there is the link to the documentation of methods for use in visual cobol?

Forum Post: RE: listBox (sample C#)

$
0
0
Sorry, the .NET Framework classes are a Microsoft product and therefore they are documented by Microsoft. When you use COBOL you are still accessing the same underlying .NET Framework classes and the methods, events and properties are all the same. In COBOL you use a slightly different syntax than in C#. You use the invoke statement to access methods without a returning value. You use set or some other statement to access methods or properties that have a returning value. Thanks,

Forum Post: RE: listBox (sample C#)

$
0
0
How i try to use dataGridView. But i dont know to create column-names. I try: (all whith errors)       set dataGridView1::ColumnCount to 5 (OK)          invoke dataGridView1::Columns::Add::"PriCol"          invoke dataGridView1::Columns::Add('PriCol')           invoke dataGridView1::"Columns"::"Add"::"PriCol"           invoke dataGridView1::Columns::Add("PriCol") Can i do this?

Forum Post: Semantics

$
0
0
Dear Sirs, We are having problem to execute the following in the command Line of Visual Cobol for Eclipse : cob -C "P (cobsql) end-c SQLCheck == SEMANTICS endp" Many Thanks,   PJM

Forum Post: RE: listBox (sample C#)

$
0
0
The Add method on the Columns collection property does not take a string as a parameter, it takes an object of type DataGridViewColumn. You need to create the column objects first and then add them to the grid. The easiest way to see how this is done is to let the designer do this for you and then look at the code that is generated (or just let the designer do it for you) If you open up the datagridview tasks in design mode (click small arrow on top right of control) you will see a link named Add Columns. You can specify the details for each of the columns here. The designer will then generate the required code and place it in the .designer.cbl file. It should look something like the following:       set dataGridView1 to new System.Windows.Forms.DataGridView       set Column1 to new System.Windows.Forms.DataGridViewTextBoxColumn       set Column2 to new System.Windows.Forms.DataGridViewTextBoxColumn       set Column3 to new System.Windows.Forms.DataGridViewTextBoxColumn and then further down there will be a method for adding these new columns to the grid: invoke dataGridView1::Columns::AddRange(table of type System.Windows.Forms.DataGridViewColumn(Column1 Column2 Column3)) The column properties will then be set accordingly: set Column1 :: HeaderText to "Column1" set Column1 :: MaxInputLength to 10 set Column1 :: Name to "Column1"   * Column2 set Column2 :: HeaderText to "Column2" set Column2 :: MaxInputLength to 10 set Column2 :: Name to "Column2" etc.

Forum Post: RE: Semantics

$
0
0
Do you mean in the DevHub product instead of "in Visual COBOL for Eclipse?" On what OS? What is the error that you receive? Thanks.

Forum Post: RE: Semantics

$
0
0
Dear Chris, Enclosed the Error that we Get. TKS

Forum Post: RE: Semantics

$
0
0
The error screenshot does not correspond to the command that you showed in your initial post. Your initial post shows cob which is the command under Unix/Linux which is why I assumed that you were using DevHub. Please see the product documentation under Reference-- Command line reference-- compiling from command line as the cobol command uses different syntax than the cob command. You are also not specifying a program name so it is unclear what you are actually trying to do. From the docs under Data Access-- cobsql the following is an example of how the command line should look when compiling using cobsql and pro*cobol on Windows: cobol testprog p(cobsql) csqlt=ora makesyn end-c      xref=yes mode=ansi endp list(); Thanks.

Forum Post: RE: Using 'Call' in Method

$
0
0
Hi Chris, I am a little confused with this. We have one Winform project for a Menu that should call different Winform projects for every Menu option, and I can not make the call work, I allways receive an error. I really do not want to have a hole solution with all the projects inside. Is that needed or is there a way to call a managed winform solution from another managed winform solution in Visual COBOL? And I need to pass some parameters too. If you have a sample of this situation passing some parameters would be very welcome. Regards
Viewing all 5819 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>