473,395 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Is It Possible?


From: "Chris Calzaretta" <cc*********@hotmail.com>
Subject: Re: Is It Possible?
Date: Friday, February 04, 2005 11:44 AM

Ok i am posting the code
I need to create a form from this web service
http://24.163.239.122/wsprojecttrack...erobjects.asmx
if you call getloginscreen there is a field called screendecription
that field screendecription has the form code I am trying to create at
runtime

the code that is in the field screendecription is
Imports System.Windows.Forms
Public Class clsLoginScreen
Inherits System.Windows.Forms.Form
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If

MyBase.Dispose(disposing)
End Sub
Private components As System.ComponentModel.IContainer
Friend WithEvents NicePanel1 As PureComponents.NicePanel.NicePanel
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Dim ContainerImage1 As PureComponents.NicePanel.ContainerImage = New
PureComponents.NicePanel.ContainerImage
Dim HeaderImage1 As PureComponents.NicePanel.HeaderImage = New
PureComponents.NicePanel.HeaderImage
Dim HeaderImage2 As PureComponents.NicePanel.HeaderImage = New
PureComponents.NicePanel.HeaderImage
Dim PanelStyle1 As PureComponents.NicePanel.PanelStyle = New
PureComponents.NicePanel.PanelStyle
Dim ContainerStyle1 As PureComponents.NicePanel.ContainerStyle = New
PureComponents.NicePanel.ContainerStyle
Dim PanelHeaderStyle1 As PureComponents.NicePanel.PanelHeaderStyle = New
PureComponents.NicePanel.PanelHeaderStyle
Dim PanelHeaderStyle2 As PureComponents.NicePanel.PanelHeaderStyle = New
PureComponents.NicePanel.PanelHeaderStyle
Me.NicePanel1 = New PureComponents.NicePanel.NicePanel
Me.SuspendLayout()
Me.NicePanel1.BackColor = System.Drawing.Color.Transparent
ContainerImage1.Alignment = System.Drawing.ContentAlignment.BottomRight
ContainerImage1.ClipArt = PureComponents.NicePanel.ImageClipArt.None
ContainerImage1.Image = Nothing
ContainerImage1.Size = PureComponents.NicePanel.ContainerImageSize.Small
ContainerImage1.Transparency = 50
Me.NicePanel1.ContainerImage = ContainerImage1
HeaderImage1.ClipArt = PureComponents.NicePanel.ImageClipArt.None
HeaderImage1.Image = Nothing
Me.NicePanel1.FooterImage = HeaderImage1
Me.NicePanel1.FooterText = "PureComponents NicePanel for .NET WinForms
V1.0."
Me.NicePanel1.ForeColor = System.Drawing.Color.Black
HeaderImage2.ClipArt =
PureComponents.NicePanel.ImageClipArt.PureComponen ts
HeaderImage2.Image = Nothing
Me.NicePanel1.HeaderImage = HeaderImage2
Me.NicePanel1.HeaderText = "NicePanel1"
Me.NicePanel1.IsExpanded = True
Me.NicePanel1.Location = New System.Drawing.Point(0, 0)
Me.NicePanel1.Name = "NicePanel1"
Me.NicePanel1.OriginalFooterVisible = True
Me.NicePanel1.OriginalHeight = 0
Me.NicePanel1.Size = New System.Drawing.Size(400, 264)
ContainerStyle1.BackColor = System.Drawing.Color.FromArgb(CType(142,
Byte), CType(179, Byte), CType(231, Byte))
ContainerStyle1.BaseColor = System.Drawing.Color.Transparent
ContainerStyle1.BorderColor = System.Drawing.Color.FromArgb(CType(1,
Byte), CType(45, Byte), CType(150, Byte))
ContainerStyle1.BorderStyle = PureComponents.NicePanel.BorderStyle.Solid
ContainerStyle1.CaptionAlign = PureComponents.NicePanel.CaptionAlign.Left
ContainerStyle1.FadeColor = System.Drawing.Color.FromArgb(CType(217,
Byte), CType(232, Byte), CType(252, Byte))
ContainerStyle1.FillStyle =
PureComponents.NicePanel.FillStyle.DiagonalForward
ContainerStyle1.FlashItemBackColor = System.Drawing.Color.Red
ContainerStyle1.FocusItemBackColor =
System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(128,
Byte))
ContainerStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif",
8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
CType(0, Byte))
ContainerStyle1.ForeColor = System.Drawing.Color.Black
ContainerStyle1.Shape = PureComponents.NicePanel.Shape.Squared
PanelStyle1.ContainerStyle = ContainerStyle1
PanelHeaderStyle1.BackColor = System.Drawing.Color.FromArgb(CType(9,
Byte), CType(42, Byte), CType(127, Byte))
PanelHeaderStyle1.ButtonColor = System.Drawing.Color.FromArgb(CType(172,
Byte), CType(191, Byte), CType(227, Byte))
PanelHeaderStyle1.FadeColor = System.Drawing.Color.FromArgb(CType(102,
Byte), CType(145, Byte), CType(215, Byte))
PanelHeaderStyle1.FillStyle =
PureComponents.NicePanel.FillStyle.HorizontalFadin g
PanelHeaderStyle1.FlashBackColor =
System.Drawing.Color.FromArgb(CType(243, Byte), CType(122, Byte), CType(1,
Byte))
PanelHeaderStyle1.FlashFadeColor =
System.Drawing.Color.FromArgb(CType(255, Byte), CType(215, Byte), CType(159,
Byte))
PanelHeaderStyle1.FlashForeColor = System.Drawing.Color.White
PanelHeaderStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif",
8.25!)
PanelHeaderStyle1.ForeColor = System.Drawing.Color.FromArgb(CType(169,
Byte), CType(198, Byte), CType(237, Byte))
PanelHeaderStyle1.Size = PureComponents.NicePanel.PanelHeaderSize.Small
PanelStyle1.FooterStyle = PanelHeaderStyle1
PanelHeaderStyle2.BackColor = System.Drawing.Color.FromArgb(CType(102,
Byte), CType(145, Byte), CType(215, Byte))
PanelHeaderStyle2.ButtonColor = System.Drawing.Color.FromArgb(CType(172,
Byte), CType(191, Byte), CType(227, Byte))
PanelHeaderStyle2.FadeColor = System.Drawing.Color.FromArgb(CType(9,
Byte), CType(42, Byte), CType(127, Byte))
PanelHeaderStyle2.FillStyle =
PureComponents.NicePanel.FillStyle.VerticalFading
PanelHeaderStyle2.FlashBackColor =
System.Drawing.Color.FromArgb(CType(243, Byte), CType(122, Byte), CType(1,
Byte))
PanelHeaderStyle2.FlashFadeColor =
System.Drawing.Color.FromArgb(CType(255, Byte), CType(215, Byte), CType(159,
Byte))
PanelHeaderStyle2.FlashForeColor = System.Drawing.Color.White
PanelHeaderStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif",
9.75!, System.Drawing.FontStyle.Bold)
PanelHeaderStyle2.ForeColor = System.Drawing.Color.FromArgb(CType(215,
Byte), CType(230, Byte), CType(251, Byte))
PanelHeaderStyle2.Size = PureComponents.NicePanel.PanelHeaderSize.Medium
PanelStyle1.HeaderStyle = PanelHeaderStyle2
Me.NicePanel1.Style = PanelStyle1
Me.NicePanel1.TabIndex = 0
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(400, 273)
Me.Controls.Add(Me.NicePanel1)
Me.Name = "clsLoginScreen"
Me.Text = "clsLoginScreen"
Me.ResumeLayout(False)
End Sub
Private Sub clsLoginScreen_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub End Class

