RESOURCE EDITOR why not useing VB.NETs?

RESOURCE EDITOR why not useing VB.NETs?

Postby Otto » Thu Jan 10, 2008 8: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()


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

Postby Otto » Thu Jan 10, 2008 2: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.
User avatar
Otto
 
Posts: 6343
Joined: Fri Oct 07, 2005 7:07 pm

rc files and fonts

Postby Otto » Fri Jan 11, 2008 7: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
User avatar
Otto
 
Posts: 6343
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Fri Jan 11, 2008 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 37 guests