|
Ok, thank you
|
|
|
|
|
Why would you post this question in the VB forum when it is in no way related to VB?
Anyway, the answer to your question is yes. You can install IIS 7 by changing the Windows components in Control Panel.
Paul Marfleet
|
|
|
|
|
pmarfleet wrote: Anyway, the answer to your question is yes. You can install IIS 7 by changing the Windows components in Control
Because I used to write asp.net in vb.
pmarfleet wrote: Why would you post this question in the VB forum when it is in no way related to VB?
ok, thank you
|
|
|
|
|
Roath Kanel wrote: Because I used to write asp.net in vb.
You didn't state this in your original post. Anyway, the VB forum is for questions that specifically relate to VB(.NET). Your question was of a more general nature; it would have been more appropriate to have asked it in the ASP.NET or General Discussion forums. Posting your question in the right forum will greatly increase its chance of being answered.
Paul Marfleet
|
|
|
|
|
Guffa, right. VS2005 comes with a mini web server already, so you really don't need IIS. The only thing you would need it for is if your using IIS specific features.
But, the other poster is also correct. It doesn't matter what language you write your ASP.NET app in, it's STILL an ASP.NET app and should have been posted in that forum. The actualy language has very little to do with just about any ASP.NET question.
|
|
|
|
|
Hi
How can I set the font size of a control dynamically e.g. label. The problem is that the font size property is readonly.
Thanks
reman
|
|
|
|
|
you have to assign a new font to the font (not entirly shure) property:
dim f as new font ("Arial",12,...)
label.font = f
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
You can easily change the Font Size,Style,Family by using any of the following code:
Dim fdlg As New FontDialog()
If fdlg.ShowDialog = DialogResult.OK Then
Me.Label1.Font = fdlg.Font
End If
Alternatively you can change the font by using this code:
Dim _font As New Font("verdana", 24, FontStyle.Italic)
Me.Label1.Font = _font
Hope it helps.
AliAmjad (MCP)
|
|
|
|
|
please try following code for increase font size (Label)
Me.Label1.Font = New System.Drawing.Font("arial", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Size = New System.Drawing.Size(208, 24)
Me.Label1.Text = "Label Font Size Change"
mitesh
|
|
|
|
|
In VB.NET programming how to pass one value(Alphanumeric) to other VB running application's Textbox on the on focus?
By
Arum
|
|
|
|
|
You can do this by Remoting.
AliAmjad (MCP)
|
|
|
|
|
First, are you in control of the source code for the VB app that's receiving this value?? Is it VB6 or VB.NET??
|
|
|
|
|
I have written program for certain applicatio with database in access.i want to create reports and want to ambed in vb.net windowsapplication file. how do i go for that>>?
jjj72
|
|
|
|
|
First you have to learn how to give your posts intelligent titles. Read forum guideline no.3. 'reports' doesn't give anyone a clear enough idea what the nature of your question is.
Secondly, you need to research different reporting tools e.g. Crystal Reports, SSRS etc. and decide if any of them meet your needs. The tools I have mentioned can both be embedded within a Windows application.
If existing reporting tools do not meet your needs, then you could consider writing your own.
Paul Marfleet
|
|
|
|
|
I am trying to write an object whose purpose is to act as a Generic Event Handler. This object has two methods. Register, and Listener
- The first is called Register(inWebControl, inSubscriber). This takes in a WebControl and creates a Dynamic Method to handle specific Events. This Dynamic Method calls the second method.
//basically just call another generic handler -
//Note the Web Controls are eitehr home-grown or 3rd Party or .Net
//all with different Arg Types
- The second method is a Sub that takes a KeyValue as String (generated in the Dynamic Method) the Sender of the Event, and the specific EventArgs Object.
My Code...
Public Class EventManager<br />
<br />
<br />
Public Sub Register(inWebControl as WebControl, inSubscriber as SubscribingObject)<br />
<br />
<br />
Public Shared Sub Listener(inKey As String, Sender As Object, ParamArray Args() As Object)<br />
<br />
End Class
I've seen other examples of this in the C# arena, which I have been able to glean as much as possible to get it to half-way work. I really need some help though in the following areas and specifically how do some of this in VB.net
1. The code below works as long as the Object and method is Shared (Static) , but I would really like to make it work as an instance method.
2. The EventListener method is firing and I get the Key and the Sender , but never get the Arguments .
With all that said -(hopefully enough to trigger help ). Here is the current code that I have that works (and a brief statement of what I "think" is happening).
Public Sub Register(ByVal inControl As WebControl, ByVal inSubscriber As clsWebBinder)
// The Key is what I use to determine who the Subscriber is
Dim Key As String = inSubscriber.Key<br />
Dim BindType As System.Type
//First Generate a Type - I've generated a Module in Memory and now somewhat realize I don't
//need the module or this type, I can just create a dynamic method - but still don't have the
//big picture yet.
Dim m_EventInfo As EventInfo = inControl.GetType.GetEvent(inSubscriber.TargetEventName)
//This is determining the parameters and the data necessary to create the dynamic event
//handling method. Is there a way to debug a dynamic method?
Dim InvokeMethod As MethodInfo = m_EventInfo.EventHandlerType.GetMethod("Invoke")<br />
Dim parms As ParameterInfo() = InvokeMethod.GetParameters()<br />
Dim ParmTypes(parms.Length - 1) As Type<br />
Dim i As Integer<br />
For i = 0 To parms.Length - 1<br />
<br />
ParmTypes(i) = parms(i).ParameterType<br />
<br />
Next i<br />
<br />
Dim tB As TypeBuilder = MyModule.DefineType(Key, TypeAttributes.Class Or TypeAttributes.Public)
//Now I create the Dynamic Method on that Type
//I realize this next section is setup for Static, but it is the only way I know to
// make it work... I really don't have a good understanding of what is going on here
// and couldn't really find any decent help (in vB)
Dim handler As MethodBuilder = tB.DefineMethod("DynamicHandler", MethodAttributes.Public Or MethodAttributes.Static, InvokeMethod.ReturnType, ParmTypes)<br />
<br />
Dim iLG As ILGenerator = handler.GetILGenerator()
//this Emit method loads my Key as the String Value
iLG.Emit(OpCodes.Ldstr, inSubscriber.Key)
//I think this loads the Sender?
iLG.Emit(OpCodes.Ldarg_0)
//I'm not sure what this loads (perhaps the Sender as well?)
iLG.Emit(OpCodes.Ldarg_1)
//I've tried adding a Ldarg_2 to get the arguments, but I get the "Invalid Program" error.
//This executes the Call to Listener and then exits the method
iLG.Emit(OpCodes.Call, Me.GetType().GetMethod("Listener"))<br />
iLG.Emit(OpCodes.Ret)
// This generates the Actual Method and Type in the Dynamic Module
BindType = tB.CreateType
// Now I create a Delegate and Add a Handler
Dim EventHandler As MethodInfo = BindType.GetMethod("DynamicHandler")<br />
Dim dM As [Delegate] = [Delegate].CreateDelegate(m_EventInfo.EventHandlerType, EventHandler)<br />
<br />
m_EventInfo.AddEventHandler(inControl, dM)<br />
<br />
End Sub
Any HELP would be greately appreciated!
|
|
|
|
|
Motobahta wrote: I am trying to write an object whose purpose is to act as a Generic Event Handler
My first question would be, .... why?? I don't see any benefit to this. From what I've seen in this code, all you're doing is adding a layer that gets and event and re-raises it.
|
|
|
|
|
Thanks for the question. As I mentioned in my request, many of the webcontrols are third party, home-grown and .net. Since these change often (upgrades, etc), I do not want the object I am writing, to depend upon the specific references. This class will be used by an object whose sole responsibility is to use reflection to keep the webcontrol and the business objects in sync.
|
|
|
|
|
I've been looking at this, and thinking "what a pain in the ...".
You said you've seen C# implementation of this?? What's stopping you from adding it to your solution as another project and referencing it??
|
|
|
|
|
The first time I try to fill a big datatable with a DataTable.readXML("file") command, it's fast. The next time I try to fill the same datatable from the same file it's really really slow. Any idea why? This seems to happen even though I have completely cleared the datatable before the 2nd read.
Thanks
|
|
|
|
|
it might be that you still have a connection open to the xml file from the first read.
see if you can't close it after reading from it.
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
cstrader232 wrote: This seems to happen even though I have completely cleared the datatable before the 2nd read.
But did you destroy it and create another one??
|
|
|
|
|
OK, let's say I need to destroy and recreate. Can I do that to one datatable of a collection?
Public Shared ChartDataTable(5) As DataTable
or do I have to destroy and recreate the whole collection?
I figured that the datatable.readXML command would automatically close the connection for me. Is that not so?
Thanks!
|
|
|
|
|
cstrader232 wrote: Can I do that to one datatable of a collection?
Of course.
CharDataTable(3) = New DataTable(...)
|
|
|
|
|
I am writing a program using random access files. Is there a way with a Random Access File to do the following:
- Check to see if the file exists, if it does not exist then return an exception?
- What is the difference between opening a random access file and opening file with a stream reader object?
- Can I use a stream reader object to open a random access file?
If a stream reader object does not open a random access file what is the best type of file to use. When I created a stream reader object I got the blue line. What is the stream reader class? Is it already part of VB.Net?
I thought that I would use a random access file because they are faster than a sequential access file.
|
|
|
|
|
There is no such thing as a "random access file". All files can be read using random access. The data in the file might not be meaningful to access using random access, though. A text file for example has to be read as a stream, unless you read the entire file and then decode it into a string.
A StreamReader doesn't read from a file, it reads from a Stream, which in turn may read from a file. A StreamReader reads sequentially from the Stream, and simplifies reading text files for example.
AAGTHosting wrote: Check to see if the file exists
Use the File.Exists method.
AAGTHosting wrote: When I created a stream reader object I got the blue line. What is the stream reader class? Is it already part of VB.Net?
Yes, you find it in the System.IO namespace.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|