Using Excel Methods From .net?

Mar 13, 2012

I have a vb.net program that opens and populates several excel workbooks with charts. I need to set some chart options. So far, I have:

[Code]...

View 1 Replies


ADVERTISEMENT

Mvc - Repository Pattern Implements Methods By Adding Add1 But Should Use Methods Of The Baseclass?

Aug 29, 2011

This is the original code in c#

public class CategoryRepository: RepositoryBase<Category>, ICategoryRepository
{
public CategoryRepository(IDatabaseFactory databaseFactory)
: base(databaseFactory)

[Code]...

Does anyone has an idea what i should change to let it work and let my UserRepository use the methods in RepositoryBase while implementing the IUserRepository?

View 1 Replies

Cant See Available Methods List When Write Object.METHODS?

Jun 24, 2011

I am working with a vb program, but there is something strange on one of my .vb code pagewhen i put the "dot" afther the object name its dont show the methods availables for this objectbut on other vb code pages i can see it. but in this one no.for exmaplethis is a piece of code: Dim sb As New StringBuilder()

View 3 Replies

Making Class Methods Instead Of Instance Methods In .NET?

Mar 29, 2010

I am not sure how clear my question is by the title, but I am trying to make Class methods instead of Instance methods in Visual Basic that way I don't have to waste memory and code creating temporary objects to execute methods that don't need instance variables.

I am not sure if you can do that in VB but I know you can in Objective-C by using either a "+" or "-" sign in front of the method declaration. And in C++ (at least I think, I can't remember) you put the static keyword or const keyword in front of the function.How would I do this in VB if it is possible? Or should I just make a separate set of functions that are not members of a class?

View 2 Replies

2 Different Methods Using Same Object Methods?

Aug 26, 2010

Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim someproc As Process

[Code]...

View 3 Replies

Hook Excel - The Process Excel.exe Doesn't Finish After Close Excel

Jul 20, 2010

I need to access the current instance of MS Excel. To do that, I wrote the following code:

Imports Excel = Microsoft.Office.Interop.Excel
Imports System.Diagnostics
Private _ExcelApp As Excel.Application

[Code].....

The code runs nice, but it has a problem: After the user close the Excel application (click button X - note: no other instance of Excel exists), if you open the Windows's task manager, its possible to see the process Excel.exe.

If I open and close the Excel application, there is no process Excel.exe, but if I run my code with the Excel application openned, after the user close the Excel application, the process Excel.exe isn't finished.

View 2 Replies

Use Set And Get Methods In VB?

Oct 10, 2011

I'm kind of confuse on how to use get and set in vb how would i access the get/set method within the class and when i instantiate the class somewhere else? in java i would make a 2 methods call like get_item set_item and i can just use the the method name i made. to retrieve or set within the class/object or when i instantiate it somewhere else. but in vb there is a property method and 2 methods inside(set,get)?

[Code]...

View 1 Replies

.net - Extension Methods In T4?

Mar 28, 2012

I'm trying to use PGK.Extensions in a T4 template in VS2008 for VB.NET and I get:

RemoveAllSpecialCharacters is not a member of string..

My T4 headers:

<#@ template language="VB" hostspecific="false" debug="true" inherits="Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation" #>
<#@ output extension="vb" #>
<#@ assembly name="PGK.Extensions.dll" #> // the dll is found
<#@ import namespace="StringExtensions" #> //Try with and without namespace

[Code]...

View 1 Replies

C# - Using Async Methods Asp.net?

Jul 15, 2010

I have two methods on the page. One AddMessageToInboxOutbox(params[]) and other one SendNewMessageMail(params[]).

Once user sends an message to other other first message is added to DB and then sent to recipient's email. Sometimes SMTP is heavy loaded and it takes up to 5 seconds to get answer from it. I want to enclose SendNewMessageMail(params[]) with async call using other thread or something. I have never done that.

How do i perform this action right in ASP.NET?

View 2 Replies

Extended Methods To A DLL

Feb 26, 2012

I've seen extended .NET method libraries such as this and this.In VB.NET, since you create your extended methods in a Module, How do I make them into a DLL?? (like in those links above) Its not possible to build and get the DLL from a Module.

View 7 Replies

Extended Methods To A DLL?

Feb 27, 2012

I created a couple of extended methods in a VB.NET module. I put them inside a Class, built it and got the DLL. From another program I made a reference to that DLL and imported it using Imports as well.The extended methods appear in IntelliSense and it works but a warning appears in the Error console saying,Could not resolve this reference. Could not locate the assembly "nK0deExtendedMethods". Check to make sure the assembly exists on disk. why this error occurs even though I have referenced the DLL?

This is the Class where I've put my module with the extended method.

Imports System.Runtime.CompilerServices
Imports System.Drawing
Namespace nK0deExtendedMethods

[code]....

And I'm having another doubt. In the Imports statement, I have to mention the DLL's name along with the Namespace name. Like this,

Imports ExtendedMethods.nK0deExtendedMethods

Normally you only have to import the Namespace's name, right?

View 1 Replies

How To Get Methods Name From EventInfo

Oct 5, 2009

Is that posible to get all the methods name that handle by a Load event? I want to get Form1_Load from eventInfo.

Dim form As Form = Form1
Dim eventInfo As EventInfo = form.GetType.GetEvent("Load")
form.GetType.GetMethod("Form1_Load", BindingFlags.NonPublic Or

[code]......

View 10 Replies

How To Use Graphic Methods

Jan 28, 2010

I would like to know how to use the graphic methods:

-DrawString
-DrawLine
-FillRectangle

I am meant to use these in a method called Drawgraph in order to draw a grid and bar chart. How can I go about this? What parameters do I need to send? What variables do I need to declare?

View 1 Replies

Threads In These Two Methods Different?

Jan 23, 2011

Take a look at the code below. Here I create a thread, set its name, and start it:

Private Sub fileCreated(sender As Object, e As FileSystemEventArgs)
Dim processFileThread As Thread = New Thread(AddressOf fileCreatedHelper)
processFileThread.Name = e.FullPath
processFileThread.Start()
End Sub

This is the sub that is the thread: Private Sub fileCreatedHelper()

[Code]...

View 2 Replies

Use Generic Methods In VB?

Apr 24, 2010

In VB.NET when i define a subroutine (or function) , while declaring arguments , a list comes out. Having values ByVal,ByRef,Of,Optional, and ParamArray. Of these five lists , four are better understood except "Of". I searched and found that "Of" is used for Generics .Generic Class or Generic Method.

But i did'nt find any procedure that how to create and use Generic Method in VB.NET. I found same in VB.C# language.

View 16 Replies

Why Use Extension Methods

Jan 7, 2010

I would like to know your opinion on extension methods. Sure, it is a nice feature and makes you feel powerful. It's great to see your own method pop up when typing in a object. But it doesn't really add something new... You can get the job done with normal methods as well. I think extension methods do not belong in object oriented programming. It makes your code easier to read but harder to understand for someone else.

View 2 Replies

.net - Ambiguous Action Methods - ASP.net MVC?

Jul 16, 2009

I am having trouble doing something that is probably pretty simple!I have a stock listing that is done by 1) a simple form with parameters (Index) and 2) an ajax called partial view that displays the list of stock (based on the params).On this same simple form (Index) I have an action link to an "Add Stock" method which calls another form for adding stock.When the user has finished adding the stock I redirect them back to the stock list page (Index).

My issue is that I would like to "remember" the parameters that were initially entered in this form so the user isn't just directed back to a page with blank parameters forcing them to enter them again.I thought I could simply overload the Index method as such:

[Code]...

I get this error: The current request for action 'Index' on controller type 'StockController' is ambiguous between the following action methods:.Now I have read this post and it's answer but I cannot figure out how to implement the solution. Is this solution applicable in my situation? Is there a better way to acheive what I'm trying to do?

View 2 Replies

.net - Can't Reflect On Private Methods?

Jan 5, 2012

So I created this thread: Invoking Private / Protected Methods Via Reflection From The Same Object Instance (or Base) And we got the problem fixed save for private methods. As this may not be the same issue I thought it may be best to post a different question with the full source. It is still a work in progress but it is functional.

[Code]...

So this class is being inherited by a (so far) empty child class and ProcessStage is being called. Notice that ConfirmFormDataIsValid() sub is private. If you run this it will not find this method. If I change it to protected however it works fine.

View 2 Replies

.net - Extension Methods Error ?

Mar 7, 2011

CODE:

View 2 Replies

.net - How To Add Methods To DataGridView Class

Sep 14, 2011

my question is simple. How do i add methods to the standard DataGridView control of VB.NET

I want to add some methods of my own to the class, but i tried inheritance and i get errors. What are the techniques out there to extend native classes in vb net

View 1 Replies

.net - Invoking COM Properties And Methods

Nov 22, 2010

I am trying to dynamically create COM object, call COM method and set COM properties. The COM class is a VB6 ActiveX DLL. The implementation is exactly equal to the VB6 code from this page

[Code]...

View 1 Replies

Accessing Methods Of MDI From Child?

Apr 30, 2012

I have an MDI form which has got a dynamic menu based on various conditions. Clicking one of the menu items open up a child form, as well as changes the menu again specific to the child form. Now, when I close the child form, I should be able to change the menu back to the way it was before opening the child form.

I have the methods to add/remove the menu items under a menu head in the MDI form. What I tried to do is, in the child form_formclosing event call the methods to change back the menu items the way it was before opening the child form. Debugging through the code I can see the methods are getting called, the menu items are getting changed, however, after the form is closed, I see the same menu items which was there when the child form was open. I have no idea why!

Just to give you an idea about the project, its a very simple MDI form with a number of child forms, using Visual Studio 2010, VB.NET platform.

View 3 Replies

Anonymous Methods In .NET - Foreach?

May 16, 2011

I try to replace the classic For Each with the LINQ ForEach method in VB.NET

Dim singles As New List(Of Single)(someSingleList)
Dim integers As New List(Of Integer)
For Each singleValue In singles

[code]....

How should I correctly do it (using anonymous methods = without declare a new function)?

View 2 Replies

Are These Two Vb Methods Identical In Function

Feb 2, 2010

Are these two vb methods identical in function

[Code]....

View 2 Replies

Asp.net Mvc - Can't Create HtmlHelper Methods In MVC App?

Jun 18, 2009

I can't figure out what I'm missing in the following code. I've got a method that should add a (dummy) helper extension:

Imports System.Runtime.CompilerServices
Namespace HtmlHelpers
Public Module HelpExtensions[code]....
But this gives me the following error:

'HelpMe' is not a member of 'System.Web.Mvc.HtmlHelper'.

View 5 Replies

Asp.net Mvc - Combining Extension Methods?

Sep 5, 2009

I'm trying to write 2 extension methods to handle Enum types.One to use the description attribute to give some better explanation to the enum options and a second method to list the enum options and their description to use in a selectlist or some kind of collection.You can read my code up to now here:

<Extension()> _
Public Function ToDescriptionString(ByVal en As System.Enum) As String
Dim type As Type = en.GetType
Dim entries() As String = en.ToString().Split(","c)

[code]....

So my problem is both extension methods don't work that well together. The methods that converts the enum options to an ienumerable can't use the extension method to get the description.

View 1 Replies

C# - Comparison Of Serializing Methods?

Dec 25, 2011

Possible Duplicate: Fastest serializer and deserializer with lowest memory footprint in C#?

I'm using BinaryFormatter class to serialize an structure or a class. (after serialization, I'm going to encrypt the serialized file before saving. (And of course decrypt it before deserialization))But I heard that some other serialization classes are present in .Net Framework. Like XmlSerializer, JavaScriptSerializer, DataContractSerializer and protobuf-net.I want to know, which one is best for me?Less RAM space needed for serialize/deserialize is the most important thing for me. Also speed is important.

View 2 Replies

C# - WebBrowser.DrawToBitmap() Or Other Methods?

Mar 12, 2010

I am trying to capture the content of the WebBrowser control. DrawToBitmap() would work perfectly, but it is not supported in documentation for the WebBrowser control. I have been trying to find another way to capture the contents of the WebBrowser control and save them to a local image file.

Does anyone have any workarounds or other methods to save the contents of the WebBrowser control to a local image file?

View 2 Replies

Calling Methods From The Tabpage In VB

Jun 26, 2009

I have a tab control on first page of which there is a flexgrid. some functions are called which throughout make chages to this flexgrid. now during runtime I create more tabpages with exactly the same Flexgrid (as in I have named it the same as the first one so that I should be able to call the same functions and the same modifications should happen with this flexgrid as well. How should I call the function so that the flexgrid used is the one on my new tabpage. if I just call the function with the code Call functionname(), it modifies the same flexgrid control in the first tabpage and does nothing to the new ones on the newly created tabpages

View 14 Replies

Can't Access Methods From Another Class

Dec 18, 2011

Example ^. I must be forgetting something or being really dumb.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved