|
hellow to all ..
i am looking to a way to print more than one report in one click , , that mean when i click the button i can print 4reports at once or show the 4 reports in a crystalreportviewer , thxx for anyhelp ,
|
|
|
|
|
Hi all
How can i read word (.Doc) file line by line from VB6
thanks
|
|
|
|
|
hi!
first add word referens to ur form
then create a new object from it.
then oenn it(give adress)
annd with read method ur work has finished!
good luck!
|
|
|
|
|
|
how to create code for sending argument to vb.net from vb6.
and how can vb.net receive the argument.
example:
send location path of folder from vb6 and use the path location in vb.net
thank you for kindness..
Ihsan
|
|
|
|
|
|
hello,
can u help me plz
i want to inherits some properties of treeview control to the listview control , 'coz i need this for my application.
i wil be gratefull
plz
give me solution
Regards
Irfan Siddiqui
programmer
|
|
|
|
|
What exatcly are you trying to achieve? What you request is not possible (would require multiple inheritance).
|
|
|
|
|
hello
thanks for response
sir i have a treelistview class that has all the properties of a control
& i wanto add a property called focused node and i used this property but i won't work .
Regards
Irfan Siddiqui
programmer
-- modified at 6:32 Monday 1st May, 2006
|
|
|
|
|
Hi,
sorry but you don't provide enough infos so that I can help you.
What extactly is treelistview? Its not part of the framework. Is it a control you built yourself or one downloaded from somewhere?
If it is not too much you can post the relevant code snippets and point out what exactly is not working.
|
|
|
|
|
hello
thanks for ur interest
yes i have download it , it is a hybrid of treeview & listview control. but it has no property like other controls have as Focusednode or focuseditem hence i want to add this property in my Treelistview.
i am showing u some code sample of its property called
selected node property,
but it's not working
Private WithEvents mSelectedNodes As New NodeCollection<br />
<Browsable(False)> _<br />
ReadOnly Property SelectedNodes() As NodeCollection<br />
Get<br />
Return mSelectedNodes<br />
End Get<br />
End Property
Regards
Irfan Siddiqui
programmer
|
|
|
|
|
Hi
I want to change the GUI of my program to something more intresting (than the usual shape of forms and controls).
I don't know where to start... I'd be glad if someone could show me a tutorial and/or controls to do so...
Thanks
|
|
|
|
|
What I am doing in my application is the following
I build one seprate class project so that I can use this on different projects. in this project i build one function say SetSkin this is as folows
private sub setSkill(byref frm as object, optional SkinType as integer=0)
Dim obj as object
if skinType=0 then
for each obj in frm.controls
if typeof obj is button then
' set some properties here for button
elseif typeof obj is textbox then
' set some properties here for textbox
elseif ......
' ohers
end if
next
end if
end sub
this way you can change the skin type and make different skins from parameter and also change the shape etc and call this function in load of your form and send the form like
setSkin(me,1)
regards
Rizwan Bashir
|
|
|
|
|
I put together a form with one text box on it. Add a database connection, dataadapter and create a dataset. I databind the text box through properties. I use the fill command to fill the textbox with data. I see the data. I edit the data and the dataset does not seem to accept it.
If I do exactly the same thing using a datagrid instead of the textbox, it takes the change I made...
All sample code that I can find deals with datagrids, there is nothing that I can find for a simple textbox.
Figuered it out as follows:
Dim nsn As String
nsn = txtSchoolName.Text
Me.DsSchoolInfo1.tbl_SchoolInfo.Rows(0).BeginEdit()
Me.DsSchoolInfo1.tbl_SchoolInfo.Rows(0)("SchoolName") = nsn
Me.DsSchoolInfo1.tbl_SchoolInfo.Rows(0).EndEdit()
Try
Me.DbaSchoolInfo1.Update(DsSchoolInfo1)
Catch x As Exception
End Try
Me.Close()DSS
-- modified at 20:57 Monday 1st May, 2006
|
|
|
|
|
first locate datarow position ((me.bindingcontext(dataset,"ur tablename").position) then update it with a command builder:
cb = new oledbcommandbuilder(da)
da = cb.dataadapter
da.update(ds,"yourtablename")
good lock!
|
|
|
|
|
Thanks for the help. I was still not successful in my attempt trying with your proposed solution. I posted some code in my question that I tried as well...
DSS
|
|
|
|
|
|
Hi All
I've created a pretty basic update command that uses oledbparameters that runs successfully. However, it locks the entire database (ie: no one else can use the Access database while the query is running)
Also, if the database is open in MS Access, my query fails because the "file is already in use"
what can I do to stop this. Can I specify a level of locking to use - optimistic, pessimistic, etc
Thanks for any advice
Jason
|
|
|
|
|
Here is my problem i'm authenticating a user say me, that is currently logged on, if he's in the correct role(group). If so and i'm an admin (group = app_admin) then no restrictions are set otherwise i will set restrictions, this functionality works, i can get the current user with windowsidentity.getcurrent, and so on.
I have a logon/logoff in my mainmenu that shows up a login form, where i put in a different username, password, and domain (now = computername), but domain function is also an option i would like to put in my app. since i'm building it in n-tier.
When i validate the user info from the login form and there is a user with the given password in the domain, it should change the windows logon or better use the windows logon to verify if user exists, so i can use the authentication trough the roles(groups) to set the restrictions if say it's a user (app_user) and not an admin, and set the username in statusbar, and keep the restrictions until a new login is performed, and that user belongs to a different group. Also need to logoff the current user, and say put in the most restrictions (or logon the default user with his default restrictions, wathever is the most simple/usable.)
And this is where it goes wrong, i use the logonuser (advapi.32) and get an error 1385, when cheking the new user login.
When i use the setting from the already logged on user he gives me no error and everething works fine.
So how can i logoff the current user and logon the new user without logging off windows, or making a new windows identity with the new user and associate him with my app so he will know the user and his role, when i get his windows.identity.
I know there is an impersonate, but that is not what i want, i think, please help me, i have searched throug the web and didn't find anything that states my problem, only geting winid, login automaticly, logoff windows, and so on but nothing that can help me.
partial code:
<pre>Private Function ValidateLogin() As Boolean
Try
Dim blnSuccess As Boolean = False
Dim UserName, Domain, Password As String
Domain = Me.txtDomain.Text
UserName = Me.txtUser.Text
Password = Me.txtPassword.Text
Dim token As IntPtr
If LogonUser(UserName, _
Domain, _
Password, _
LogonType.LOGON32_LOGON_INTERACTIVE, _
LogonProvider.LOGON32_PROVIDER_DEFAULT, token) = True Then
Return True
Else
Throw New System.Exception("Logon Failed. Error: " & _
GetLastError())
End If
Catch ex As System.Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Loginfailure")
End Try
End Function </pre>
-- modified at 21:02 Sunday 30th April, 2006
|
|
|
|
|
What i need, and ive seen it in a running app., so it can be done. Is that the app. checks the first logged on user info for first settings, or maybe its starts standard with no user loged in for the app. or a default user, because with first start up you can't access any buttons, except for a logon button in the app. And when you logon you can access the program except for the controls that are under an admin group. Then you have to logon with an admin user and password. The user info is than set in a label like username, in the program i've seen it's used for communication with other programs where he recognises your user and role and does the same restriction based settings, but i don't need that, just working with one app., so the user is actualy saved somewhere or in a way logged on. But when you open the start menu, you are in windows still logged on as the default user, so your user that falls under a group that is set in users and groups, is used for the app, but not for the windows logon. The app uses its own logon and uses the groups that u put in users and groups, but i'cant see any user in the users menu, just a default user used to logon windows, It also uses Active Directory. When i first had to set my password i just had to use the windows logon to set my password then it could be used in the app. So i'm not sure how this functions.
|
|
|
|
|
Hi all
every month i have to parse out a bill that comes to my company
so i decided to write a program to do it for me
right now i can parse it out ( by feild) and add it to a sorted list
so it comes in
username 1 , charge
username 2, charge
username 13, charge
username 1, charge
username 1, charge
username 4, charge
(no order)
and i parse it out to:
username1 , total bill
username2, total bill
The problem is that now they want it sorted by department ( give a mouse a cookie)
so im playing around with a sorted list and a structure
so it comes in
and the sorted list looks like this
key........value
username , structure (.username, .department ,.total)
it does all the math fine but im having trouble searching and displaying the structure after i get it into the sortedlist
any ideas
|
|
|
|
|
Hi,
in the SortedList the keys are the one you are sorting after, so in this case you sort by username and not by department. You can also access the structures rather quick (binary search algorithm) via the username:
MyStructure structure = (MyStructure)sortedList["username1"];
You shouldn't use the SortedList in this case. You could just create a normal Array of your structures
(MyStructure[]) and sort it:
MyStructure[] structures = CalcStructures();
Array.Sort(structures, new MyStructComparator);
public class MyStructComparator : IComparer {
public int Compare(object obj1, object obj2) {
return ((MyStructure)obj1).Department.CompareTo(((MyStructure)obj2).Department);
}
}
Now you could also easiliy add as much properties as you like and sort them accordingly.
|
|
|
|
|
Pardon the newbie quesiton but isnt that c+ code?
|
|
|
|
|
My structure and my sorted list
Dim ipassinfo As New SortedList<br />
Public Structure user<br />
'Declare data members<br />
Public username As String<br />
Public department As String<br />
Public domestictotal As Decimal<br />
End Structure
Breaks up the line
adds it to my structure
adds the user name and the structure to the sorted list
fields = MyLine.Split(ControlChars.Tab) 'Or Convert.ToChar(Keys.Tab)<br />
<br />
<br />
'check to see if entrie already exists if not create it<br />
If ipassinfo(fields(2)) Is Nothing Then<br />
'loading the structure<br />
userinfo.username = fields(2)<br />
userinfo.department = "???"<br />
userinfo.domestictotal = fields(9)<br />
'adding the structure to the sortedlist under key username<br />
ipassinfo.Add((fields(2)), userinfo)<br />
Else<br />
' adds charges to total if allready exists<br />
userinfo.domestictotal = userinfo.domestictotal + fields(9)<br />
End If
|
|
|
|
|
Hi,
sorry about the C# code. Sometimes I just forget in which forum I am
I assume your code runs inside a loop over all entries.
After that (such that upassinfo is completely filled) place the following code:
Dim userarray As user()
ReDim userarray(ipassinfo.Values.Count)
ipassinfo.Values.CopyTo(userarray, 0)
userarray.Sort(userarray, New MyStructComparator)
Dim u As user
For Each u In userarray
'do something in sorted order
Next
Moreover you'll need this class:
Public Class MyStructComparator
Implements IComparer
Public Overridable Function Compare(ByVal x As Object,
ByVal y As Object) As Integer Implements IComparer.Compare
Return CType(x, user).department.CompareTo(CType(y, user).department)
End Function
End Class
|
|
|
|
|