.net - Get Information From A Higher Class?

Jun 2, 2010

I have 3 classes: Server, Database, and Table. Each class has a "Name" property. How I want it to work is that each server can have multiple databases and each database can have multiple tables. So in the Server class I have this property.

[Code]...

View 3 Replies


ADVERTISEMENT

.net Winforms Application, Memory Usage Goes Higher And Higher Never Comes Down?

Sep 27, 2010

We have a .net win forms application, using .net 3.5. Application runs from a terminal server, users access it with Citrix client. when users run this app memory usage goes higher and hiher and it never comes back. even tough we put objects with dispose and set to nothing also the memory usage is not comming down. it starts wuth 75 mb and goes up to 500 mb. it is a 32 bit application.

how can we find the exact problem with the application. the bahaviour is almost same when we run our development box locally.

View 5 Replies

How To Get Information About A Class

Oct 10, 2010

I have created a class called clsTest, this contains the sub "logInfo", when this is called within another class (e.g. "clsOther") some information about the other class is logged to a file.

I want clsTest to be able to get some general information about clsOther, specifically it's type and/or the sub/function that called the "logInfo" sub in clsTest. I could pass these as additional arguments in the "logInfo" subroutine but I was wondering if it was possible for clsTest to know what had invoked it (or any other class for that matter).

View 7 Replies

VS 2008 Exception With Information From A Different Class?

Jan 28, 2010

Here's the code.

[Code]...

i've done research and it's because it's using a GET method instead of a POST method... how the heck do you fix this if your using a FtpWebRequest class!?

View 10 Replies

VS 2008 Getting Information From Calling Method's Class

Apr 11, 2009

I'm working on a base class right now, here's a basic rundown of it:[code]The problem is, in the Public Class bar example, some classes may implement MyInterface, and others don't. What I'd like to be able to do is have the sub New() in the structure in the base class "Foo" be able to tell if the class calling it (either the Base class, or the child class) implements MyInterface or not.

View 8 Replies

C# :: Reference Configuration Information From Within Multiple Class Libraries?

Mar 13, 2009

I've got a bunch of DLL projects that I'm pulling into my application, each contains their own Settings.settings/app.config. When I compile the app and run for debugging, everything works just fine, but come deployment time I can't get my DLLs to read their own settings files.I've been doing some reading and it has become apparent that there's a couple of methods to getting each dll to read its own configuration - one is to dedicate a .dll.config to the library and the other is to embed the dll's configuration in the process.exe.config.I'm having significant issues trying to implement either and I wondered if anyone has any good docs on this - there appears to be a shortage on the Net.

I'd like a separate .dll.config for each of the libraries if possible, but in a pinch, getting each of my libraries to read their own section of the process.exe.config will he right direction because I'm so close to rolling this application out but this stumbling block is causing me a significant headache.Edit: When I merge the configuration files, I start getting TypeInitializer exceptions when I initialize objects withing my libraries. This is likely just me being retarded, but does someone have a working example of a merged config file and some basic demonstrative code for reading it from multiple assemblies?

View 3 Replies

Get Assembly Information For A Class That Is Part Of The Project But Not Executing

May 2, 2011

Two of us at our company worked on a VB project. I developed the GUI interface. Another programmer developed some of the Classes that are also part of the project/Solution. Our manager wants to see as part of the 'Help/About' drop down, the version of the GUI application as well as the Class that the other programmer wrote. We are on the third modification of my GUI application, but the 8th version of the class that the other programmer wrote. Is there some way that the GUI application can get the 'Assembly Version' information for a class that may not necessarily exeuting at any given time?

View 3 Replies

String With FileGet - Class That Pulls The ID3 Information From An MP3 File

Nov 17, 2008

I have a class that pulls the ID3 information from an MP3 file. This information is at the very end of the file in plain ASCII. The original author is using FileGet to retrieve just the last 127 characters of each mp3 file. The issue is that this information is put into strings declared like this...

Public strTag As New String(" ", 3)
Public strTitle As New String(" ", 30)
Public strArtist As New String(" ", 30)

