|
Hi Dave and Robert
As u both said, i checked my sharing permission..and i was giving the logged client user the full permission not the APSNET user..
i add in the security tab the everyone user with at least the read permission and now i can copy the file..
thanx for your replies..
I will rate both of your msgs 5
Shall i do anything else???
thanx
netSam
|
|
|
|
|
Well...
send some money?
The best you can do is to read this forum regulary and try to help others.
|
|
|
|
|
I will try to do
thanx again for your help...
|
|
|
|
|
Hi,
Suppose that I have 10 string values that required to be used globally within my project. I learned that I have two ways to archive this one is by declare those 10 variables as public const, another one is to use only one public collection.
what are the nuts and bolts between these two? which one is better than the other one?
Thank for your help.
Good bye,
|
|
|
|
|
|
i just responded to someone with a question much like this over in the asp.net forum. Here is a link:
Here[^]
Assuming that your 10 strings are related in some way, you could create an object to hold those values as properties. This would give you a single place to make changes in the future if something were needed to be changed for these variables, vs searching your entire project for the var name.
Not sure if your looking for a web solution or not, but either way, the object idea would work in your case no matter the type of application.
btw, I am not a fan of the 10 public constants at all.
Levi Rosol
Blog By Levi[^]
|
|
|
|
|
Hi Ppl,
I would like to know if it is possibe to restrict (Key in) the number of charcters in a col for the DBgrid.
Like in MSFlexgrid I could restrict the length of the textMatrix in the Keypress event.
Is this possible in the DBGrid.
Tnx
|
|
|
|
|
I am creating several instances of a form. The problem is that I would like to update a few things before the form is shown. It seems that any reference to the new form causes the Form_Initialize and Form_Load functions to get called. Any ideas? PostIt is the form in question...
[code]
Private piPostIt() As New PostIt
While rcsMemo.EOF <> True
iIndex = iIndex + 1
ReDim Preserve piPostIt(iIndex)
Set piPostIt(iIndex) = New PostIt
If rcsMemo.Fields("Graphic Note").Value = True Then
piPostIt(iIndex).chkGraphic.Value = 1
Else
piPostIt(iIndex).chkGraphic.Value = 0
End If
If piPostIt(iIndex).chkGraphic.Value = 1 Then
piPostIt(iIndex).pbPostIt.Picture = LoadPicture(rcsMemo.Fields("Memo BMP").Value)
Else
piPostIt(iIndex).tbPostIt = rcsMemo.Fields("Memo Text").Value
End If
piPostIt(iIndex).Top = rcsMemo.Fields("StartupTop").Value
piPostIt(iIndex).Left = rcsMemo.Fields("StartupLeft").Value
piPostIt(iIndex).Height = rcsMemo.Fields("StartupHeight").Value
piPostIt(iIndex).Width = rcsMemo.Fields("StartupWidth").Value
piPostIt(iNumPostIts).Show
rcsMemo.MoveNext
Wend
dbPostIt.Close
[/code]
Thanks,
Tim
|
|
|
|
|
Make the things you want to modify into public properties, set these properties after you have initilized the instance of the form (i.e. after you have called the constructor):
Dim newForm As New MyForm 'Initilize will be called here
newForm.MyProperty = "Something"
newForm.Show
Hope this helps
Tom
|
|
|
|
|
Tom,
Thanks. The problem ended up being a typo.
|
|
|
|
|
Hi there,
Unfortunately I am an absolute beginner with programming.
My goal is to create a simple password interface to validate users access to specific folders on my PC.
Another thing I should mention is that I am using "DesktopX" to create it.
DesktopX is a program which allows me to implement both VB and Javascript into my projects.
I have already designed and created the Main Interface which consists of an animated image as the background.
Then I have incorporated ActiveX controls to create an Edit control where the user can enter text.
Next I incorporated a push button control - so after the user has inputted their password they can click on this 'validate' button.
So how do I make my interface check the password that the user has entered?
I have looked at various validation control and Edit control articles but I cant seem to find out exactly what I need to do!
I looked through the list of avaliable DirectX options but cant see anything that says validation or similar?
I am able to assign an Event "on pushbutton click"
And then I think I may need to implement specific code or something?
Please, - Nothing too complex like advanced encryption algorithms at this point as I am an absolute beginner!.
Thanks,
|
|
|
|
|
Hi all:
I'm trying to understand the relationship of datasets, connectors, and data adapters better.
What I'm attempting to do is read a small XML file which exists on a local machine into a datagrid. So far I've able able to create dataset based on a schema which populates my grid with the elements into the header row. However, I can't figure out how to get the contents of the file into the rows.
I'm confused by what I've read. On one hand it appears I should be able to use the XMLRead object to populate the grid. On the other hand, it seems that I need to create a db connection and data adapter, which seems to be a clunky way to load a local file into the datagrid.
I do need to able able to update, insert, and delete the row in addition to just viewing them.
TIA for any help/advice/tips
Norm
|
|
|
|
|
Does anybody know how to emulate the Selection Block found in word and Visual Studio using Visual Basic .NET 1.1 for a RichTextBox control?
Word and Visual Studio have a feature where you use the <alt> key in conjunction with the the left mouse click. As you hold the alt key and drag the mouse you are allowed to select multiple columns across multiple rows. I would like to replicate this feature in a application I am writing.
Thanks..
|
|
|
|
|
Hi!
I use the beginread() method to read data asynchrounously from a networkStream.In the documentation says that the callback method will run in another thread, and so it happens.The thing is that after the callback function ends (if i do another beginRead() or not) the thread doesn't terminate, it just stays there and if there is another async. read the same thread will respond.(different networkstreams with different threads). Shouldn't the thread terminate?If not how do i end it.
When i use delegates and beginInvoke() for each call the respective thread terminates and another different thread will run the callback function, after a new beginInvoke...but when i do this with beginRead and EndRead it doesn't happen.
Is this correct or am i doing anything wrong?
Thanks in advance.
Never say never
|
|
|
|
|
Hi!
Oops.After all the thread also stays there in the list but the threadpool says that there is no socket taken...shouldn't the thread leave the thread list (in the VStudio thread list) after it terminates?
Never say never
|
|
|
|
|
Hello
I have some problems with integrating dll (written in VC++) into VB application. I looked for some advices through google.
I create three functions packed in dll:
int_4 __stdcall Konec_RecToR(); //Stop
int_4 __stdcall Start_RecToR(); //Start
int_4 __stdcall RecToR_Init_Cap(void (*tmp)(unsigned char* array, int size, unsigned char first_frame, unsigned char last_frame, void* ex_param), void* ex_param);
First two functions work well in VB application. The problem is the third function which includes two parameters: callback function with five parameters and extra parameter.
The syntax in VB is:
Private Declare Function Start_RecToR Lib "RecToR.dll" () As Long
Private Declare Function Konec_RecToR Lib "RecToR.dll" () As Long
Private Declare Function RecToR_Init_Cap Lib "RecToR.dll" (ByVal CalBckFunc As Long, ByRef param As Long) As Long
Dim Success As Long
Dim param As Long
Private Sub Command1_Click()
Text1.Text = "ASCII" & vbCrLf & "FG"
param = 10
Success = RecToR_Init_Cap(AddressOf CallBackFunc, param)
Success = Start_RecToR
End Sub
Private Sub Command2_Click()
Success = Konec_RecToR
End Sub
//this is in separate module.bas file
Public Sub CallBackFunc(ByRef inarray As Byte, ByVal size As Long, ByVal flag_start As Byte, ByVal flag_stop As Byte, ByRef param As Long)
Text1.Text = Text1.Text & "TEST"
End Sub
Application crashes when my dll calls calback function. Did I miss something?
Tomaz Rotovnik
|
|
|
|
|
The problem is that you need to declare a "delegate" callback function. Here is some example code for enumerating thru windows using callbacks just like you need to implement in your code. You shouldn't have any problems figuring out what you need to do from here.
Module EnumWindows
Delegate Function EnumWindows_Callback(ByVal hWnd As Integer, ByVal lParam As Integer) As Integer
Public Declare Function EnumWindows Lib "user32" _
(ByVal lpEnumFunc As EnumWindows_Callback, _
ByVal lParam As Integer) As Integer
Public Declare Function EnumChildWindows Lib "user32" _
(ByVal hWndParent As Integer, ByVal lpEnumFunc As EnumWindows_Callback, _
ByVal lParam As Integer) As Integer
Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" _
(ByVal hWnd As Integer, ByVal lpClassName As System.Text.StringBuilder, _
ByVal nMaxCount As Integer) As Integer
Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" _
(ByVal hWnd As Integer, ByVal lpString As System.Text.StringBuilder, _
ByVal cch As Integer) As Integer
' The callback routine, common to both EnumWindows and EnumChildWindows.
' the argument passed in lParam is the indent level.
Function EnumWindows_CBK(ByVal hWnd As Integer, ByVal lParam As Integer) As Integer
' display information on this window, with correct indentation
Console.WriteLine(New String(" "c, lParam * 3) & WindowDescription(hWnd))
' then display all child windows, but indent them to the right
EnumChildWindows(hWnd, AddressOf EnumWindows_CBK, lParam + 1)
' Return 1 to continue enumeration.
Return 1
End Function
' return a windows description given its hWnd
Function WindowDescription(ByVal hWnd As Integer) As String
Dim text As String
text = WindowText(hWnd)
WindowDescription = "[" & Right$("0000000" & Hex$(hWnd), 8) & "] " _
& WindowClassName(hWnd)
If Len(text) > 0 Then
WindowDescription &= " - """ & text & """"
End If
End Function
' Return the caption/text of a window.
Function WindowText(ByVal hWnd As Integer) As String
Dim buffer As New System.Text.StringBuilder(256)
Dim length As Integer
length = GetWindowText(hWnd, buffer, buffer.Capacity)
WindowText = buffer.ToString.Substring(0, length)
End Function
Function WindowClassName(ByVal hWnd As Integer) As String
Dim buffer As New System.Text.StringBuilder(256)
Dim length As Integer
length = GetClassName(hWnd, buffer, buffer.Capacity)
WindowClassName = buffer.ToString.Substring(0, length)
End Function
End Module
Sub TestAPICallback()
EnumWindows(AddressOf EnumWindows_CBK, 0)
End Sub
|
|
|
|
|
Thank you for your help.
I will try with VB.NET framework (as I can see from example), because "Delegate" is not supported in VB 6.
I will give feedback as soon as possible.
Tomaz
Tomaz Rotovnik
|
|
|
|
|
Im so far removed from VB6 that I didn't even consider that you maybe using it.
|
|
|
|
|
I have 5 textboxes. I also have a datagrid. the datagrid has 5 columns.ItemID,CheckNo,Payee,Amount,Date.
I need textbox1 to go to ItemID(column1,row1)
I need textbox2 to go to CheckNo.(column2,row1)
Textbox3 to payee(column3,row1)
textbox4 to amount(column4,row1)
textbox5 to date(column5,row1)
I need these to do so on a button click and I already know that the code must be placed in the Private Sub Button1_Click part.
How do I get these textboxes to do so?
|
|
|
|
|
Hi,
I assume your Grid'd Datasource is dtGrid (Datatable)
in that case in Button_Click Event u can Create a New Datarow of dtGrid
dim drNew as Datarow
drNew = drGrid.NewRow
than just pass on the Values of TextBoxes........as
drNew.Item("ItemID") = txtItem.text......
..............
after that just add this Row to ur Table as
dtGrid.Rows.add(drNew)
dgGrid.Refresh......
I hope this is what u want.....
Regards,
Ritesh
|
|
|
|
|
Hey It Seems to be ok but the part that says drNew = drGrid.NewRow it says NewRow is not declared. am I supposed to replace this with something.
|
|
|
|
|
hello
i have build a database using MS ACCESS and write a coding in VB.NET to connect it as below
Imports System.Data.OleDb<br />
<br />
Public Class addItem<br />
Inherits System.Windows.Forms.Form<br />
Dim myconnection As New OleDbConnection("provider=microsoft.jet.oledb.4.0; datasource = Application.ExecutablePath + \LibrarySystem.mdb")<br />
<br />
Private Sub saveB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles saveB.Click<br />
myconnection.Open()<br />
Dim mycom As New OleDbCommand("INSERT INTO Product(product_code) VALUES ('" & productTb.Text & "')", myconnection)<br />
Dim MyReader As OleDbDataReader = mycom.ExecuteReader()<br />
mycom.ExecuteNonQuery()<br />
myconnection.Close()<br />
MyReader.Close()<br />
mycom.Dispose()<br />
End Sub
but when i click on the saveB button, the error below show up
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll
which point to
myconnection.Open()
may i know what i did wrong?
thank you in advance
Gary
|
|
|
|
|
GaryKoh wrote:
Dim myconnection As New OleDbConnection("provider=microsoft.jet.oledb.4.0; datasource = Application.ExecutablePath + \LibrarySystem.mdb")
This is your connection string. So it actually evaluates the variable you put in it, shouldn't it look more like this:
Dim myconnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.ExecutablePath & "\LibrarySystem.mdb")
Better yet, assemble the path name to the database using the proper function:
Dim dbPath As String = Path.Combine(Application.ExecutablePath, "LibrarySystem.mdb")
Then use this to open you database:
Dim myconnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi i have a list of data in a listview.
how do i set specifice item to have Imageicon, certain item don't
I'm using VB.net
|
|
|
|