.NET TimeZoneInfo Object For Indiana Shows They Observe DST?

Apr 26, 2012

Why would the TimeZoneInfo class in .NET show that Indiana observes daylight savings time? I thought that parts of Indiana where EST all the time. Should I be using something other than "US Eastern Standard Time" to represent those parts of Indiana that don't observe DST? [code]

View 1 Replies


ADVERTISEMENT

C# - Get TimeZoneInfo Short Name?

Sep 9, 2009

Is there any method to get the 3 char code from System.TimeZoneInfo.Local?e.g. EDT instead of Eastern Daylight time etc.

View 1 Replies

App In Wn7 - COM Object Gets Executed Fine But Never Shows Up On The Screen

Sep 28, 2011

I am a recent newcomer to VB.net, having moved from VB6 this summer. I am using VS2008 because I also need to develop for WM6 on a ruggged pocket pc. I am not a commercial developer. I only develop apps for my own use, so I can live with some things that I could never survive with on a commercial basis. I developed an app that automates a COM object on my 32 bit WinXP machine. The app runs as expected, whether from the VS2008 IDE or from the executable in the bindebug directory where the supporting files are located. When I installed VS2008 on my new laptop, a 64 bit Win7 Home Premium system, the app still runs fine from the IDE but not from the exe file in bindebug. The problem is that the COM object gets executed fine, but never shows up on the screen.

[Code]...

View 4 Replies

Adding TimeZoneInfo To Combobox And Setting SeletedItem Baffles Me

Mar 16, 2012

So I am populating a combobox with all the computers time zones and then by default selecting the local time zone. I can populate the combobox but the selecting of the default item has me puzzled.[code]So maybe my lack of understanding this but when i bind the collection to the combobox does it not get filled with TimeZoneInfo objects. In other words isn't each list item of type TimeZoneInfo? If so why doesn't the qdx assignment not work? I get back a -1 which means it couldn't find the timezone object in the combobox but it can find it in the tzCollection. I also experimented with .SelectedItem but that didn't pan out either.I'm just not understanding how this is supposed to work. It works now because I think there is a one-to-one mapping from tzCollection to the cbo items.

View 1 Replies

Forms :: Display Picture In Picturebox1 - Shows This Message, Unable To Cast Object Of Type 'System.DBNull' To Type 'System.Byte[]'?

Dec 24, 2009

Now I want to display picture in picturebox1.To do this I use this codes, but it does not display picture

on this line: Dim arrPicture() As Byte = CType(dt2.Rows(0)("img_path"), Byte())

it shows this message,

Unable to cast object of type 'System.DBNull' to type 'System.Byte[]'.[code]......

View 1 Replies

Flattening An Object Hierarchy Using A Shim Class - Initializing Derived Object Properties From The Base Object?

Jul 10, 2010

I am somewhat new to object oriented programming and am attempting to flatten a Linq object hierarchy by using a shim class.how to initalize a derived class with property values from a base class?I have two objects, a base object with about 100 properties, and a derived object which inherits from the base object and adds a few additional properties beyond those of the base object. My simple constructor creates the derived object, but I am looking for a way to initialize the derived object properties with values from the base object.Right now I am using reflection to iterate over the properties individually and I suspect there may be a better way. The following example shows my shim class constructor for the derived class, and two properties:

newProperty1 - a new string property of the derived class

flattenedProperty2 - a new string property of the derived class, copied from a 2nd-level object of the base class

Code example:

Public Class derivedObj
Inherits baseObj
Private _newProperty1 As String[code].......

Is this the correct constructor approach to flatten the object hierarchy using a shim class? My second question relates to initialization of properties in the derived class. The constructor above creates the derived object, but what is the best way to initialize the derived object properties with values from the base object? The following code uses reflection to iterate over the properties individually, but I suspect there may be a better way.

Code example:

' property names are in the string array fieldNames

'baseObjQuery is an ienumerable of baseObj