[CODE]...

This part all works fine. But I'm trying to code a property that returns a string like this...

return strTitle & " - " & strArtist

But for some odd reason it is being very strict about the length of the returned string. It usually just returns the strTitle, and not the " - " or strArtist, and if I switch the positions, it will just return strArtist. So obviously both Strings have information in them.

I'm an intermediate programmer, but just breaking into VB.NET. I'm not sure what the New String(" ",30) part does, but it is definitely interfering with the string concatenation that I'm trying to return. Anyone ever had a similar issue?

I've tried String.Copy, String.Concat, etc. I've also tried doing ReadtoEnd(), but it takes forever for just 10 mp3 files, so I can't imagine how long it would take with a whole library. The only thing that slightly works is if I do... return strTitle.SubString(0,5) & " - " & strArtist.SubString(0,5)

But like I said, coincidentally it will only return around 30 characters.

View 6 Replies

VS 2010 - Update Information And Declaring Record In Class

Sep 26, 2011

I have a collection of objects (classes I created), and each one ties to a record in a database. I want an easy way to update the information, so I thought about declaring a record in the class, that would tie to the record on the database. However, I'm having a problem updating it now.

1) Can I declare a global variable for the data context, and leave it open the entire time the program is running? This would solve my problem, but I don't know if I can do that.
2) If not, besides coming up with a complicated class to do this, is there an easier way? Here is an example of what I am trying to do:

VB.NET
Public C as Record
Public Sub GetValue()
Dim SQL As New DBDataContext
Dim X = From T in SQL.Records Select T
[Code] .....

View 1 Replies

Using Delegates To Pass Information Back To UI From Custom Socket Class?

Oct 6, 2010

I am in the process of prototyping a small sockets application, which monitors IT infrastructure (due to in-house financial and deployment restrictions, I am unable to utilise an existing commercial or open-source solution). Basically, I have a server application and associated agent process for communicating heart-beat data to the server. The server application implements a TCP socket class (TCPDevice), which is called from a WinForm. I am aware of the restriction on updating the UI from processes running on separate threads, and that the preferred technique for acheiving this is via the use of Delegates in conjunction with the Invoke method. Having had very little need previously for using Delegates (apart from of course std windows events and the BackGroundWorker control), I am at a loss as to how to do this in the context of my application, and would appreciate some assistance, although it has occurred to me that I could use the backgroundworker for marshalling updates to the UI.

Eventually the application will need to update a grid of devices via feeds from the defined agents, however for the purpose of this exercise simply updating a status bar on the UI will suffice. The section of the code which I believe is relevant to propogating the code to the form is contained in the OnDataReceived method.Below is a code excerpt from the protoype app which should put the above into appropriate context:

Code from the form:

[code]...

View 1 Replies

VS 2010 Value Higher Than 10?

Apr 20, 2010

For some reason when i run a script to move an image based on an entered value the image stops moving on any value higher than 10, and i cant figure out why. here is a sample script

Sub RedmoveClick(sender As Object, e As EventArgs)
Dim X As Integer
Dim y As Integer

[Code].....

View 10 Replies

Using WebClient Class, Put Information Into Search Bar. Click Button And Download First Link Shown?

Nov 20, 2011

Using the Visual basic browser I would simply, at least for the input of information.

If WebBrowser1.Document.GetElementById("Input") Is Nothing Then
Else
Dim txt As HtmlElement = WebBrowser1.Document.GetElementById("Input")[code]....

But in the case of WebClient class, How do I do this ?As I have been told this is so much faster.

View 2 Replies

Display Powers Higher Than 3?

Nov 6, 2010

I've been designing a Interactive Maths Quiz to test students on the modules they've supposedly learnt, but am having trouble getting the textboxes to display the question as i want them.I need to write things like x3 and x-5 but can't get it to work. To get 2 and 3 i copied and pasted off a word document, and that works, it displays it no problem. I tried the same with others and it just displays a box.

View 6 Replies