So that is the code that is being pulled out of the database
It is just a plain form with a nicepanel on it. Which intails need the
nicepanel assembly added.

Here is my code I am using to try to get the form to comile at run time
I make a direct call to the database rather then hitting the web service in
the code below.

Dim cn As OleDbConnection
Dim sConnString As String = _
"Provider=SQLOLEDB;server=vsdev;UID=sa;PWD=sa;data base=projecttracker"
cn = New OleDb.OleDbConnection(sConnString)
Dim ds As New DataSet
Dim cm As New OleDbCommand("select * from tblscreen", cn)
Dim a As New OleDbDataAdapter(cm)
cn.Open()
a.Fill(ds)
cn.Close()
Dim provider As Microsoft.VisualBasic.VBCodeProvider
Dim compiler As System.CodeDom.Compiler.ICodeCompiler
Dim params As System.CodeDom.Compiler.CompilerParameters
Dim results As System.CodeDom.Compiler.CompilerResults
Dim scriptType As Type
Dim instance As Object
Dim rslt As Object
params = New System.CodeDom.Compiler.CompilerParameters
params.GenerateInMemory = True 'Assembly is created in memory
params.TreatWarningsAsErrors = False
params.WarningLevel = 4
'Put any references you need here - even you own dll's, if you want
to use one
Dim refs() As String = {"System.IO", "System.dll",
"Microsoft.VisualBasic.dll", "PureComponents.NicePanel.NicePanel",
"System.Windows.Forms"}
params.ReferencedAssemblies.AddRange(refs)