'derivedObjList is a list of derivedObj[code].....

Is there a simple way to initialize values for the properties in the derived object based upon the values of the common properties in the base object?

View 7 Replies

Datagridview Shows Nothing?

Nov 5, 2009

I have written code to show records in a datagridview but it shows nothing. I have tried to debug & when it step into GetData function following codes

Catch ex As Exception
returnData = Nothing
If connection.State = ConnectionState.Open Then

[code]....

View 3 Replies

Picturebox Shows A Red X?

Nov 13, 2011

After my code runs for a while (i.e., 1+ hours), a picture box that was being displayed properly switches to showing a red X. The surrounding code still runs, but the image is not shown. I was intermittently having an out of memory error, but recent changes may have addressed this issue.The application is capturing a webcam image of an 8 x 16 grid which can hold different color balls. It displays the live image in picturebox1 (this works). I then grab a still from the live image, process it to see if there is a colored ball in each of the grid holes, and draw a representation of the image in picturebox2 using a grid of colored circles. As the live image changes, so does the drawn image. The drawn image is updated about 4 times a second. In each cycle I trigger a redraw of the image with a PictureBox2.Refresh.

Everything works great for a while (about an hour), but then picturebox2 gets the red X. The code keeps running without throwing an error. The live image still works.Recently I was getting an OutOfMemory error (again after an hour), but memory usage should not be growing in the code, and I have 8 GB installed. To address this issue I

1) forced Garbage Collection every 30 cycles (this does not seem to help, but I left this in the code.)

2) Inserted a Picturebox2.dispose before the Picturebox2.Refresh, but the Dispose took the picturebox off my form. I removed the .Dispose.

3) Moved declaration of variables out of loops to top of subroutines. (that seemed to get rid of the OutOfMemory problem.)

4) Inserted various try ... catch statements, but the code does not throw an error when redrawing the image, so this did not help.

View 3 Replies

Two Message Box Shows Up One After Another ?

Dec 28, 2009

I have a DateTimePicker in my form. When I set a message box to force user not to chose a date grater than today two message boxes shows up one after another. Below is my code -

[code]...

View 1 Replies

IDE :: Select Command Only Shows One Value?

Jul 17, 2009

I have a select statement, the code i have selects the item numbers from table(OrderItems) that is filtered with a combo box.[code]...

View 2 Replies

Number Shows Up As Zero In An Array?

Nov 27, 2011

Public Class frmLargestSmallest
'Declare public variables
Public intInput As Integer
Public intArray(9) As Integer

[code]....

I am trying to make an application where the user inputs 10 numbers in an array. The application then displays the highest and lowest values of the array. My code so far just display zero as the result.

View 3 Replies

Registering A Com Dll Shows Error

Apr 13, 2012

I have created a com dll in Visual Studio 2010, vb.net. The dll is supposed to compile in the framework 3.5 for X86 processor. Should run anywhere right? I reference this from an Access application using vba. All works well on my development machine. I must also say that the project references an eBay sdk dll called ebay.service.dll. This file supports converting the .net commands into the appropriate soap commands to communicate with eBay.

All this works well on the development machine when compiled. The files in the bin/debug folder are eBayListing.dll, eBayListing.tlb, and eBay.Service.dll. I can reference eBayListing.dll from Access and everything works well on the development machine. On the laptop I registered the eBayListing.dll and eBayService.dll using the visual studio regasm at: C:WindowsMicrosoft.NETFrameworkv2.0.50727RegAsm.exe. Both files appear to register as I get the registered message from regasm. I run this as administrator.

When I try to set the reference from the Access application in the VBA references I can only see the reference to the file as it was on my development machine. I can tell because it has the path the the bindebug file. I don't see the version of the dll supposedly registered on the laptop. The file obviously isn't there so I browse to the file on the laptop that is theoretically registered, but get an error.

View 2 Replies