Possible To Write A Byte Higher Than 255?

Sep 12, 2010

We were currently working with our thesis regarding file compression and selected LZW compression. So far, we know how to work on it but we were stucked on how to write a byte.LZW uses 256 and up for the code table because 0 to 255 was used for a single byte.url...Our problem was we don't know how to write a byte higher than 255, s it possible, and read it as it is? Or, different way on how to do it?

View 1 Replies

Set Z-index At Higher Value But Still It's Not Working

Apr 10, 2010

I have one webusercontrol for Datepicker. When I am using this control in content pages it works fine. I have many controls in content page (textbox, label, etc.). All controls are inside a table. I have placed usercontrol inside <td>. When I click on an image, the calendar control is showing. But that time this calender control pushes all other controls (textbox, label, etc.). I have set the z-index at a higher value, but still it's not working.

View 1 Replies

VS 2008 If Number Is Higher Then 1?

Apr 11, 2009

okay say textbox2.text = "8" if textbox1.text is higher then textbox2.text the msgbox("g")so if textbox2.text = ("9") then msgbox("g") would pop up cause it's a higher number but ifit = "7" then nothing how do i do that

View 2 Replies

DB/Reporting :: Write A Data Layer Class To Read In Information And Populate Combo Boxes?

Feb 3, 2012

I'm trying to learn how to write a data layer class to read in information and populate combo boxes, etc.

View 1 Replies

Get A Total Sum Either Higher/lower In Their Textboxes?

Mar 24, 2010

Heres my code so far:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

I want the total sum entered for (Val(InputBox("Enter sales amount:"))) that is lower than 1200 to go in a TextBox2.Text and the total sum higher than 1200 to go in a TextBox3.Text.How should I go about doing that? Is there a way of doing it in the Select Case area?

View 11 Replies

Get Average Either Higher / Lower In Their Textboxes?

Mar 25, 2010

Heres my code so far[code]...

I want the average above 1200 going in a TextBox5.Text and the average lower than 1200 TextBox6.Text.

I've tried stuff like; "average1 = average1 + average" and "average1 = total1 / subject" and average 1 = total1 / subject1". But none of it appears to be working.

View 14 Replies

Timer Setting Always Value Higher On Label

Mar 11, 2009

I want to say the timer count the time the Process is working so that it Counts always higher on a Label with the Text 00:00:00. So it always go higher by 5ms:
00:00:10
00:00:15
00:00:20
00:00:25
and so on.

View 9 Replies

VS 2008 Form Goes Haywire If DPI Is Higher?

Jan 26, 2010

I need help with my forms developed in vb.net 2008. If I run a form in any machine (regardless of xp/vista or Win 7) whereby the DPI is set higher than normal then the size of most of my forms goes haywire. For example: I am attaching 2 screenshots of my updater program. One screen shot shows program being run in normal dpi and the other one shows it being run in higher DPI settings. In the latter case the form sizes shrinks and it looks so weird. In some other forms the controls go haywire. What should I do to ensure that forms looks ok regardless of what ever DPI a user sets in his OS?

(Note: some texts in the screenshot have been edited to protect privacy).

View 10 Replies

VS 2010 ComboBox.SelectedIndex Can't Go Higher Than 9?

Apr 24, 2012

I'm working with a ComboBox which has 14 items.

Using the following code I got a problem

vb
If Me.ComboBox1.SelectedIndex = 0 Then MsgBox("item 1")ElseIf Me.ComboBox1.SelectedIndex = 1 Then MsgBox("item 2") '...ElseIf Me.ComboBox1.SelectedIndex = 9 Then MsgBox("item 9") ElseIf Me.ComboBox1.SelectedIndex = 10 Then MsgBox("item 10") '...End If

The problem is that after the SelectedIndex = 9 it won't read properly the SelectedIndex = 10, it seems like it consider only the first number (1) instead of the whole one (10). In fact get the same result as if it was SelectedIndex = 1

View 6 Replies

Higher Or Lower Card Game Program?

Jan 15, 2012