provider = New Microsoft.VisualBasic.VBCodeProvider
compiler = provider.CreateCompiler
Try
results = compiler.CompileAssemblyFromSource(params,
ds.Tables(0).Rows(0).Item("screendescription").ToS tring)
Catch ex As Exception

End Try
If results.Errors.Count = 0 Then 'No compile errors or
warnings...
mAssembly = results.CompiledAssembly
End If
'Get the type from the assembly. This will allow us access to
'all the properties and methods
Dim err As System.CodeDom.Compiler.CompilerError
For Each err In results.Errors
MsgBox(String.Format( _
"Line {0}, Col {1}: Error {2} - {3}", _
err.Line, err.Column, err.ErrorNumber, err.ErrorText))
Next
scriptType = mAssembly.GetType("clsScreens.clsLoginScreen")

'Set up an array of objects to pass as arguments.
Dim args() As Object = {""}

'And call the static function
rslt = scriptType.InvokeMember("StaticFunction", _
System.Reflection.BindingFlags.InvokeMethod Or _
System.Reflection.BindingFlags.Public Or _
System.Reflection.BindingFlags.Static, _
Nothing, Nothing, args)
So as you can see I pull the form out of the database. It is a windows form.
But I think that I missing some stuff. When you create a form you get a .vb
filr and a ..resx file which i am not createing.
I did not think that you needed to create that file.

If you have any thoughts please let me know
Thank you
CC
"Cor Ligthert" <no************@planet.nl> wrote in message
news:eU**************@TK2MSFTNGP14.phx.gbl...
Chris,

I don't understand what you want to do.
Everything is always created at run time.

In VBNet is this the most simple form

\\\
Public Class Chrisform
Inherits System.Windows.Forms.Form
End Class
///

I hope this helps?

Cor


Nov 21 '05 #1
3 1504
"Crouchie1998" <Cr**********@discussions.microsoft.com> schrieb:
Here is the address details of Road Runner:

[Address snipped]


I always thought that its "forbidden" to post WHIOS details in the public.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Mr MVP,

Are you stalking me? Nice to know you are putting your two-cents in AGAIN

I never knew that whois info is banned in these forums. Where is it written
that its banned?

SPAMMERS look through these forums to try to get e-mail addresses. If the IP
address was ok then why was it in number format?

As I also said, that address is on a real-time SPAM blocking list. Anyone
who clicks that link will probably be added to a SPAM database.

I enjoy fighting SPAM (reversing it) & getting them blocked. If everyone
reported SPAM as I do then no one would get SPAM.

If you report the SPAMMERS like I do, they remove you from their SPAMMING
lists because they don't want their MX's blocked, do they? No, because they
cannot continue to SPAM anyone that way.
Nov 21 '05 #3
"Crouchie1998" <Cr**********@discussions.microsoft.com> schrieb:
I never knew that whois info is banned in these forums. Where is it
written
that its banned?


I never said that it's banned. I only remember that some WHOIS databases
include a text that says that the information returned by the query should
not be made available in the public (even if it's registration data of
spammers' domains).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Julia Briggs | last post by:
I am struggling to create a PHP function that would take a specified image (JPG, GIF or PNG) from a link, and resize it down to a thumbnail so it will always fit in a 200x250 space. I am hoping...
36
by: rbt | last post by:
Say I have a list that has 3 letters in it: I want to print all the possible 4 digit combinations of those 3 letters: 4^3 = 64 aaaa
20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
7
by: Andrzej | last post by:
Is it possible to call a function which name is given by a string? Let assume that I created a program which call some functions for example void f1(void), void f2(void), void f3(void). ...
2
by: Bhupesh Naik | last post by:
This is a query regarding my problem to make a spell and grammar check possible in text area of a web page. We have aspx pages which are used to construct letters. The browser based screens...
1
by: AAA | last post by:
hi, I'll explain fastly the program that i'm doing.. the computer asks me to enter the cardinal of a set X ( called "dimX" type integer)where X is a table of one dimension and then to fill it...
25
by: Piotr Nowak | last post by:
Hi, Say i have a server process which listens for some changes in database. When a change occurs i want to refresh my page in browser by notyfinig it. I do not want to refresh my page i.e....
4
by: RSH | last post by:
Okay my math skills aren't waht they used to be... With that being said what Im trying to do is create a matrix that given x number of columns, and y number of possible values i want to generate...
7
by: Robert S. | last post by:
Searching some time now for documents on this but still did not find anything about it: Is it possible to replace the entry screen of MS Office Access 2007 - that one presenting that default...
14
by: bjorklund.emil | last post by:
Hello pythonistas. I'm a newbie to pretty much both programming and Python. I have a task that involves writing a test script for every possible combination of preference settings for a software...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.