FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RESOURCE EDITOR why not useing VB.NETs?
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
RESOURCE EDITOR why not useing VB.NETs?
Posted: Thu Jan 10, 2008 08:48 AM
Antonio,
As far as I know resource editors .rc or .res don’t support Font, Color, etc. .

Today I had a look into a “Resource file” from VB.NET which I think is Form3.Designer.vb.
Wouldn’t it be possible to parse the form.designer.vb files to FWH source-code?

Here is the code from a FORM with a command (->button) and a label (-->say).
Best regards
Otto

Me.components = New System.ComponentModel.Container
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.Command1 = New System.Windows.Forms.Button
Me.Label1 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'Command1
'
Me.Command1.BackColor = System.Drawing.SystemColors.Control
Me.Command1.Cursor = System.Windows.Forms.Cursors.Default
Me.Command1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Command1.Location = New System.Drawing.Point(45, 134)
Me.Command1.Name = "Command1"
Me.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command1.Size = New System.Drawing.Size(49, 25)
Me.Command1.TabIndex = 1
Me.Command1.Text = "ZurĂĽck"
Me.Command1.UseVisualStyleBackColor = False
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(40, 36)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(83, 25)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Label1"
'
'Form3
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.SystemColors.Control
Me.ClientSize = New System.Drawing.Size(638, 196)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Command1)
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.Location = New System.Drawing.Point(4, 23)
Me.Name = "Form3"
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Text = "ICECUBE by DATRON Software"
Me.ResumeLayout(False)
Me.PerformLayout()


Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
RESOURCE EDITOR why not useing VB.NETs?
Posted: Thu Jan 10, 2008 02:59 PM

What would be the best way to convert ASCII DESIGNER.CODE to FWH code?
Is there somewhere a demo?

I thought like that:

  1. search for Me.Name in the DESIGNER.CODE and then
    implement code for WINDOW/DIALOG
    oDlg = TDialog():New(,,,,,,, .F.,,,,,, .F.,,,,,, .F. )

  2. search for Me.Controls.Add -> fill an array

  3. EVAL the ARRAY and convert the controls

example: Me.Label1

Me.Label1.AutoSize = True
//not supported here we need a function

Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
::oFont = oFont

Me.Label1.Location = New System.Drawing.Point(40, 36)
nRow, nCol

Me.Label1.Name = "Label1"
bText

Me.Label1.Size = New System.Drawing.Size(83, 25)
nWidth, nHeight

Me.Label1.TabIndex = 2

Me.Label1.Text = "Label1"
nClrText

and so on.

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
rc files and fonts
Posted: Fri Jan 11, 2008 07:02 AM

Do 32 bit resource editors for rc files have the possibility to have different fonts on the controls.
If not which editors do you need for that?
Regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
RESOURCE EDITOR why not useing VB.NETs?
Posted: Fri Jan 11, 2008 09:14 AM

Windows standard resources (.RC, .RES) don't allow to especify fonts for each control. Windows designed them that way

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
RESOURCE EDITOR why not useing VB.NETs?
Posted: Fri Jan 11, 2008 11:58 AM

Thanks for your answer.
If one would like a WYSIWYG editor could a conversation of Form-designer code from C# or VB.NET to FWH objects be a way to go?
Regrads,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
RESOURCE EDITOR why not useing VB.NETs?
Posted: Fri Jan 11, 2008 12:13 PM

Otto,

Yes, you can do that. But you will save a lot of work using standard Windows resources and a resources editor 32 bits like the one provided in VSX isolated.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion