Hi,
I have a situation where I need to make some data available for reading by anyone from a specific device, where the data is pre-loaded on the device, but I cannot allow anyone to create their own device and populate it with their own data in the same format.
I know this sounds a little crazy, but there is a good reason!
I was plan...
Using the c# code below, how would you write it in vb? What is it trying to say?
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace Microsoft.LiveLabs.Pivot
{
/// <summary>
/// Tile Builder class
/// </summary>
...
Unused reference button not in C# IDE as its there in VB.NET project properties.It will be useful to view all unused references in all type of visual studio projects.
Hoping Microsoft will fix the bug in future.
See the response from MIcrosoft Connect
https://connect.microsoft.com/VisualStudio/feedback/details/559625/add-unused-refe...
Im using the Windows Media Player OCX in a program runned on hundreds of computers (dedicated).
I have found out that when video acceleration is turned on to "full", on some computers it will cause the video to fail to play correct, with green squares between movies and so on. Turn the acceleration to "None" and everything is fine.
Th...
I am using below function to make a image of current form and set it in clipboard
Image bit = new Bitmap(this.Width, this.Height);
Graphics gs = Graphics.FromImage(bit);
gs.CopyFromScreen(this.Location, new Point(0, 0), bit.Size);
Guid guid = System.Guid.NewGuid();
string FileName = guid.ToString();
//Copy that image in the clipbaord.
I...
Hi, i am trying to create a Unit test for a WinForm in a Visual Studio 2010 project.
I add a new "Coded UI Test" to my project, open up the code file, then right click and select "Generate Code for Coded UI Test" -> "Use Coded UI Test builder". I then start my application up, select "Record" on the UI Map control. I run my tests (in this...
Hi,
As topic says, I need to extend the features of a standard Silverlight ComboBox to also support Commanding. Since I follow MVVM I need my ComboBox to communicate the SelectionChanged event to my ViewModel.
What would the code look like for doing this? I want to be able to put the Command attribute on my ComboBox XAML control.
Usin...
Hi,
How can I download a pdf and store to disk using vb.net or c#?
The url (of the pdf) has some rediection going on before the final pdf is reached.
I tried the below but the pdf seems corrupted when I attempt to open locally,
Dim PdfFile As FileStream = File.OpenWrite(saveTo)
Dim PdfStream As MemoryStream = GetFileStream(pdfURL)
Pd...
while the application is running i'm using FileSystemWatcher to monitor the folder. But what if there are changes to the folder when the application is not running, how can I check for these changes when the application starts.
(similar to how windows media player, for example, monitors your music folder. Even when you add songs to that...
I am trying to display a number, stored in a dataset as a string, as a phone number. I have a label that Binds to a value but doesn't display the format that I passed as an arg:
<asp:Label ID="lbl005108002" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "phone number", "{0:(###) ###-####}") %>'></asp:Label>
As a test I t...
Hi
I want to create a generic list - but I want to specify the type at runtime - is there a way I can do this? using reflection perhaps?
Something like this...
Public Shared Sub create(ByVal t As Type)
Dim myList As New Generic.List(Of t)
End Sub
Thanks in advance
James
...
Here's what I mean. Suppose I'm working with an API that exposes events, but these events do not follow the standard EventHandler or EventHandler<TEventArgs> signature. One event might look like this, for instance:
Public Event Update(ByVal sender As BaseSubscription, ByVal e As BaseEvent)
Now, typically, if I want to get an IObservab...
Hi
I'm trying to create an object Of a specific type. I've got the following code, but it fails because it can't cast the new table object to the one that is already defined. I need table to start of an IEnumerable type so I can't declare is an object.
Public sub getTable(ByVal t as Type)
Dim table As Table(Of Object)
Dim tabl...
I'm exporting my Dataset to an excel file, and I want to make sure I keep any file errors under control. One in particular that I'm concerned about is accessing a file that's already open. A general IOException occurs that says "The process cannot access the file 'C:\Reports\report300.csv' because it is being used by another process." H...
Hello,
I found that if you press F5 or refress from browser window, the last event fires again
example, I have clicked on a button, the button event is carried out normally, but if I refresh the page by pressing F5 key the same event is fired again.
anyone have any Idea to solve this?
...
Hi,
When a selection in WindowsForms RichTextbox uses two or more different font sizes (eg. you select text with font size 9 and some other text with font size 16 in the same selection), SelectionFont.Size always returns 13. Is there any way to detect that two different sizes are selected?
...
I recently came across the AsyncFileUpload control in the latest (3.0.40412) release of the ASP.Net Ajax Control Toolkit. There appears to be an issue when using it in a hidden control that is later revealed, such as a <div> tag with visible=false.
Example:
Page code -
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControl...
"Object reference not set to an instance of an object"
Why does the exception not also show the name of the object reference field, or at least its type?
This is probably one of the most common run-time errors in .NET. Although the System.Exception has a stack trace, there are no other helpful details.
Over the course of a year I spen...
How to replace cell value with their description. This is my grid
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None">
<HeaderContextMenu EnableAutoScroll="True">
</HeaderContextMenu>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID" DataSourceID="SqlDataSource1">...
I'm having problems with marshaling in VB.NET to C++, here's the code :
In the C++ DLL :
struct APP_PARAM
{
int numData;
LPCSTR *text;
int *values;
};
int App::StartApp(APP_PARAM params)
{
for (int i = 0; i < numLines; i++)
{
OutputDebugString(params.text[i]);
}
}
In VB.NET :
<StructLayoutAttribute...