I am currently working on a program for a higher or lower card game. I have my game set up and in place, however I am having trouble keeping track of the cards that have already been drawn from the deck. I am only playing with one deck and need to make sure that once a card is drawn it is placed in a discard pile and will not be drawn again. I did not post my code due to other students in my class using this forum for their version of the assignment. If someone would be willing to take a look at my code I can send it to you via private message.

View 1 Replies

Start Up Program From Registry With Higher Priority?

Aug 3, 2010

I've got my program running, but when I start it up on Vista, it does so quite slow. I need it to start up faster, I was fiddling around in task manager to check it was actually started and just taking a while, and I noticed it had the priority "BelowNormal", which I'd like to change.

How can I do this from the registry? I've got it starting up, but how do I add a parameter for the process to be started with a higher priority (I.E, normal, abovenormal, high, realtime, etc., I need to test which is suitable).

View 16 Replies

Create Software In Standard Form Which Has A Higher Probability To Run In All Pc's

Apr 10, 2011

I am making a new vb.net project . And 1 thing i have noticed many times is The software that i make in high resoltion computer lloks crap in computers with monitor resoluton of 800 by 600.Is there any way we can create software in standard form which has a higher probability to run in all pc's...I can think of 1 way i guess using monitor height and monitor width from properties and then adjusting form size relative to that

View 2 Replies

TIMEDIFF - Difference Between Entrystamp And Moded_time Is Higher Than 5 Minutes

Jun 12, 2011

More like general MySQL than vb.net itself, but still need help.

The MySQL code below:
SELECT *
FROM (SELECT resit_no,SUBSTRING(resit_time,1,19) AS entrystamp
FROM DB1.receiptdetails

[CODE]...

produces:

[CODE]...

Notice the two rows at the bottom. the difference between entrystamp and moded_time is higher than 5 minutes. why would it happen and how to correct it? both table and database use InnoDB.

View 1 Replies

VS 2008 - Loop Through Integers To Display Higher Number

Mar 26, 2012

I would like to loop through a number of integers to display the higher number, I would not know the higher or the lower number. How could I compare them to pick the higher one.

View 9 Replies

'System.StackOverflowException' When Writing Data To SerialPort At Higher Baudrates?

Nov 24, 2010

I am writing a serial application using VB .net Framework V4 , where I use a background worker to Read a file and send it to a serial port using SerialPort1.writeLine method. The BackgroundWorker1.ProgressChanged Event handler sub Updates the Line Number to a TextLabel and adds each line sent to a RichTextBox using RichTextBox1.AppendText() method on main form (Form1).

The problem arises at 115200 Bauds (and higher),may be because now the text is updated real fast on the form an unhandled Exception in BackgroundWorker1.ProgressChanged Event handler sub occurs. Otherwise at lower baudrates ex: 9600,19200 etc. Application Runs Perfectly Fine.

[Code]...

View 6 Replies

VS 2010 Higher Level Of Access Makes Program Dysfunctional

Mar 13, 2011

So I have this program which I can use to drag files in it and do something with it, and when I run it as administrator, it doesn't let me drag the files in at all, but when I run it normally it does. Is there a reason behind this? And how would I go about fixing it?

My code if it means anything:

Imports System.IO
Public Class Form1
Dim SetSU As Microsoft.Win32.RegistryKey

[Code]......

View 5 Replies

Parsing Through List, Compare 2 Dimensional Array Element And Replace With Higher Value?

Mar 23, 2008

unordered text file of 3 columns to assign into 2 arrays. I've been given a graphing component which expects a two dimensional array for a scatter graph for the set of values in the last column.

How would I parse through the list given an indexed array of 215 possible 'zone alarm locations' and if an alarm log list item, of which there can more than one for any given zone location, compare in the two dimensional array any previous value and replace it with the higher valued one? The following are my declarations for the 2 arrays. It isn't clear to me why the array for the scatter data was defined as (999,1) knowing there are only 215 possible x values (alarm zone locations)

[Code]...

View 6 Replies







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