|
i need to mscomm32.ocx (from vb 6)
123
|
|
|
|
|
Hi,
I have a table called tblUsers that displays all my users. What I want to do is when the user launches my form, for it to say Welcome "userloginName" on a label. So my form has to check to see if it is a valid user against (tblUsers).
How can I accomplish this?
Thanks,
Rashar
|
|
|
|
|
In VS 2005 you can use My.User.Name to retrieve the current user id.
Lost in the vast sea of .NET
|
|
|
|
|
Hi Thanks.
That works nice. However, when I debug into the code, the value of My.User.Name shows me domain\username, Where I just want username.
Is this possible?
Thanks,
Rashar
|
|
|
|
|
Try this:
'String manipulation to split the domain and userid<br />
Dim strFullUserID As String = My.User.Name<br />
Dim strUserIDSection(1) As String<br />
strUserIDSection = strFullUserID.Split("\"c)<br />
strDomain = strUserIDSection(0)<br />
strUserID = strUserIDSection(1)
Lost in the vast sea of .NET
|
|
|
|
|
in 2k3 I always used system.environment.username
which returned just the short name.
or you coul djust substring the returned name since that convient "\" is a perfect dilimeter.
dim y as string = system.environment.username
dim x as string = y.substring(y.laastindexof("\") + 1, y.length)
good luck
hey...slang is the vernacular for the vernacular...wow
|
|
|
|
|
FrankyT's post made me think... I tested the following in VS 2005 and received the results shown:
MsgBox(My.User.Name)
The messagebox displayed shows: COMPANY_DOMAIN\jsmith
MsgBox(System.Environment.UserName)
The messagebox displayed shows: jsmith
MsgBox(System.Environment.UserDomainName)
The messagebox displayed shows: COMPANY_DOMAIN
Much simpler code than what I posted earlier.
Hope this helps!
Lost in the vast sea of .NET
|
|
|
|
|
i need to pass parameter to another application built on C language with exe extension , i need a demo file describe the answer of my Question, i am making a project with VB.net language and i faced problem while i sending parameters to C application ...
i know how to send parameter to Prompt (consol.write) but to C Application application ...
i wait your answer .....pls
kilany
|
|
|
|
|
System.Diagnostics.Process.Start("your_program.exe","parameters")
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi
I have a winform in vb.net and I want to print it (as is)...
I searched the internet for some code, all of which demonstrate using Graphics.DrawImage and BitBlt API to draw an image of the form to the printer more like PrintForm method in vb6. But as you know, there are lots of limitations.I must make my form fit on an A4 paper.
Could you please introduce me some references on printing a form, using standard .net method.
Thanks
|
|
|
|
|
hey guys can you help on how to select the item in "ListviewItem.subitem" i set "LabelEdit = True" and "FullRowSelect = True" but still i can't edit the text....
thank you!!!!
|
|
|
|
|
Hi,
When the LabelEdit property is set to true, the user is able to modify the text of an item by clicking the item text to select it and then clicking the item text again to put the label text into edit mode. The text of subitems cannot be modified if this property is set to true. To change the text of subitems, you can display a dialog box to users when they double-click a subitem in the control.
http://msdn2.microsoft.com/en-us/library/system.windows.forms.listview.labeledit.aspx[^]
Regards,
Chatura Dilan
If at first you don't succeed, try; try again, so that you know
what not to do the next time. The answer is out there.
|
|
|
|
|
Hi
I installed directx 9 SDK but when I'm opening a 'directx 9 visual basic wizard', I get the message "The .NET assembly 'Microsoft.DirectX.dll' could not be found"
Could you help me!
thanks
|
|
|
|
|
|
plz give me some tips or suggestions related to software of an automobile dealer's shop
|
|
|
|
|
Hmm..tips.. gather the requirement from the users or owner of what they want the software to do?
|
|
|
|
|
hi.how to set pin 3 (txd) on rs232 always high?thanks....
|
|
|
|
|
I want to Develop Webcast Software in .NET, from where user can create and publish webcasts. Please help by providing some code or demo projects
|
|
|
|
|
Hi,
I have been working on Unicode support for a project built in VB and VC++. I have done some changes to the application for the same. I do not know which are all the characters a Unicode supporting application must support. Can someone please get me some characters from the basic version of Unicode so that i can test my application.In other words, i am not able to test the application as i do not know the additional characters my application should support. Please help.
Thanks & Regards
Ranjan
|
|
|
|
|
hi friends i am woking on MS Access forms with MS Access Database. i want to add text boxes' data into table on click event of a buton.
i am using buttons and want to use recordset object. i don't know how to open recordset and how to insert data in table from this button.
i am using this code it gives syntax error ont insert statement but i have checked my statement is correct.
___________________________________
Option Compare Database
Dim rst As ADODB.Recordset
===========================
Private Sub cmdAdd_Click()
Dim Did As Integer
'dim Dname as
'Set db = Humaintarian.mdb'
'Set rst = db.OpenRecordset("tbl_Dept") '.OpenRecordset("tbl_Dept") 'tbl_Dept is the table
'rst.AddNew
txtDeptId.SetFocus 'We have to set focus for each field
MsgBox ("txtDeptId=" & txtDeptId.Text) 'Just see what we got
'Did = txtDeptId.Text
'rst!Id = txtDeptId.Text
txtDeptName.SetFocus 'We have to set focus for each field
MsgBox ("txtDeptName=" & txtDeptName.Text) 'Just see what we got
'rst!Name = txtDeptId.Text
txtDeptDescr.SetFocus
MsgBox ("TxtDeptDescr=" & txtDeptDescr.Text)
'rst!Description = txtDeptDescr.Text
'rst.Update
'rst.Close
INSERT INTO tbl_Sectors(Id,Name,Description) VALUES(txtDeptId.Text,txtDeptName.Text,txtDeptDescr.Text)
End Sub
__________________________________
friends plz help me i am stucked
regards
Farooq Azam
|
|
|
|
|
hi friends how are all of
Farooq Azam
|
|
|
|
|
Can anyone provide some good examples or links for using TreeView in VB.Net.
With Best Regards,
Mayur
|
|
|
|
|
I'm not too sure about what to do when my project doesn't recognize 'system.drawing'
eg: " 'Drawing' is not a member of System.Windows.Forms.Label "
There might be an easy solution, but if someone could help it'd be great.
Thanks.
|
|
|
|
|
Zealot345 wrote: eg: " 'Drawing' is not a member of System.Windows.Forms.Label "
Well, this is actually true. If you do label1.Drawing, it won't work, and will generate this sort of error.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I was the one who actually had the problem, i just posted under another name.
the code line is: "Me.BackColor = System.Drawing.Color.SteelBlue " (squigly blue line unser system.drawing)
Im not sure how to fix it so that my project knows what System.drawing is. As i obviously can't run the project with it.
|
|
|
|