vb.net

purpose of dividing saturation / 50 and hue / 50?

i am controlling the hue and saturation of the backcolor of the form with scrollbars: Private Sub tbHUE_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbHue.Scroll Dim r, g, b As Integer HSVtoRGB(r, g, b, tbHue.Value, tbSaturation.Value / 50, 255) Form1.BackColor = Color.FromArgb(r, g,...

Modify Permissions not working with Windows 7 with .Net

I just got my new work computer build all done and encountered a brand new error in our application when we are trying to set modify permissions. Everything used to work perfect in Vista and my old build. The error: Some or all identity references could not be translated. The line: dSecurity.SetAccessRule(rule) The function: Public...

Add a custom FormView to a RadGrid Edit Item Template

I had a Dropdrowlist and FormView to work hand in hand to edit/update data. Now I need to add a radGrid and when user clicks on the a row, I need the formview to be populated or I need my existing formview to be populated inside the RadGrid's edit item template. Thanks. ...

Drawing.Graphics - Way to change pixel offset of source bitmap?

Hi, Having a small problem finding a function or method to do what I'm looking for, hoping someone might be able to give a bit of insight here. I've got a function that's supposed to extract and return a 32x32px bitmap from a larger bitmap which has a set of 32x32 tiles inside it. Here's the code I have now, but it's wrong since the Ti...

Showing Login form before main form in vb.net

I'm sure I'm doing my login process for my app in a not so perfect way, but as with lots of things, it works. The issue is to make it work I have to use the very unpopular DoEvents thing. I would like my application to show a login screen before loading my main form. Currently I have a login dialog box with a FormOpen boolean property...

How to trap the keyboard strokes on a c# win forms application (CTRl + alt +Del)

Is there Any way to handle the crtl + Alt + Del Key combination. Take for instance in a quiz application (Win Forms ), the user should not be able to switch to other windows till the test is over. I'm able to capture the ctrl and alt key strokes individually, using c# standard properties. but once they user hits the del key . The contr...

get font from combobox and apply it to richtextbox (vb.net)

I am building a word pad clone with extra a few extra features. I am trying to get two combo boxes (one with font names, the other with font sizes) to apply their selected attribute to the selected text in a richtextbox. This was my latest attempt, and I think I'm starting to get close, but I still get an error for InvalidCastException -...

Visual Studio macros: WindowActivated handler turns clicks into double clicks

If I add a WindowEvents_WindowActivated handler to my Visual Studio 2005 Macros EnvironmentEvents module, I get a weird side-effect: when I click from one window to another in Visual Studio, that click is treated as a double click. So for instance, I put the focus in an editor window and click a file in Solution Explorer, and the file o...

MasterType problem after converting from ASP.Net WebSite to Web Application project

After converting a Asp.net website to web application, I receive 'Type MyNameSpace.MyMaster is not defined' error on pages that use the MasterType directive. eg In the aspx file <%@ MasterType VirtualPath="~/MyMaster.master" %> In the designer.vb file the following code is generated and has the error described above: Public Shadows...

How can I use VB.Net to read the content returned from a URL?

Below is the example code I'm using to get this to work and it does work if I try to read yahoo.com. Here is the problem. The address I need to read is a java servlet that processes parameters passed in, generates a text document on the server, and then redirects to another URL and returns the address of the text file on the server. I...

How to create a Visual-Studio string visualizer?

I was trying to create a visualizer for IDictionary or ICollection Then like the simple visualizer (without dialog; I mean the ususal string visualizer that appears when hovering the variable, see image below), I want to make my custom text, I want to cast the collection to its type's list (I.E. StringCollection to List(Of String) or Li...

Unmarshalling Error [com.ctc.wstx.exc.WstxLazyException]

Hi there, I am communicating with a partner's webservice using proxy classes they've provided. I have this line of code which is throwing an exception: Dim response As requestWebRemittanceResponse = Me.webRemittanceService.requestWebRemittance(webRemittanceRequest) webRemittanceService is and instance of one of these proxy classes a...

Similar classes with different signatures

I have two classes: Public Class Subscribing Private _subscribingObjects As IList(Of String) Public Sub Add(ByVal obj As SubscribeObject) '...code...' End Sub Public Sub Remove(ByVal index As Integer) '...code...' End Sub End Class Public Class Providing Private _providingObje...

WebMethod return a value and call other method in vb.net

I have a Web Service with one WebMethod for which return value is boolean. It accepts XML file as string and process data. How can I first return status as true and then call the ProcessData method. As the processing data takes time I need to return true first and then process the data. Please help. [webmethod] Public function receiv...

User settings keep resetting to default after each deployment

My deployment of upgrades to an application written in C# (.NET 3.0) consist of simply replacing an older .exe with the new one. Because that older version can currently be used by some customers, I simply rename the old version to blahblah.exe.old and copy the new one to the same folder. When the user opens up the application again, the...

Whats a Good Example to Write XML using VB.net 2008.

Using this example how would I go about updating an XML file using this example: <foo> <n1> <s1></s1> <s2></s2> <s3></s3> </n1> <n1> <s1></s1> <s2></s2> <s3></s3> </n1> </foo> I Can read from it all day long but for the life of me I cannot seem to write it back into that format. ...

Using Office 2007 UI ribbon .dll file with my project

I have downloaded the official office 2007 UI ribbon .dll, but now what? I am coding in VB.net. I do not know where to place this .dll, and I do not see any additional controls anywhere at all. The readme explains how to license your copy, which I have done. Now what? I am hoping to magically see the ribbon control in the list of compon...

Quickbooks/QBFC 8.0 - Multiple Criteria of an Identical Request Filter Type

I would like to query an Employee by matching First and Last name. Ideally, I'd like to be able to specify that in one EmployeeQueryRq QBFC object. I think I have a start: Dim EmployeeQueryRq As IEmployeeQuery EmployeeQueryRq = requestMsgSet.AppendEmployeeQueryRq() EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameFilter.MatchCri...

Why does popping from one stack actually pop from multiple separate stacks?

I have tried to simplify and annotate the code which is giving me a headache below. It demonstrates my problem. Simply put, I have two separate stacks and I am trying to pop from one stack. For some reason, when you pop one of the stacks, it actually seems to pop the other one as well?! Is this by design and if so, why and how should...

How can my program know when the server is done processing my request?

I am connecting to my mail server using IMAP and Telnet. Once I am connected I am marking all items in the inbox as read. Some times the inbox will only have a couple of e-mails, sometimes the inbox may have thousands of e-mails. I am storing the response from the server into a Byte array, but the Byte array has a fixed length. Pri...