Subtracting Two Hh:mm:ss Times Only Shows 00:00:00?

Jul 15, 2011

I am trying to create a basic tracker where and person clicks on button1 to display the start time in textbox1, button2 displays the stop time in textbox2 and texbox3 displays the difference between stop / start time. Textbox3 keeps showing 00:00:00 and not the difference between textbox2 / textbox1. I am having difficultly getting the format for the final textbox. I have look at Elasped Time and Parse, but without sucess. I have displayed the code below -

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]......

View 4 Replies

Way To Cause ToolTip To Reset So It Shows Up Again

Feb 4, 2009

I have a ToolTip on a TextBox control. When I hover the cursor over the TextBox the ToolTip appears as expected. But if the ToolTip disappears after it's AutoPopDelay time has expired or if I click on the TextBox while the ToolTip is still showing, then the ToolTip will not appear again when I hover the cursor over the TextBox. Is there any way to cause the ToolTip to reset so it shows up again?

View 1 Replies

WebBrowser Shows A Certain Area?

Oct 12, 2011

just wanna ask for a code that make the WebBrowser only shows a certain place or an area of the webPage, like only the Google bar.

View 3 Replies

Add 150 Days To The DateRegisteredDateTimePicker.Value And Then Shows It In A Text Box?

Dec 1, 2010

I want to add 150 days to the DateRegisteredDateTimePicker.Value and then shows it in a text box. But the system adding wrong ..item? Let me show you the output

txtDateExpired.Text = DateRegisteredDateTimePicker.Value.AddDays(150)

output:

current date is 12/01/2010 (this should read as Dec. 1st 2010) after adding 150 days, system shows 6/11/2010

View 2 Replies

Application Shows Error When Install In Another PC

Jun 3, 2011

I have created setup file of my program. I have tried to install it there in two pcs to test it that its working properly or not. One pc has visual studio & my program worked there after being installed but another pc doesnt have visual studio & my program doesnt work there after being installed. It shows error message that "WindowsApplication1 WindowsAoolication has encountered a problem and needs to close. We are sorry for the in-converience." What does it mean? Does it mean it that I couldnt create setup file properly?

View 4 Replies

C# - ASP.NET Web Control Shows Old Data After The First Postback

Aug 16, 2011

I'm having a weird problem with a custom Web Control in an ASP.NET forms application. For a web application, I figured that it would save me a lot of time to create a class which inherits from CompositeControl which combines a label with some other control such as a TextBox or DropDownList. This composite control has several properties that wrap properties of the underlying properties (e.g.: EnteredText wraps TextBox.Text). The controls can be used for databinding in the same way as the regular ones, but instead of txtBox.Text = someObject.someProperty you use compositeControl.EnteredText = someObject.someProperty. These controls are then used on ASPX pages and ASCX user controls.

[Code].....

View 1 Replies

Can't Type In A Textbox That Shows Cursor

Jan 15, 2010

I am having some bizarre issues with getting focus on the child objects of some user controls that I am developing.The base control, DatePanel, consist of three radio buttons, a textbox, a combobox, and a datetimepicker.Depending on which radio button is selected depends on which of the other controls are visible.The default state of the control has the textbox and combobox visible.When I test the control in the VS test container, I click in the textbox, the cursor appears but I cannot type, if I click in the textbox again then I can type.I have tested enough to figure out that if I click on any other control and then click on the textbox I can type.I have tried adding a gotfocus event for the user control to both Focus and Select the textbox and neither does anything.This user control is on several other user controls that are in development because I didn't catch the behave at the beginning.To make things a little stranger in one of the other controls, I found that if I set the tabindex of DatePanel A to 0 then I was able to type in the textbox after selecting it the first time, however if instead I click in the textbox of DatePanel B the cursor appears in that textbox but when I type the text appears in the textbox in DatePanel.

