473,748 Members | 6,664 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is It Possible?


From: "Chris Calzaretta" <cc*********@ho tmail.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 screendecriptio n
that field screendecriptio n has the form code I am trying to create at
runtime

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

If disposing Then
If Not (components Is Nothing) Then
components.Disp ose()
End If
End If

MyBase.Dispose( disposing)
End Sub
Private components As System.Componen tModel.IContain er
Friend WithEvents NicePanel1 As PureComponents. NicePanel.NiceP anel
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
Dim ContainerImage1 As PureComponents. NicePanel.Conta inerImage = New
PureComponents. NicePanel.Conta inerImage
Dim HeaderImage1 As PureComponents. NicePanel.Heade rImage = New
PureComponents. NicePanel.Heade rImage
Dim HeaderImage2 As PureComponents. NicePanel.Heade rImage = New
PureComponents. NicePanel.Heade rImage
Dim PanelStyle1 As PureComponents. NicePanel.Panel Style = New
PureComponents. NicePanel.Panel Style
Dim ContainerStyle1 As PureComponents. NicePanel.Conta inerStyle = New
PureComponents. NicePanel.Conta inerStyle
Dim PanelHeaderStyl e1 As PureComponents. NicePanel.Panel HeaderStyle = New
PureComponents. NicePanel.Panel HeaderStyle
Dim PanelHeaderStyl e2 As PureComponents. NicePanel.Panel HeaderStyle = New
PureComponents. NicePanel.Panel HeaderStyle
Me.NicePanel1 = New PureComponents. NicePanel.NiceP anel
Me.SuspendLayou t()
Me.NicePanel1.B ackColor = System.Drawing. Color.Transpare nt
ContainerImage1 .Alignment = System.Drawing. ContentAlignmen t.BottomRight
ContainerImage1 .ClipArt = PureComponents. NicePanel.Image ClipArt.None
ContainerImage1 .Image = Nothing
ContainerImage1 .Size = PureComponents. NicePanel.Conta inerImageSize.S mall
ContainerImage1 .Transparency = 50
Me.NicePanel1.C ontainerImage = ContainerImage1
HeaderImage1.Cl ipArt = PureComponents. NicePanel.Image ClipArt.None
HeaderImage1.Im age = Nothing
Me.NicePanel1.F ooterImage = HeaderImage1
Me.NicePanel1.F ooterText = "PureCompon ents NicePanel for .NET WinForms
V1.0."
Me.NicePanel1.F oreColor = System.Drawing. Color.Black
HeaderImage2.Cl ipArt =
PureComponents. NicePanel.Image ClipArt.PureCom ponents
HeaderImage2.Im age = Nothing
Me.NicePanel1.H eaderImage = HeaderImage2
Me.NicePanel1.H eaderText = "NicePanel1 "
Me.NicePanel1.I sExpanded = True
Me.NicePanel1.L ocation = New System.Drawing. Point(0, 0)
Me.NicePanel1.N ame = "NicePanel1 "
Me.NicePanel1.O riginalFooterVi sible = True
Me.NicePanel1.O riginalHeight = 0
Me.NicePanel1.S ize = 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.Transpare nt
ContainerStyle1 .BorderColor = System.Drawing. Color.FromArgb( CType(1,
Byte), CType(45, Byte), CType(150, Byte))
ContainerStyle1 .BorderStyle = PureComponents. NicePanel.Borde rStyle.Solid
ContainerStyle1 .CaptionAlign = PureComponents. NicePanel.Capti onAlign.Left
ContainerStyle1 .FadeColor = System.Drawing. Color.FromArgb( CType(217,
Byte), CType(232, Byte), CType(252, Byte))
ContainerStyle1 .FillStyle =
PureComponents. NicePanel.FillS tyle.DiagonalFo rward
ContainerStyle1 .FlashItemBackC olor = System.Drawing. Color.Red
ContainerStyle1 .FocusItemBackC olor =
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.Regul ar, System.Drawing. GraphicsUnit.Po int,
CType(0, Byte))
ContainerStyle1 .ForeColor = System.Drawing. Color.Black
ContainerStyle1 .Shape = PureComponents. NicePanel.Shape .Squared
PanelStyle1.Con tainerStyle = ContainerStyle1
PanelHeaderStyl e1.BackColor = System.Drawing. Color.FromArgb( CType(9,
Byte), CType(42, Byte), CType(127, Byte))
PanelHeaderStyl e1.ButtonColor = System.Drawing. Color.FromArgb( CType(172,
Byte), CType(191, Byte), CType(227, Byte))
PanelHeaderStyl e1.FadeColor = System.Drawing. Color.FromArgb( CType(102,
Byte), CType(145, Byte), CType(215, Byte))
PanelHeaderStyl e1.FillStyle =
PureComponents. NicePanel.FillS tyle.Horizontal Fading
PanelHeaderStyl e1.FlashBackCol or =
System.Drawing. Color.FromArgb( CType(243, Byte), CType(122, Byte), CType(1,
Byte))
PanelHeaderStyl e1.FlashFadeCol or =
System.Drawing. Color.FromArgb( CType(255, Byte), CType(215, Byte), CType(159,
Byte))
PanelHeaderStyl e1.FlashForeCol or = System.Drawing. Color.White
PanelHeaderStyl e1.Font = New System.Drawing. Font("Microsoft Sans Serif",
8.25!)
PanelHeaderStyl e1.ForeColor = System.Drawing. Color.FromArgb( CType(169,
Byte), CType(198, Byte), CType(237, Byte))
PanelHeaderStyl e1.Size = PureComponents. NicePanel.Panel HeaderSize.Smal l
PanelStyle1.Foo terStyle = PanelHeaderStyl e1
PanelHeaderStyl e2.BackColor = System.Drawing. Color.FromArgb( CType(102,
Byte), CType(145, Byte), CType(215, Byte))
PanelHeaderStyl e2.ButtonColor = System.Drawing. Color.FromArgb( CType(172,
Byte), CType(191, Byte), CType(227, Byte))
PanelHeaderStyl e2.FadeColor = System.Drawing. Color.FromArgb( CType(9,
Byte), CType(42, Byte), CType(127, Byte))
PanelHeaderStyl e2.FillStyle =
PureComponents. NicePanel.FillS tyle.VerticalFa ding
PanelHeaderStyl e2.FlashBackCol or =
System.Drawing. Color.FromArgb( CType(243, Byte), CType(122, Byte), CType(1,
Byte))
PanelHeaderStyl e2.FlashFadeCol or =
System.Drawing. Color.FromArgb( CType(255, Byte), CType(215, Byte), CType(159,
Byte))
PanelHeaderStyl e2.FlashForeCol or = System.Drawing. Color.White
PanelHeaderStyl e2.Font = New System.Drawing. Font("Microsoft Sans Serif",
9.75!, System.Drawing. FontStyle.Bold)
PanelHeaderStyl e2.ForeColor = System.Drawing. Color.FromArgb( CType(215,
Byte), CType(230, Byte), CType(251, Byte))
PanelHeaderStyl e2.Size = PureComponents. NicePanel.Panel HeaderSize.Medi um
PanelStyle1.Hea derStyle = PanelHeaderStyl e2
Me.NicePanel1.S tyle = PanelStyle1
Me.NicePanel1.T abIndex = 0
Me.AutoScaleBas eSize = 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.EventArg s) 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=SQLOL EDB;server=vsde v;UID=sa;PWD=sa ;database=proje cttracker"
cn = New OleDb.OleDbConn ection(sConnStr ing)
Dim ds As New DataSet
Dim cm As New OleDbCommand("s elect * from tblscreen", cn)
Dim a As New OleDbDataAdapte r(cm)
cn.Open()
a.Fill(ds)
cn.Close()
Dim provider As Microsoft.Visua lBasic.VBCodePr ovider
Dim compiler As System.CodeDom. Compiler.ICodeC ompiler
Dim params As System.CodeDom. Compiler.Compil erParameters
Dim results As System.CodeDom. Compiler.Compil erResults
Dim scriptType As Type
Dim instance As Object
Dim rslt As Object
params = New System.CodeDom. Compiler.Compil erParameters
params.Generate InMemory = True 'Assembly is created in memory
params.TreatWar ningsAsErrors = False
params.WarningL evel = 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.Visu alBasic.dll", "PureComponents .NicePanel.Nice Panel",
"System.Windows .Forms"}
params.Referenc edAssemblies.Ad dRange(refs)

