|
don't know, but here is a link to a read only combobox
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2659&lngWId=10
|
|
|
|
|
don't know. try this instead:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2659&lngWId=10
|
|
|
|
|
If your Web application runs in an intranet environment any a person can access resources using Windows integrated security. In this strategy, all users are authenticated as soon as they log on to Windows. The authentication process generates a “token” containing information for that user. (The token does not contain the user's credentials, only a code indicating that the user has been authenticated.) The Web application can use the token when requesting a local resource. For example, a logged-in user requests a Web Forms page in Internet Explorer. The request is passed to Internet Information Services (IIS) and then to ASP.NET, which can use the user's authentication token to request access to a file on the server computer.
What I want is to access a resource on web application not by my token but by xxx (any valid network user) token, for that I have to create xxx’s token within my code, this is usually done by using operating system classes and API’s . If anyone has any idea about this please reply.
Regards , Fi
farazz
|
|
|
|
|
I use raw data printing in an accountancy program. XP Clients has no problem with that , but i cannot print any report from Windows me client..
And i use Oki 520 and 310 printers, they have three mode for Fonts ("NLQ","HSD","UTILITY") to print. But i cannot choose which one will be used when printing. I s there any method. Thank you.
|
|
|
|
|
You'll probably have to change your code to support printing to an LPT port. Remember LPT1? Windows Me (yuk! I need to rinse my mouth out now...) doesn't have the hardware abstraction layer that keeps you from printing directly to a port in NT Kernel O/S's.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can you show me a way how to do? I have no IDEA , do u know any article
|
|
|
|
|
Well, you can't use FileStream to DIRECTLY open LPT1, but you can get around this. FileStream has a constructor that accepts any Win32 file handle. You'll have to P/Invoke the Win32 API function CreateFile to open LPT1. It'll return a handle as an IntPtr. You can then use that handle with the FileStream class to write your data to LPT1.
See this[^] for a code sample.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm a VB.NEt programmer and I came accross the Directx 9 sdk. all i wanted was to create a fast vector based gis application. and i ended up asking.. 'Why am i Using VB.nEt. when I can use C#.'
can somebody enlighten me why we stick to vb.net when it seems that c++, java, c# share too many common characteristic that vb.net do not. are we 'vb dudes' being left behind?
still want to use vb though.
Marvin N. Guerrero
- Taje Kage_bunshinNunJutsU
|
|
|
|
|
What makes you think VB.NET is being left behind?
Just because the DirectX SDK doesn't have VB.NET samples in it?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how to programming chess game in vb.net.
Byambatsogt
-- modified at 23:53 Thursday 13th October, 2005
|
|
|
|
|
bitgii xachin ym yariad bai ;P
jghjgjgjgjghjgjgjg
|
|
|
|
|
Obvious, you write a bunch of code!
For such a generic question, I would suggest Googling for "Chess open source" projects. You'll find a bunch of them and you can even see the source code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Here is the sample code:-
I was accidently add a line KeyAscii = 0 and then the Beep sound is off.
Question:
1) Why after add a KeyAscii = 0 and then the VB wont sound the Beep?
2) What causing the Error that VB sound the Beep?
Create 2 TextFields on your form. you are welcome to try.
Text1 = txtBegin
Text2 = txtEnd
//-- BEGIN Form1 --
Private Sub txtBegin_GotFocus()
txtEnd.Text = ""
End Sub
Private Sub txtBegin_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
txtEnd.SetFocus
txtEnd.Text = "Here"
'Without the following statement the Beep will sound.
KeyAscii = 0
End If
End Sub
Private Sub txtEnd_GotFocus()
txtBegin.Text = ""
End Sub
Private Sub txtEnd_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
txtBegin.SetFocus
txtBegin.Text = "Here"
KeyAscii = 0
End If
End Sub
//-- END Form1 --
David
|
|
|
|
|
It is normal for a single line textbox to beep, it indicates that the textbox does not accept an enter. Multiline textboxes do not beep.
When you intercept the keypress, you get to it before the beep has occured. The keyascii value stores the ascii value for the keypressed, this is 13 for the enter key. If you don't change it, then the normal windows behaviour will occur - it detects the keyascii 13 and beeps. If you change it to 0 (ascii null) then windows will not beep at you.
|
|
|
|
|
How to prevent from "Sub Script Out Of Range Error" while accessing an array of user defined type.
Type CL
H As String
V As String
End Type
Dim InsCL() As CL
If IsNull(InsCL) Then
'Redim Preserve...
End If
IsNull(InsCL) causes Error as
"Only User Defined Types defined in public object modules can be corrected to or from a variant or passed to late-bound function"
Shoaib Nawaz
|
|
|
|
|
Hey everybody,
I have the following script, and sometimes it works, sometimes it doesn't. Now it doesn't, and I can'at for the life of me figure out why. I've put the working and non-working versions side by side and there is no difference. The problem I'm running into is that it always redirects, usually (but not always?) without prompting for a user log-in.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
'get user name from login
strUser = Request.ServerVariables("LOGON_USER")
If strUser = Nothing Then
Response.Redirect("http://someplace/")
Else
'strip out domain + make lowercase
strUser = strUser.Remove(0, 11)
strUser = strUser.ToLower
'get full user name
GetUserName(strUser)
End If
End If
End Sub
I am trying to use Windows authentication. Here's what I believe to be the relevant snippets from my Web.config file, if that will do anyone any good:
<authentication mode="Windows" />
<allow users="*" />
Any help is greatly appreciated. Thanks in advance.
-------------------
abort, retry, fail?
-- modified at 14:56 Thursday 13th October, 2005
|
|
|
|
|
jszpila wrote: strUser = Request.ServerVariables("LOGON_USER")
Ummm... IIRC, this will always be the account that your site is using under IIS. This will NOT be the account that a web user is attempting to login to your site with.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes I realise that, I probably should have explained better. But I tracked it down, it was an IIS configuration issue.
Thanks for your time, though!
-------------------
abort, retry, fail?
|
|
|
|
|
Does anyone have a VBScript with a message box or something for changing a computer name and joining a domain in Windows XP? Any help would be much appreciated. Thanks!
|
|
|
|
|
Both at the same time? Not recommended. Do one thing, reboot, then the other.
Rename a Computer and Computer Account[^]
Join a Computer to a Domain[^]
Notice that these examples are in the MS TechNet Script Repository? There's a large number of examples in there. I highly recommend browsing them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am having an issue with a VB .NET app, where one of my message boxes aren't displaying and you have to ALT+TAB to get it to display. I have been searching the web all day and found multiple times where the Virus Software was causing this due to OverFlow Protection being enabled, however the systems we are running this on don't have that enabled. Its only happening on this one form where we have 13 Message Boxes throughout it, and only this ONE MessageBox isn't being displayed.
Anyone have any thoughts?
|
|
|
|
|
Hi,
How can I disable the Windows Default Beep sound from VB. Instead of going to Sounds and Audio Device under Ctrl Panel to remove the Program Event sound.
Thanks,
David
|
|
|
|
|
This is NOT a good idea. You'll be disabling the sound for other applications too. Changing system wide settings without the users knowledge, or approval, is considered VERY BAD practice.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi all.
I'm new at this and I'm looking for critical comments (on style too) so I can do it better the next time. I designed the following code trying to incorporate as many lessons as possible.
Assumming my application consists of a main menu, a main toolstrip, and a main tabbed work area - I wanted an easy way to enable/disable main menu items or hide/display toolstrip button items --- depending on the current tab.
My first attempt was a spider web of if statements.
Then I decided on this approach - defining conditional (contextural) controls in a tabular fashion (getlistConditionalControls). Since some conditional controls may be disabled/hidden for several tabs, the 1st parameter is a bitwise sum of affected tabs. The 2nd parameter defines which property to affect (enabled or visible) - I would like to do away with this because I think I can test the referenced object (3rd parameter) for either ToolstripMenuItem or ToolstripButton. In my case all main menu items are enabled/disabled and toolstrip buttons are hidden/dislayed. Any help here? The last parameter is the alternate ToolTipText to inform the user as to why this control might be disabled (main menu items only).
Only conditional controls need to be listed here.
All comments and better ideas welcomed. Thanks
Public Class uxcMainFrm
Private ConditionalControlItems As New ArrayList ' List of Conditional Controls
Private Enum eProp As Integer
enabled = 0
visible = 1
End Enum
'
Private Sub uxcMainFrm_Load(....) Handles MyBase.Load
Call getlistConditionalControls() ' Define Conditional Controls
Call displayConditionalControls() ' Disable or Hide Controls Based on Cur Tab
End Sub
'
Private Sub uxcMainTabs_SelectedIndexChanged(....) Handles uxcMainTabs.SelectedIndexChanged
Call displayConditionalControls() ' Disable or Hide Controls Based on Cur Tab
End Sub
'
Private Sub getlistConditionalControls()
' Toolstrip Buttons
Call defineConditionalControl(6, eProp.visible, uxExpandBtn) ' Tabs #2 & #3
Call defineConditionalControl(3, eProp.visible, uxCollapseBtn) ' Tabs #1 & #2
' .... and so on
'
' Main Menu Items
Call defineConditionalControl(4, eProp.enabled, uxCreateMnuI, "To Enable: Select This or That")
Call defineConditionalControl(6, eProp.enabled, uxRotateMnuI, "To Enable: Select This or That")
' .... and so on
End Sub
Private Sub defineConditionalControl(ByVal tabs As Integer, _
ByVal prop As Boolean, ByRef control As ToolStripItem, ByVal altTooltip As String)
'
ConditionalControlItems.Add(New ConditionalControl(tabs, prop, control, altTooltip))
End Sub
Private Sub displayConditionalControls()
For Each ctrl As ConditionalControl In ConditionalControlItems
ctrl.setDisplay(2 ^ uxcMainTabs.SelectedIndex) ' Convert Base0 Tab# to Bit Flag
Next
End Sub
end class
'
Public Class ConditionalControl
Inherits ToolStripItem
'
Private _specTabs As Integer ' Specified Tabs to chk for - Bitwise enum
Private _Prop As Boolean ' Which Property (0=Enable 1=Visible)
Private _Control As ToolStripItem ' Control Name
Private _OrgTooltip As String ' Control Original TooltipText
Private _AltTooltip As String ' Control Alternate TooltipText
'
Public Sub New(ByVal specTabs As Integer, ByVal prop As Boolean, _
ByRef oControl As ToolStripItem, ByVal altTooltip As String)
'
Me._specTabs = specTabs
Me._Prop = prop
Me._Control = oControl
Me._AltTooltip = altTooltip
Me._OrgTooltip = Me._Control.ToolTipText
End Sub
'
Public Sub New(ByVal specTabs As Integer, ByVal prop As Boolean, _
ByRef oControl As ToolStripItem)
'
Me._specTabs = specTabs
Me._Prop = prop
Me._Control = oControl
Me._AltTooltip = ""
Me._OrgTooltip = Me._Control.ToolTipText
End Sub
'
Public Sub setDisplay(ByVal curTab As Integer)
Dim bVisible As Boolean = Me._Prop
'
If curTab And Me._specTabs Then
If bVisible Then
Me._Control.Visible = True
Else
Me._Control.Enabled = True
Me._Control.ToolTipText = Me._OrgTooltip
End If
Else
If bVisible Then
Me._Control.Visible = False
Else
Me._Control.Enabled = False
Me._Control.ToolTipText = Me._AltTooltip
End If
End If
End Sub
End Class
Thanks,
Karen
Nooobie to OOP and VB.Net 2005
|
|
|
|