In terms of code on the DatePanel there are 6 properties and 3 events.The 6 properties return values of the fields on the DatePanel and the three events are for watching the state of the radio buttons.Other than that I did try adding the GotFocus event to no avail.I can provide any code that is needed but between myself and my colleagues we couldn't see anything that would have any influence over the control focus.

View 5 Replies

Create A Dll File That Shows Message?

Oct 29, 2009

How to create a dll file that show an msg ?

View 1 Replies

Data Shows In Datagrid But No In Listbox

May 3, 2009

[code]...

it shows up correcntly on the datagrid view though with the same code above expect the bit in bold changed. How would I get the data to show on the listbox?

View 5 Replies

Datagridview Shows Cutted Part

May 19, 2012

I'm trying to prepare my first program (database). I'm creating it just according to my knowledge so it's a little bit cr. [Code] when I'm choosing the value from CB1 then values in CB2 and CB3 are changing to the same value. then in all DGV is selected row with value chosen in CB1 (if present). CB2.Text = CB1.Text

Now I would like to copy the text from specific column of chosen row in DGV1 to TB1... but only part of the text. [Code] unfortunately when I make simple data-binding without cutting the text it shows me value from actual selected row but wen I'm using Microsoft.VisualBasic.Right it shows me the cutted part from previous choose.

View 2 Replies

Datagridview That Shows Query Results?

Nov 23, 2010

I need a clarification about using datagridview and query statement. i created a sql express database. In the project has been created a dataset with inside a table. In my form i used a datagridview and in automatic have been created BindingSource, TableAdapter, TableAdapterManager and BindingNavigator.

Till here everything is ok because i can add, delete and save members of the table.

Now i wanted to use another datagridview for a research but i don't understand what to use for do that.

procedure to search in a table using a new query?

I know that have been already done this kind of questions but i don't understant if using bindingsource, sqltableadapter, tableadapter ecc..

View 2 Replies

Date Shows Wrong On A Different Computer

Dec 3, 2009

I have a windows forms application that I wrote in VB express 2008. when i debug / run the program on my desktop, everything works as intended. but when the program runs on any other computer, ALL the date boxes seem to move the digits in the box 1 space to the left[code]...

I have checked the settings on both computers (display settings, font settings, desktop settings) I've made both computers identical and still get the same result.

View 2 Replies

Displayed For 5-7 Seconds And Then Form2 Shows?

Nov 23, 2010

So when my application starts i'd like form1 to be displayed for 5-7 seconds and then form2 shows. How do I do this?

View 3 Replies

Hide Form1 For 15 Mins Before It Shows?

Jan 11, 2009

how to hide form1 for 15 mins before it shows ((In VB 2008)) but it is still running?

View 5 Replies

IDE :: Screenshot Shows Different Color Of Same Variable?

Oct 17, 2011

Screenshot shows different color of same variable. AsFile - extension method.There is no knowledge that is not power.

View 4 Replies

Install The VB Still Shows Error For Framework

Apr 4, 2008

when I want to install the VB.net from that CD, I can't. it said I should to install framework from the internet. I have install the framework, but when I want to install the VB.net, it still said that i should install the framework. actually,i want to install this VB.net because i want to learn about this compiler more.

View 3 Replies

Menu Still Shows When Printing Form

Jun 22, 2010

I'm printing a VB.NET form using BitBlt API my code as follows[code]...

View 7 Replies

OnClientClick Function Shows Up After Postback?

Feb 20, 2012

I want to show a confirm dialog in my asp.net/VB.net application.

I'm adding programmatically the OnClientClick method in the Click event of a buton.

My code:

Protected Sub btn_send_Click(sender As Object, e As EventArgs) Handles btn_send.Click
btn_send.OnClientClick = "return confirm('Proceed?');"
End Sub

The dialog is displayed after the first postback of the site.

After I've made a postback, the dialog shows up on every click. But when I'm callin the page without a postback, no dialog shows up and the page does its postback.

View 1 Replies







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