|
I do have a virus scanner. Its Norton.... I will check that too.
Thanks for the help.
|
|
|
|
|
how can it possible to rename a treenode at runtime..in vb.net...
|
|
|
|
|
i got to know its very easy,, just,,
find the node at the point you click and,, then use BEGINEDIT option of the node,.. but dont forget to chage LABLEEDIT propety of the treeview to TRUE
|
|
|
|
|
Hello Everybody,
I need help from all of u, pls help me for following code.
I have given number for each line, only for ref. When u copy the code, pls remove the numbers given and do modification.
The original code is in C# that converted into VB.net using converter.This code is perfectly working in C# without any error and waring Now I'm facing problem.
Now problem is, the line number 20 need raiseEvent, I don't know how to raise event in vb.net
Pls concentrate on line 20. Pls let me know how to declare and raise event.
1 Public Class CreateItemTemplateRadioButton
2 Implements ITemplate
3 Dim strText As String
4 Dim strRadioButtonName As String
5 Dim Visibility As Boolean = True
6 Dim blChecked As Boolean = False
7 Public Sub New(ByVal RadioButtonName As String, ByVal Text As String, ByVal AutoCheck As Boolean)
8 Me.strText = Text
9 Me.strRadioButtonName = RadioButtonName
10 Me.blChecked = AutoCheck
11 End Sub
12 Public Sub New(ByVal RadioButtonName As String, ByVal Text As String, ByVal AutoCheck As Boolean, ByVal Visibility As Boolean)
13 Me.strText = Text
14 Me.strRadioButtonName = RadioButtonName
15 Me.Visibility = Visibility
16 Me.blChecked = AutoCheck
17 End Sub
18 Public Sub InstantiateIn(ByVal objcontainer As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn
19 Dim rad As HtmlInputRadioButton = New HtmlInputRadioButton
20 rad.DataBinding += New EventHandler(rad_DataBinding)
21 objContainer.Controls.Add(rad)
22 End Sub
23 Private Sub rad_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
24 Dim rad As HtmlInputRadioButton = CType(sender, HtmlInputRadioButton)
25 rad.Value = strText
26 rad.Checked = blChecked
27 rad.Visible = Visibility
28 End Sub
29 End Class
Balasaheb
Software Developer
Platform: Asp.net,vb.net
Database: SQL Server 2000
|
|
|
|
|
Hi All,
Can anyone tell me how to find out the location of System32 folder programmatically?
Thanks and Regards,
Anil
|
|
|
|
|
If you are using vb.net
MessageBox.Show(Environment.GetFolderPath(Environment.SpecialFolder.System))
|
|
|
|
|
Hi there,
I am trying to make this work for the past three days but with no success. I have a windows form application with web browser control integrated into it. What i want is that when ever there is some file download request come along i get the url and download it via System.net classes, if the file is a word,excel or power point document i open them in my other form where i have integrated the word/excel/pp. all the rest of bits are working the only thing left is that i don't know how to intercept file download. I know i have to implement idownloadmanager interface but i can't make it work, my the download method of the interface never get called. the sample code is here
Imports System.Runtime.InteropServices
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Browser As AxSHDocVw.AxWebBrowser
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
Me.Browser = New AxSHDocVw.AxWebBrowser
CType(Me.Browser, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Browser
'
Me.Browser.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Browser.Enabled = True
Me.Browser.Location = New System.Drawing.Point(8, 8)
Me.Browser.OcxState = CType(resources.GetObject("Browser.OcxState"), System.Windows.Forms.AxHost.State)
Me.Browser.Size = New System.Drawing.Size(360, 304)
Me.Browser.TabIndex = 0
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(376, 318)
Me.Controls.Add(Me.Browser)
Me.Name = "Form1"
Me.Text = "Form1"
CType(Me.Browser, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim url As System.Object = "http://my.mindvision.com/~ben/tools/"
Dim o As System.Object = Nothing
Browser.Navigate2(url, o, o, o, o)
SetDownloadManager()
End Sub
Private m_DownloadManagerCookie As System.Int32
Private Sub SetDownloadManager()
Dim ips As COMVB.IProfferService
Dim objBrowser As Object
Dim ispBrowser As COMVB.UCOMIServiceProvider
Dim ip As IntPtr
Try
' Get a handle to the browser ocx
objBrowser = Browser.GetOcx()
ispBrowser = DirectCast(objBrowser, COMVB.UCOMIServiceProvider)
' Query the browser for the IProfferService interface
ip = ispBrowser.QueryService(COMVB.SID_SProfferService, COMVB.IID_IProfferService)
ips = DirectCast(Marshal.GetObjectForIUnknown(ip), COMVB.IProfferService)
' Proffer the new object as the provider of the IHTMLEditHostinterface handler
ips.ProfferService(COMVB.IID_IDownloadManager, New ServiceProvider, m_DownloadManagerCookie)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
Class ServiceProvider
Implements COMVB.UCOMIServiceProvider
Public Function QueryService(ByRef guidService As System.Guid, ByRef riid As System.Guid) As IntPtr Implements COMVB.UCOMIServiceProvider.QueryService
If guidService.Equals(COMVB.IID_IDownloadManager) Then
If riid.Equals(COMVB.IID_IDownloadManager) Then
Dim idm As COM.Interfaces.IDownloadManager
idm = New DownloadManager
' idm.Download()
Return GetInterface(idm, COMVB.IID_IDownloadManager)
Else
Return Nothing
End If
Else
Return Nothing
End If
End Function
Public Function GetInterface(ByVal obj As Object, ByRef iid As Guid) As IntPtr
Dim pUnk As IntPtr
Dim pInterface As IntPtr
Dim hr As Integer
pUnk = Marshal.GetIUnknownForObject(obj)
hr = Marshal.QueryInterface(pUnk, iid, pInterface)
If hr < 0 Then
Marshal.ThrowExceptionForHR(hr)
End If
' Marshal.GetHINSTANCE()
' Marshal.Release(pUnk)
Return pInterface
End Function
End Class
Class DownloadManager
Implements COM.Interfaces.IDownloadManager
Public Function Download(ByVal pmk As System.Runtime.InteropServices.UCOMIMoniker, ByVal pbc As System.Runtime.InteropServices.UCOMIBindCtx, ByVal dwBindVerb As System.UInt32, ByVal grfBINDF As Integer, ByVal pBindInfo As System.IntPtr, ByVal pszHeaders As String, ByVal pszRedir As String, ByVal uiCP As System.UInt32) As Integer Implements COM.Interfaces.IDownloadManager.Download
MsgBox("file download event")
Return New System.Int32
End Function
End Class
Class COMVB
' IServiceProvider interface
<comvisible(true), comimport(),guid("6d5140c1-7436-11ce-8034-00aa006009fa"),="" _
interfacetypeattribute(cominterfacetype.interfaceisiunknown)=""> _
Public Interface UCOMIServiceProvider
Function QueryService(ByRef guidService As Guid, ByRef riid As Guid) As IntPtr
End Interface
' IProfferService interface
<comvisible(true), comimport(),="" guid("cb728b20-f786-11ce-92ad-00aa00a74cd0"),="" _
="" interfacetypeattribute(cominterfacetype.interfaceisiunknown)=""> _
Public Interface IProfferService
Sub ProfferService(ByRef guidService As Guid, ByVal psp As UCOMIServiceProvider, ByRef cookie As Integer)
Sub RevokeService(ByVal cookie As Integer)
End Interface
Public Shared SID_SProfferService As New Guid("cb728b20-f786-11ce-92ad-00aa00a74cd0")
Public Shared IID_IProfferService As New Guid("cb728b20-f786-11ce-92ad-00aa00a74cd0")
Public Shared SID_SHTMLEditHost As New Guid("3050f6a0-98b5-11cf-bb82-00aa00bdce0b")
Public Shared IID_IDownloadManager As New Guid("988934A4-064B-11D3-BB80-00104B35E7F9")
End Class
|
|
|
|
|
Hi everybody,
I have a vb.net windows application which is supposed to download a file on a remote IIS, how would you guys do something like that? I know I'll have to work with the http protocol, but have no clue on how to achive this.
Thank you in Advance,
/Peace2u my friends
|
|
|
|
|
Can anyone please help me. It's Urgent
I have to make a module for given below
In windows application with VB.Net. i have to make a application in that application There on SQL server thereare two databases one is blank and another has some data. But the tables in both the database are same. I want to transfer the data on the same sever in the blank databases through VB.Net coding. Also please give me the code for solving the problem of identity column. and some tables have relation with other tables how the data of thattables should be migrated.
divya
|
|
|
|
|
hi
I am not able to find the exact meaning of data compression algorithm(i.e deflate). is it any way related to data encryption or just creating an archive file? i have to implement this using the VB6. so please suggest me the best method to do that.
Kind Regards
Sandy
|
|
|
|
|
Are you working with data compression or data encryption?
|
|
|
|
|
Paul Conrad wrote: Are you working with data compression or data encryption?
Hi
its actually kind of doing both with the name of data compression. but i am not sure wat data compression actually means.
1) encrytping data to make the file size less?
2) Zipping it inorder to reduce the file size?
What exactly it is?
Kind Regards
Sandy
|
|
|
|
|
Data compression is to make the data smaller, reducing the size in memory or in a file. Data encryption is securing the data so unauthorized people cannot view the data. You can have both work together. For example, compress the data first, and then encrypt the compressed data. To undo the action I've just mentioned, you'd then decrypt the data and then uncompress the data for viewing, processing, etc. There are plently of compression libraries that can be googled and articles on this site.
Hope this helps,
Paul
|
|
|
|
|
Thank youvery much i think i can now be able to do my job. thanks for that suggestion
Kind Regards
Sandy
|
|
|
|
|
The best way to do it is to look for a component that will do it for you. Google results[^] for "vb6 data compression .zip".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi there,
1. How to control the textbox allows alphabets only. i want to know is there any other method beside Keypress event().
2. how to control the textbox allows alphanumeric values. For example Ic No. S1234567D
- so i want 1st character to be Alphabet and other 7 be numeric and the last 1 be alphabet.
I'm thinking for 2 weeks still i couldn't find a solution. HELP ME!!
Thanx in Advance.
|
|
|
|
|
Simple programmer wrote: 1. How to control the textbox allows alphabets only. i want to know is there any other method beside Keypress event().
The only other place in the KeyDown event of the TextBox.
Simple programmer wrote: . how to control the textbox allows alphanumeric values. For example Ic No. S1234567D
- so i want 1st character to be Alphabet and other 7 be numeric and the last 1 be alphabet.
Same thing as #1. But the best method would be to use a RegEx expression to check the string in the TextBox, combined with the current KeyDown character, for the proper format.
Or you could just use a MaskedEdit control[^] to do the same thing... In VB.NET 2005, there's already one of these in the ToolBox.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave,
Thanx a lot. i will try it out. Hope it works.
|
|
|
|
|
I have added refrence of microsoft flexgrid.
However , the toolbox could not show the control.
Help me.
Thanks a lot!
|
|
|
|
|
You have to add it to the ToolBox yourself. Just adding a reference to the .OCX won't do it. Right-click inside the Toolbox and pick Add/Remove Items... I think you can figure it out from there.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
need help... how to integrate some data of the application-1 to be used or display to the other application-2....
Thank
|
|
|
|
|
Would you care to elaborate on this?? It doesn't tell us anything about what you're really trying to do or what you're even thinking of doing.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Don't cross post You asked this same question in the SQL forum.
|
|
|
|
|
Hey everyone,
I've been looking around for some advice on OpenGL with VB.NET. I spent the last year learning and refining my ability with VB.NET and want to move into the 3D world.
I have 2 questions:
1. Would it be better for me to pickup C++ again to program this in or is there not too big of a differece? At what point (if any) is the difference noticeable?
2. I've pretty much only see "Tao" and "CsGL" as ways to use OpenGL. Any recommendations/alternatives?
I want to essentially program a simple "game" where you login, it shows you a sprite of some kind, you can move around and interact with objects, etc. Long term, if I can make a real game out of it... great. Other than that, just doing it for the experience.
Thanks,
Mike
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
Have you reviewed this article? It talks about using CsGL in VB.NET.
Best,
Jun
|
|
|
|
|