vb.net

Disable system device VB.Net

Is there any way to disable a system device from VB.NET. Such as a device that needs to be enabled/disabled quickly and or uninstalled. ...

clearing the image in a picturebox

i have a form with a picturebox that will allow to draw a free hand picture. i added the initialization of the image in the form_load and the click event of the clear button.but when i click the clear button the image will cleared and at the mouse move on the picturebox the last drawned image will shawn .if you can please help me how c...

Default time in VB.NET

Hi When I type Textbox1.text = Today,the date is capturing with default time ie 12:00:00,If instead of today if i code Now ,then also same 12:00:00 is capturing in to the sql database. Textbox1.text= getdate() is getting error.So can any one help to solve this Thank You ...

How do integrate the windows live msn in vb.net application?

How do integrate the windows live msn in vb.net? I will try it. But I can't do it. How do integrate msn (Adds to sound,picture,video etc) in vb.net forms application.You think any idea please help for me. ...

How do I detect what Domain User Group a Windows User is in with VB.NET?

How would I go about this? I know that using Dim currUser As String = Request.ServerVariables("LOGON_USER") retunrs the Domain\Username, but I want to know what Group that user is in say in Active Directory. Is this possible? Thanks in advance for any help. ...

How to change the font style from bold to regular

hai, I have a AxvsFlexGrid that contains the code in which firstly i set the font of the Axvsflexgrid to bold.But when exceuting the code i want to change some cell font format to regular instead bold. How can i do it? can anybody help me? ...

Normalizing my webpage URL for SEO

I am using ASP.NET with VB.NET I have realize that SEO does not like my page URL's that contain questions marks such as this......... http://www.erate.co.za/CompanyProfile.aspx?ID=112 Is it possible to change my URL from that to say http://www.erate.co.za/CompanyProfile/USA Is this even possible? If so how would i or can i do this...

clearing the image in a picturebox

'i using this code in the piicturebox1_paint myusercolor=(sysytem.drawing.color.black) myalpha=100 using g as graphics=graphics.fromimage(picturebox1.image) g.clear(color.white) dim currentpen as object=new pen(color.fromargb(myalpha,myusercolor),mypenwidth) g.drawpath(ctype(currentpen,pen),mousepath) end using 'using in th...

how to add images in gridview pagination

hi, I am using vb.net code. I have grid view, please see the code below: <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="innerGridTable" DataKeyNames="OrgID" DataSourceID="OrgGridViewDataSource"> <PagerSettings NextPageImageUrl="~/images/arrow-right-activ...

Form Paint event in VB.net

Weird issue: I have application that I fire some code in the Form_Paint event for the main form, it works fine on my machine, but on other machines is not working at all. I tried to debug the code on the other machine, and Form_Paint event is not triggered at all! ...

Cannot write XML declaration. WriteStartDocument method has already written it.

Hi, I want to pass an XmlDocument as a parameter to my webservice method. After I have loaded an XML file from a path, when I try to send the XmlDocument as a parameter by webservice method, I come across this error. What can be the reason? I use StreamWriter and I close it. I don't use XmlWriter. The development environment is VS 2008 ...

vb.net get folder security information

I'm looking for a straightforward means of pulling all the users who have access to a folder with vb.net. Does anyone have any code they are willing to share. All I need is the user name, not the type of access they have. Any assistance is greatly appreciated. Thanks. ...

Editable gridview - what are the basics?

I'm trying to create a simple example of an editable gridview, and for some reason can't seem to get the basics working. Why is this example not displaying the label Bar and a textbox when I click on "edit"? aspx: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="gv.aspx.vb" Inherits="WebRoot.gv" %> <!DOCTYPE html PUBLIC "-/...

How to get Lamda in LINQ to actually filter for dynamic linq

Example-I have a person class Public Class Person Private _fname As String Public Property Fname() As String Get Return _fname End Get Set(ByVal value As String) _fname = value End Set End Property Private _lname As String Public Property Lname() As String Get Return _lname End Get S...

What is the c# equivalent of this weird VB syntax for property?

I found the following syntax as a VB.NET property and I'm trying to convert it to c#, but I'm not sure how to accomplish that. Public Property SomeText(ByVal someEnumThing as SomeEnum) As String Get Select Case someEnumThing //figure out what string to return End Select End Get Set(ByVal Value as ...

export gridview data

What is the best way to export a gridview into an Excel spreadsheet? This seems easy except that my Gridview doesn't have an export attribute. What is the quickest way to do this? ...

WebBrowser control and ready state

I am using a webbrowser control to login to a website. WbBrowser.Navigate("http://www.foo.com/login.php") Once the page is loaded I login using the following code While WbBrowser.ReadyState <> WebBrowserReadyState.Complete Application.DoEvents() End While WbBrowser.Document.GetElementById("user_login").SetAttribu...

Saving binary data into SQL SErver database in vb.net

Hello, I have a string with Binarydata that is 64bit. I want to store this data into SQlServer database and the column is varbinary(Max). When I pass the string I am getting an error saying string cannot be converted into varbinary. How do I store the binary data into sql server. Thanks ...

How can I send an e-mail with a past date from .NET?

I tried to accomplish this via a MailMessage.Headers.Set call, in VB.net. See below: Dim objMail As MailMessage Dim objSMTPClient As SmtpClient objMail = New MailMessage() objSMTPClient = New SmtpClient() objMail.From = New MailAddress(MY_EMAIL_ADDRESS) objMail.To.Add(New MailAddress(TEST_EMAIL_ADDRESS)) ob...

Finding cursor location in a textbox in vb.net

How do you find the location of the little blinking cursor where the user can type, column and row? I couldn't find this anywhere. ...