RESOURCE EDITOR why not useing VB.NETs?

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

RESOURCE EDITOR why not useing VB.NETs?

Post by Otto »

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._ = New System.Drawing.SizeF(6.0!, 13.0!)
Me._ = System.Windows.Forms._.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()


Image
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

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.
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

rc files and fonts

Post by Otto »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
Post Reply