provider = New Microsoft.Visua lBasic.VBCodePr ovider
compiler = provider.Create Compiler
Try
results = compiler.Compil eAssemblyFromSo urce(params,
ds.Tables(0).Ro ws(0).Item("scr eendescription" ).ToString)
Catch ex As Exception

End Try
If results.Errors. Count = 0 Then 'No compile errors or
warnings...
mAssembly = results.Compile dAssembly
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.Compil erError
For Each err In results.Errors
MsgBox(String.F ormat( _
"Line {0}, Col {1}: Error {2} - {3}", _
err.Line, err.Column, err.ErrorNumber , err.ErrorText))
Next
scriptType = mAssembly.GetTy pe("clsScreens. clsLoginScreen" )

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

'And call the static function
rslt = scriptType.Invo keMember("Stati cFunction", _
System.Reflecti on.BindingFlags .InvokeMethod Or _
System.Reflecti on.BindingFlags .Public Or _
System.Reflecti on.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******** ******@TK2MSFTN GP14.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 1527
"Crouchie19 98" <Cr**********@d iscussions.micr osoft.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
"Crouchie19 98" <Cr**********@d iscussions.micr osoft.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
14472
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 not to have it inserted or read from a database to do this function. Can it be done & someone please help me?
36
9474
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
2510
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 the site, and then i have to select the file to upload.. i used sendkeys.. and i worked perfect.. BUT ... the computer must be locked for security ( obviusly ) reazons.. so..i think this probable solutions to unlock the computer and run the...
7
2349
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). After some time, I added new function void f4(void).
2
3817
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 provide text area where the user can insert big chunks of text and submit it all to the server paragraph by paragraph. The requirement is to do a Spell Check AND Grammar Check in the text area. I did look at lot of possible third
1
6956
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 with numbers X; then the computer asks me how many subsets i have (nb_subset type (integer)) then,i have to enter for every sebset the card, and then to fill it, we'll have a two tables , one called cardY which contains nb_subset elements,and every...
25
2548
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. every 5 seconds, i just want to refresh it ONLY on server change just like desktop applications do. The problem is that refreshing evry n seconds has to much impact on my web server. The refresh action should be taken only when something
4
7685
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 a two dimensional array of all possible combinations of values. A simple example: 2 - columns and 2 possible values would generate: 0 0
7
3360
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 'templates' (with that big graphic buttons) - with some sort of own HTML-Page? I could imagine, that somehow it is possible to change this construction (hopefully not hardcoded in MS-Acc07), like it is possible to edit the 'Fluent Ribbon'? If so...
14
2006
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 I'm testing. I figured that this was something that a script could probably do pretty easily, given all the various possibilites. I started creating a dictionary of all the settings, where each key has a value that is a list of the possible...
0
8987
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9366
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9316
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8239
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.